diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1c0e55f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +# Keep generated projections and actual verification records available for audit +# without obscuring authored source changes in GitHub's default diff view. +src/layer1-uor/generated-model.js linguist-generated=true +product/contracts.json linguist-generated=true +product/source-attestation.json linguist-generated=true +product/source-build-manifest.json linguist-generated=true +product/source-verification.json linguist-generated=true diff --git a/.github/workflows/guest-browser-qualification.yml b/.github/workflows/guest-browser-qualification.yml new file mode 100644 index 0000000..921fb6c --- /dev/null +++ b/.github/workflows/guest-browser-qualification.yml @@ -0,0 +1,49 @@ +name: Qualify integrated Stitch host +on: + push: + branches: ['staging/stitch-upstream-reconciliation'] +permissions: + contents: read +concurrency: + group: stitch-integration-${{ github.ref }} + cancel-in-progress: true +jobs: + runtime: + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 + with: + node-version: '24' + cache: npm + - run: npm ci --ignore-scripts + - run: npm test + - run: python3 scripts/verify-custody.py + - run: cargo test --locked + browser: + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 + with: + node-version: '24' + cache: npm + - run: npm ci --ignore-scripts + - name: Install pinned Chromium and its system dependencies + run: npx playwright install --with-deps chromium --only-shell + - name: Qualify actual Chromium host adapters and bundled guest + run: npm run test:browser + - name: Retain browser diagnostics + if: always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: stitch-browser-${{ github.sha }} + path: | + verification-output/browser/ + if-no-files-found: warn diff --git a/.github/workflows/guest-candidate.yml b/.github/workflows/guest-candidate.yml new file mode 100644 index 0000000..3972971 --- /dev/null +++ b/.github/workflows/guest-candidate.yml @@ -0,0 +1,94 @@ +name: Build and qualify guest candidate +on: + workflow_dispatch: + push: + branches: ['feat/**'] + paths: + # Only image-producing inputs trigger a costly rebuild. Probe/docs and + # workflow-only edits can inspect/requalify existing images or dispatch explicitly. + - 'vendor/guest/board/**' + - 'vendor/guest/configs/**' + - 'vendor/guest/Config.in' + - 'vendor/guest/external.desc' + - 'vendor/guest/external.mk' + - 'vendor/guest/build-candidate.sh' +permissions: + contents: read +concurrency: + group: guest-candidate-${{ github.ref }} + cancel-in-progress: true +jobs: + candidate: + runs-on: ubuntu-24.04 + timeout-minutes: 200 + env: + BUILDROOT_PIN: 7fdeadb3b9f12f78e5fccca914d7fef47090ab9a + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 + with: + node-version: '24' + - name: Prepare bounded build host + timeout-minutes: 10 + shell: bash + run: | + set -euo pipefail + mkdir -p "$RUNNER_TEMP/guest-evidence" + df -h "$RUNNER_TEMP" | tee "$RUNNER_TEMP/guest-evidence/disk-before.log" + free_kib=$(df -Pk "$RUNNER_TEMP" | awk 'NR==2 {print $4}') + test "$free_kib" -ge 20971520 || { echo 'Need at least 20 GiB free for first Buildroot build; use a larger authorized runner.'; exit 1; } + sudo apt-get update + sudo apt-get install -y --no-install-recommends build-essential patch perl cpio unzip rsync bc file wget python3 gzip xz-utils git + { gcc --version; make --version; python3 --version; node --version; } > "$RUNNER_TEMP/guest-evidence/host-tools.log" + git init "$RUNNER_TEMP/buildroot" + git -C "$RUNNER_TEMP/buildroot" remote add origin https://github.com/buildroot/buildroot.git + git -C "$RUNNER_TEMP/buildroot" fetch --depth=1 origin "$BUILDROOT_PIN" + git -C "$RUNNER_TEMP/buildroot" checkout --detach FETCH_HEAD + test "$(git -C "$RUNNER_TEMP/buildroot" rev-parse HEAD)" = "$BUILDROOT_PIN" + - name: Build image and collect original source/license materials + timeout-minutes: 175 + shell: bash + run: | + set -euo pipefail + vendor/guest/build-candidate.sh "$RUNNER_TEMP/buildroot" "$RUNNER_TEMP/guest-output" 2>&1 | tee "$RUNNER_TEMP/guest-evidence/build.log" + - name: Qualify actual bundled emulator against candidate + timeout-minutes: 4 + shell: bash + run: | + set -euo pipefail + node vendor/guest/qualify-candidate.mjs "$RUNNER_TEMP/guest-output/images/bzImage" 2>&1 | tee "$RUNNER_TEMP/guest-evidence/runtime.log" + - name: Preserve usable results even on failure + if: always() + timeout-minutes: 8 + shell: bash + run: | + set -euo pipefail + evidence="$RUNNER_TEMP/guest-evidence" + output="$RUNNER_TEMP/guest-output" + mkdir -p "$evidence" + printf '%s\n' 'Candidate evidence only. A failed or interrupted build produces partial materials, not distribution clearance. Inspect build/runtime logs and legal-info warnings. No runtime image was published or replaced.' > "$evidence/STATUS.txt" + if test -d "$output"; then + parts=() + for part in downloads legal-info release-materials; do + test ! -d "$output/$part" || parts+=("$part") + done + if ((${#parts[@]})); then tar -czf "$evidence/sources-and-licenses.tar.gz" -C "$output" "${parts[@]}"; fi + test ! -f "$output/.config" || cp "$output/.config" "$evidence/buildroot.config" + test ! -f "$output/images/bzImage" || cp "$output/images/bzImage" "$evidence/stitch-guest-candidate.bin" + if test -d "$output/build"; then + (cd "$output"; find build -mindepth 2 -maxdepth 2 -name .config -type f -exec cp --parents '{}' "$evidence/" ';') + fi + (cd "$evidence"; find . -type f ! -name SHA256SUMS -print0 | sort -z | xargs -0 sha256sum > SHA256SUMS) + fi + - name: Upload candidate, source materials, configs and logs + if: always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: guest-candidate-${{ github.run_id }}-${{ github.run_attempt }} + path: ${{ runner.temp }}/guest-evidence/ + include-hidden-files: true + if-no-files-found: warn + retention-days: 14 + compression-level: 0 diff --git a/.github/workflows/prism.yml b/.github/workflows/prism.yml new file mode 100644 index 0000000..816a8f6 --- /dev/null +++ b/.github/workflows/prism.yml @@ -0,0 +1,109 @@ +name: Stitch model and runtime +on: + push: + branches: [main, 'feat/**'] + pull_request: + workflow_dispatch: +permissions: + contents: read +concurrency: + group: stitch-${{ github.ref }} + cancel-in-progress: true +jobs: + runtime: + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 + with: + node-version: '24' + cache: npm + - run: npm ci --ignore-scripts + - run: npm test + - run: python3 scripts/verify-custody.py + - run: cargo test --locked + browser: + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 + with: + node-version: '24' + cache: npm + - run: npm ci --ignore-scripts + - name: Install pinned Chromium and its system dependencies + run: npx playwright install --with-deps chromium --only-shell + - name: Qualify actual Chromium host adapters and bundled guest + run: npm run test:browser + - name: Retain browser diagnostics + if: always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: stitch-browser-${{ github.sha }} + path: | + verification-output/browser/ + if-no-files-found: warn + model: + runs-on: ubuntu-24.04 + timeout-minutes: 55 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 + with: + node-version: '24' + cache: npm + - run: npm ci --ignore-scripts + - name: Load the exact SDK identity + run: | + node -e 'const fs=require("fs");const x=JSON.parse(fs.readFileSync("prismpm.lock"));if(!/^ghcr\.io\/uor-foundation\/[a-z0-9-]+@sha256:[0-9a-f]{64}$/.test(x.sdk_image))throw Error("unpinned SDK");fs.appendFileSync(process.env.GITHUB_ENV,`SDK_IMAGE=${x.sdk_image}\n`)' + - name: Require committed authoring inputs before downloading the SDK + run: | + test -f app/lexlean.lock + test -n "$(git ls-files app/lexlean.lock)" + - name: Prepare SDK runner + run: | + docker pull "$SDK_IMAGE" + mkdir -p verification-output + cat > "$RUNNER_TEMP/run-sdk" <<'SH' + #!/bin/sh + set -eu + docker run --rm --user "$(id -u):$(id -g)" \ + --group-add "$(stat -c '%g' /var/run/docker.sock)" \ + --tmpfs /tmp:rw,exec,nosuid,size=3g \ + --volume "$PWD:$PWD" --workdir "$PWD" \ + --volume /var/run/docker.sock:/var/run/docker.sock \ + --env HOME=/tmp/prismpm-home --env PRISMPM_EPHEMERAL_HOME=1 \ + "$SDK_IMAGE" "$@" + SH + chmod +x "$RUNNER_TEMP/run-sdk" + - name: Record pinned SDK versions + run: | + "$RUNNER_TEMP/run-sdk" sh -c 'lexlean --version; lean --version; prismpm --version' | tee verification-output/compiler-identity.log + - name: Verify exact canonical source, Lean proofs and Prism artifact + run: | + set -o pipefail + "$RUNNER_TEMP/run-sdk" sh scripts/check-model-sdk.sh --check 2>&1 | tee verification-output/verify.log + git diff --exit-code + - name: Retain exact diagnostics and generated model evidence + if: always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: stitch-model-${{ github.sha }} + include-hidden-files: true + path: | + verification-output/ + app/src/ + app/language/ + app/lexlean.lock + app/.lexlean/ + app/.prism/ + src/layer1-uor/generated-model.js + if-no-files-found: error diff --git a/.github/workflows/source-authoring.yml b/.github/workflows/source-authoring.yml new file mode 100644 index 0000000..4dd41b1 --- /dev/null +++ b/.github/workflows/source-authoring.yml @@ -0,0 +1,72 @@ +name: Stitch source authoring artifact +on: + push: + branches: [feat/complete-stitch-prism] + workflow_dispatch: +permissions: + contents: read +concurrency: + group: stitch-source-authoring-${{ github.ref }} + cancel-in-progress: true +jobs: + source-authoring: + if: github.repository == 'afflom/stitch' && github.ref == 'refs/heads/feat/complete-stitch-prism' + runs-on: ubuntu-24.04 + timeout-minutes: 55 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 + with: + node-version: '24' + cache: npm + - run: npm ci --ignore-scripts + - name: Record exact source and unchanged SDK pin + shell: bash + run: | + set -euo pipefail + mkdir -p verification-output + node --input-type=module <<'JS' + import fs from 'node:fs'; + import {createHash} from 'node:crypto'; + const bytes=fs.readFileSync('prismpm.lock'), lock=JSON.parse(bytes); + if(!/^ghcr\.io\/uor-foundation\/[a-z0-9-]+@sha256:[0-9a-f]{64}$/.test(lock.sdk_image))throw Error('unpinned SDK'); + fs.appendFileSync(process.env.GITHUB_ENV,`SDK_IMAGE=${lock.sdk_image}\n`); + fs.writeFileSync('verification-output/authoring-input.json',JSON.stringify({ + scope:'Source authoring only; not native Prism acceptance',revision:process.env.GITHUB_SHA, + sdk_image:lock.sdk_image,lock_sha256:createHash('sha256').update(bytes).digest('hex') + },null,2)+'\n'); + JS + - name: Run actual pinned authoring and source verification + shell: bash + run: | + set -euo pipefail + bash scripts/author-source.sh 2>&1 | tee verification-output/authoring.log + - name: Check generated source and host projections + run: npm test + - name: Retain the exact authoring patch, including failure diagnostics + if: always() + shell: bash + run: | + mkdir -p verification-output + git diff --binary --full-index > verification-output/authoring.patch + git status --short > verification-output/authoring-status.txt + git diff --check + - name: Upload source authoring output for review, never push it + if: always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: stitch-source-authoring-${{ github.sha }} + include-hidden-files: true + path: | + verification-output/ + app/src/ + app/language/ + app/lexlean.lock + app/.lexlean/ + .lexlean/axioms/ + product/ + site/facets.json + src/layer1-uor/generated-model.js + if-no-files-found: error diff --git a/.gitignore b/.gitignore index 2747ec0..bd22d0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,12 @@ /target /node_modules *.log + +node_modules/ +app/.lexlean/ +app/.prism/ +app/.lake/ +verification-output/ + +# Official prism-code axiom-probe diagnostics, retained by the authoring workflow. +/.lexlean/ diff --git a/CONTRACT.json b/CONTRACT.json index 865ce4c..bae310e 100644 --- a/CONTRACT.json +++ b/CONTRACT.json @@ -1,5 +1,5 @@ { - "contract_version": "1.0.0", + "contract_version": "1.1.0", "frozen_before_run": true, "definitions": { "staleness_event": "A connection attempt or liveness probe that resolves or targets an expired/dead endpoint while the peer is reachable at a newer state.", @@ -7,15 +7,21 @@ }, "thresholds": { "C1_min_trials_per_class": 30, - "C1_min_direct_success_rate": 0.60, + "C1_min_direct_success_rate": 0.6, "C1_max_median_ice_setup_sec": 10.0, - "C2_ttl_range_sec": [30, 60], + "C2_ttl_range_sec": [ + 30, + 60 + ], "C2_max_staleness_multiplier": 2.0, - "C2_max_violation_fraction": 0.20, + "C2_max_violation_fraction": 0.2, "C3_min_paired_runs": 3, "C3_alpha": 0.05, "C3_equal_refresh_budget_per_600s": 30, - "C4_cv_bounds": [0.5, 2.0], + "C4_cv_bounds": [ + 0.5, + 2.0 + ], "C5_max_sustained_updates_per_hour": 12, "C5_kill_updates_per_hour": 24, "C5_min_keepalive_floor_sec": 5.0, @@ -24,15 +30,51 @@ "C10_max_dns_record_bytes": 1024 }, "claim_status": { - "C1": { "status": "UNTESTED", "note": "Requires N>=30 live trials across distinct physical network pairs (home<->mobile, home<->cloud) with TURN disabled." }, - "C2": { "status": "BLOCKED", "note": "Browser fetch/DoH cannot inspect OS/ISP recursive cache state directly without authoritative DNS write credentials + epoch subdomain probes." }, - "C3": { "status": "PARTIAL_REFUTED_ON_UNIFORM", "note": "At equal refresh budget (B=30), Poisson/Entropy schedulers lose to Fixed-Interval under uniform/stationary churn and only win when churn is regime-switching." }, - "C4": { "status": "REFUTED_ON_PERIODIC", "note": "Periodic drops (CV=0.0) violate exponential memorylessness [0.5, 2.0]; requires Weibull/regime model for bursty network drops." }, - "C5": { "status": "BLOCKED", "note": "Browsers cannot speak BGP (TCP 179 / WireGuard); requires external DN42 Linux daemon running BIRD/FRR." }, - "C6": { "status": "REFUTED_WITHOUT_RELAY", "note": "WebRTC ICE exchange requires at least a transient signaling relay (e.g. ntfy.sh) or DNS TXT dynamic update; pure static pages without a relay cannot exchange SDP." }, - "C7": { "status": "VERIFIED", "note": "Hot (5s heartbeat), Warm (30-60s DNS TTL), Route (180s BGP hold), and Cold (3600s+ manifest) separate by >5x per tier." }, - "C8": { "status": "VERIFIED", "note": "UOR 128-bit/256-bit content fingerprint + signature verification takes <0.1ms in browser and fits in <180 bytes of TXT." }, - "C9": { "status": "VERIFIED", "note": "Zero global BGP announcements; all routing tests confined to local/overlay namespaces." }, - "C10": { "status": "VERIFIED", "note": "DNS TXT pointers capped at <255 bytes; bulk shards and VM execution stay strictly on peer edges." } + "C1": { + "status": "UNTESTED", + "note": "Requires N>=30 live trials across distinct physical network pairs (home<->mobile, home<->cloud) with TURN disabled." + }, + "C2": { + "status": "BLOCKED", + "note": "Browser fetch/DoH cannot inspect OS/ISP recursive cache state directly without authoritative DNS write credentials + epoch subdomain probes." + }, + "C3": { + "status": "PARTIAL_REFUTED_ON_UNIFORM", + "note": "At equal refresh budget (B=30), Poisson/Entropy schedulers lose to Fixed-Interval under uniform/stationary churn and only win when churn is regime-switching." + }, + "C4": { + "status": "REFUTED_ON_PERIODIC", + "note": "Periodic drops (CV=0.0) violate exponential memorylessness [0.5, 2.0]; requires Weibull/regime model for bursty network drops." + }, + "C5": { + "status": "BLOCKED", + "note": "Browsers cannot speak BGP (TCP 179 / WireGuard); requires external DN42 Linux daemon running BIRD/FRR." + }, + "C6": { + "status": "REFUTED_WITHOUT_RELAY", + "note": "WebRTC ICE exchange requires at least a transient signaling relay (e.g. ntfy.sh) or DNS TXT dynamic update; pure static pages without a relay cannot exchange SDP." + }, + "C7": { + "status": "SPECIFIED_NOT_FIELD_MEASURED", + "note": "Illustrative layer timescales are configuration, not a measured separation guarantee; browsers do not speak BGP." + }, + "C8": { + "status": "IMPLEMENTATION_TESTED", + "note": "Signature round trips and full content digests are tested. Latency and ownership trust require separate evidence; session-key self-verification is not authority." + }, + "C9": { + "status": "IMPLEMENTATION_SCOPE", + "note": "No browser BGP implementation; overlay discovery and peer/relay transfers only." + }, + "C10": { + "status": "IMPLEMENTATION_TESTED", + "note": "Full object roots are never truncated. DNS serialization has explicit size bounds; bulk data remains at peers or an explicitly enabled public relay." + } + }, + "prism_model": { + "source": "app/src", + "runtime_bindings": "src/layer1-uor/generated-model.js", + "scope": "Pure admission, reconstruction relations and deterministic computation. Host bytes, crypto, clocks, peer assertions and network effects have explicit boundaries.", + "claim_register": "docs/prism-model.md" } } diff --git a/Makefile b/Makefile index 52be27f..1e10c67 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,11 @@ test: test-js test-rust test-js: - node tests/run_all.js + npm test + python3 scripts/verify-custody.py test-rust: - cargo test --quiet + cargo test --locked --quiet serve: python3 -m http.server 8080 diff --git a/README.md b/README.md index febfc42..4c5f274 100644 --- a/README.md +++ b/README.md @@ -1,136 +1,110 @@ -# stitch +# Stitch -> **Stratified Routing-Layer Persistence, UOR Content-Addressed Ephemeral Storage, and Distributed Compute** -> Strict functional isolation across 5 testable layers with empirical head-to-head algorithm benchmarks. +Recover exact objects and resume deterministic computation while the available peers change. -**Browser Benchmark & Telemetry Console (Zero Setup):** [https://syntra-labs.github.io/stitch/](https://syntra-labs.github.io/stitch/) +Stitch retains its five layers: object/ring operations, scheduling, storage, compute, and transport. A Prism/LexLean model defines the state and acceptance rules across those layers. The browser applies model-derived admission predicates and independently checks bytes and execution before accepting them. ---- +## Start here -## 1. Stratified Architecture & Isolation Rules +Stitch is a browser-based experiment in recovering exact data and continuing deterministic work while peers change. It combines five layers: identity and operations, scheduling, storage, compute, and transport. It does not turn internet routers into storage or guarantee survival after every copy is lost. -![stitch 5-Layer Architecture & Public Control-Plane Dataflow](./docs/architecture.svg) -*(Source PlantUML: [`docs/architecture.puml`](./docs/architecture.puml) | Pre-Registered Falsification Contract: [`CONTRACT.json`](./CONTRACT.json))* +![Stitch recovery path: an object splits into A, B and parity; A and parity recover the exact object when B is unavailable.](site/stitch-fabric.svg) -The repository is divided into five strictly isolated strata. Each layer `L_k` may only import from `L_ Bytes) | -| - Tested under 100% node turnover (zero surviving initial nodes) | -+-------------------------------------------------------------------------+ - | -+-------------------------------------------------------------------------+ -| Layer 2: Liveness & Refresh Schedulers (src/layer2-schedulers/) | -| - Failure rate estimation (lambda), survival probability P(t), H(p) | -| - Compares Fixed-Interval, AIMD, Poisson-Survival, Entropy-Hysteresis | -+-------------------------------------------------------------------------+ - | -+-------------------------------------------------------------------------+ -| Layer 1: UOR Content Addressing & Ring Kernel (src/layer1-uor/, lib.rs) | -| - Direct Rust conformance binding to `uor-foundation = "0.5.2"` | -| - Z/(2^n)Z Datum ring ops, Hasher substitution axis, Trace verifier | -+-------------------------------------------------------------------------+ -``` +1. **Commit to the bytes.** A full SHA-256 commitment identifies the object. Its filename is only a label. +2. **Distribute compatible fragments.** Stitch creates two byte halves and an XOR parity fragment. A request to store one is not a checked receipt from a holder. +3. **Recover and verify.** Any two distinct, compatible fragments can reconstruct the object. Stitch checks their commitments and the reconstructed bytes before accepting the result. Enough information must remain reachable. ---- +### Continue a pure job -## 2. Layer-by-Layer Candidate Comparisons & Empirical Results +A checkpoint carries the identified program, input and execution state. Stitch replays that state before continuing, so a plausible-looking but impossible checkpoint is refused. This applies to deterministic ring programs, not arbitrary Linux VM effects. Partitions may duplicate pure computation. -Run all unit assertions and comparative benchmarks locally with: +### Choose your route -```bash -make test -``` +- **[Try it in the browser](https://syntra-labs.github.io/stitch/):** change a message, withhold a fragment or alter a byte in a local example. Then open the live operator console if you want to use the network. +- **[Understand the protocol](docs/prism-model.md):** read the object, custody, pointer, computation and resource contracts, with their assumptions and nonclaims. +- **[Inspect the product model](app/src/Product/):** follow the typed source and the source-derived facet inventory on the site. Inventory coverage is not proof acceptance. +- **[Run locally](#run-and-test):** install dependencies, serve the repository and run its checks. -### Layer 1 — UOR Content-Addressing (`uor-foundation = "0.5.2"`) +The local example uses Stitch's actual object/fragment verifier without joining a mesh or sending its text. Withholding a fragment models unavailable information, not a real peer failure. The live console has separate opt-ins for public signaling and public object relay. Publishing sufficient fragments reveals their content. -Directly binds [`uor-foundation = "0.5.2"`](https://github.com/UOR-Foundation/UOR-Framework) in [`src/lib.rs`](src/lib.rs) and verifies bit-identical output with [`src/layer1-uor/index.js`](src/layer1-uor/index.js) (`Fnv1aHasher16` digest of `[1, 2, 3, 4]` = `0x66a5cdda2e757277b806e89ae7615aa5`). +The [reader experience contract](docs/reader-experience.md) documents the resolution-independent illustration, local example, accessibility, bounded inputs and test coverage. Implementation details and exact evidence boundaries follow below. -| Hasher Candidate | Output Width (B) | Samples (64B) | Collisions | Throughput (ops/s) | Throughput (MB/s) | -| :--- | ---: | ---: | ---: | ---: | ---: | -| **`UOR-Fnv1aHasher16`** | 16 | 1,000 | 0 | ~119,700 | ~7.31 | -| **`UOR-Fnv1aHasher32`** | 32 | 1,000 | 0 | ~90,000 | ~5.49 | -| **`SHA-256`** | 32 | 1,000 | 0 | ~85,700 | ~5.23 | +## What changed ---- +- **Objects have full cryptographic commitments.** Canonical manifests bind raw encoding, byte lengths, indexed XOR fragments and every required dependency. Legacy FNV addresses remain in regression/conformance simulations. +- **Placement is explicit.** Requested transfers are not stored copies. Acknowledgments bind checked fragment bytes to a request and holder. Selected retained objects can be repaired as peers join, leave or renew leases. Only fresh, checked receipts activate replacements; uncertain and superseded copies stay accounted until exact release confirmation. Committed placement and expiry remain separate observations. Different peer IDs do not prove independent failure domains. +- **Jobs carry their program and input.** Every checkpoint is digest-checked and semantically replayed through model-derived ring operations. A well-formed but impossible state is refused. Versioned programs include full-width modular POW and width-tracked byte CONCAT with explicit capacity/work admission. This does not certify arbitrary Linux VM effects. +- **Pointers have a single-writer contract.** A separately pinned Ed25519 authority, full object root, exact revision/predecessor and validity interval are required. Observer-local admission is not consensus. +- **Policies propose; admission enforces limits.** Multidimensional budgets reserve before effects. Ambiguous effects remain charged. The live refresh scheduler uses elapsed monotonic time and enforces its own cap. +- **Host failures have explicit recovery paths.** Mesh generations reject stale callbacks, DNS publication reconciles unknown writes before another mutation, and failed VM startup can be explicitly retried. +- **The operator interface follows modeled journeys.** Relevant controls, persistent labels and local results appear for the current journey. Restarted publication and every retained VM command have explicit reconciliation paths; shell output has a text view. +- **Internet formats are implemented at the byte boundary.** JCS input/encoding, DNS-message DoH and bounded ntfy framing replace the earlier partial formats. Concrete interoperability tests remain distinct from browser/provider qualification. +- **The public relay is opt-in.** Publishing sufficient fragments or a checkpoint discloses its content. A channel name is not a privacy control. -### Layer 2 — Pointer & Route Refresh Schedulers (Claim C3/C4 Equal-Budget Protocol) +Origin-local signing authority, explicitly accepted exact trust anchors and publication intent can be restored after reload. [Browser authority controls](docs/browser-authority.md) provide explicit local key rotation/revocation, independently confirmed anchor migration and conservative storage/journal care. This is not a private-key backup, cross-device authority or protection against origin storage loss. -Evaluated over a 600-second window with record `TTL = 60s` and an **equal refresh budget cap ($B = 30$ refreshes)** across regime-switching churn ($CV = 1.149$): +See the [operator journeys](docs/operator-experience.md), [lifecycle bindings](docs/lifecycle-effects.md), [JCS codec](docs/canonical-json.md), [DNS client](docs/dns-client.md), and [relay framing](docs/relay-framing.md). -| Scheduler Policy | Refreshes Issued | Staleness Events | Unavailable Time (s) | Availability Ratio | Mean Recovery Lag (s) | -| :--- | ---: | ---: | ---: | ---: | ---: | -| **`Fixed-Interval (TTL/2)`** | 30 | 15 | 203 | 66.17% | 13.53 | -| **`Adaptive-AIMD`** | 30 | 11 | 181 | 69.83% | 3.60 | -| **`Poisson-Survival` (Unpaced — Refuted by C3)** | 30 | 4 | 336 | 44.00% | 1.33 | -| **`Entropy-Hysteresis` (Unpaced — Refuted by C3)** | 30 | 3 | 408 | 32.00% | 2.00 | -| **`Budget-Paced-Survival` (Cauchy-Schwarz $\sqrt{\hat{\lambda}}$)** | **30** | **16** | **175** | **70.83%** | **9.20** | +Read the [model contract and evidence boundaries](docs/prism-model.md), the [product projection and host contracts](docs/product-projection.md), and the [vendor provenance findings](docs/vendor-provenance.md). [Historical benchmarks](docs/legacy-benchmarks.md) remain available with their limitations. The existing [falsification contract](CONTRACT.json) is retained rather than relabeling simulation as network proof. -*Falsification Finding (C3/C4):* Under an equal refresh budget ($B=30$), unpaced `Poisson-Survival` and `Entropy-Hysteresis` clamp to the 5s minimum floor and exhaust all 30 refreshes in the first 150 seconds, losing to `Fixed-Interval`. Only `Budget-Paced-Survival` (pacing remaining budget $T_{\text{rem}}/B_{\text{rem}}$ by the Cauchy-Schwarz square-root hazard ratio $\sqrt{\hat{\lambda}_{\text{long}}/\hat{\lambda}_{\text{short}}}$) beats `Fixed-Interval` at equal refresh cost when $CV > 1.0$. +## Run and test ---- +Node.js 22 or later: -### Layer 3 — Ephemeral UOR Database Under 100% Node Turnover +```sh +npm ci --ignore-scripts +npm test +python3 scripts/verify-custody.py +make serve +``` -Strict zero-disk persistence test: 24 UOR content-addressed objects (256B each) are written to 5 initial nodes at $t=0$. Over 8 churn generations, 2 new nodes join and the 2 oldest nodes are hard-killed per generation until **0 initial nodes remain alive**: +Open `http://localhost:8080`. Join a mesh to exchange data with peers. Enable the public relay only for intentionally public demonstration data. Fewer than three eligible remote peers means partial placement, not fabricated redundancy. -| Storage & Repair Strategy | Initial Nodes Remaining | Objects Recovered | Retention Rate | Storage Amplification | Network Bytes | Repair Ops | -| :--- | ---: | ---: | ---: | ---: | ---: | ---: | -| **`Unreplicated (R=1)`** | 0 | 0 / 24 | 0.0% | 1.0x | 6,144 B | 0 | -| **`Reactive Mirror (R=3)`** | 0 | 0 / 24 | 0.0% | 3.0x | 18,432 B | 0 | -| **`Proactive XOR Parity (2-of-3 + Survival)`** | 0 | 24 / 24 | **100.0%** | **1.5x** | 82,944 B | 576 | +The original Rust UOR conformance check is `cargo test --locked`. Node/Python runtime checks and Rust conformance passed in [the initial fork CI run](https://github.com/afflom/stitch/actions/runs/42797265770); its formal SDK stage did not pass. -*Finding:* Reactive full mirroring (`3.0x` storage cost) loses blocks when simultaneous node drops occur between scrub cycles, whereas survival-guided proactive migration with 2-of-3 XOR parity (`1.5x` storage cost) retains **100% of objects** across complete cohort replacement. +For input revision `6c393bf736e316a9f58db38a3cc498948bd226fe`, [source authoring run 43451144439](https://github.com/afflom/stitch/actions/runs/43451144439) used the unchanged pinned SDK, formatted zero modules, passed the actual Prism projection check and verified all **38 modules**, including the expanded product facets, with LexLean/Lean/leanchecker and exact axiom policies. The [retained exact-source summary](product/source-verification.json) and [original verifier attestation](product/source-attestation.json) record 1,910 successful declaration audits and 124 successful proof processes. With its generated source lock and retained evidence, that authoring run passed all **419 JavaScript tests** and all five strata. ---- +[Actual Chromium qualification on the same input revision](https://github.com/afflom/stitch/actions/runs/43451144395/job/131973315941) passed **14 scenarios**, including reader interactions, authenticated WebRTC recovery, browser authority persistence and real guest lifecycle behavior. These results do not qualify other browsers, physical NAT topologies or a replacement guest. **Native Prism artifact acceptance remains pending**; source proof and browser tests do not clear the separate old-SDK native-build issue. This remains a development checkpoint, not a qualified release. -### Layer 4 — Distributed UOR Compute Engine Under Worker Churn +`make test` runs Node and Rust checks. The default JavaScript suite includes in-process transports and real bundled-v86 guest execution. Dedicated hosted Chromium scenarios exercise native browser behavior; neither substitutes for physical WebRTC/NAT trials. -Executes 20 deterministic programs (each consisting of 24 $\mathbb{Z}/(2^{64})\mathbb{Z}$ `PrimitiveOp` ring instructions) across churning workers that drop every 9 steps, verifying every final output with `verifyTrace`: +## Model and verification -| Execution & Fault-Tolerance Strategy | Tasks Completed | Mean Latency (ticks) | Total Ring Ops | Wasted Ring Ops | Checkpoints Written | Trace Verified Rate | -| :--- | ---: | ---: | ---: | ---: | ---: | ---: | -| **`Single-Worker Restart (No Checkpoint)`** | 20 / 20 | 33.0 | 660 | 180 | 0 | 100.0% | -| **`Speculative 2x Quorum (Active-Active)`** | 20 / 20 | 24.0 | 660 | 180 | 0 | 100.0% | -| **`Survival-Checkpointed UOR Trace`** | 20 / 20 | **24.0** | **480** | **0** | 60 | **100.0%** | +- `app/src/Stitch/`: typed domain models and theorem obligations. +- `app/src/Product/`: component/flow, capability, deployment and dependency contracts plus the expanded product facets. See [complete Prism coverage and evidence boundaries](docs/complete-prism.md) and the [source-derived facet catalog](product/facets.json); catalog coverage is not verification acceptance. +- `product/contracts.json`: source-bound project-owned contract/asset inventory, not a certificate. +- `app/language/`: versioned project vocabulary using LexLean extensibility. +- `src/layer1-uor/generated-model.js`: pure behavior extracted from the model with exact source binding. It is an application adapter, not a replacement Prism compiler or proof certificate. +- `scripts/check-model.mjs`: validates/regenerates the adapter and detects drift. +- `prismpm.lock`, `standards.lock`: exact SDK/standards pins from the official Prism template. +- `.github/workflows/prism.yml`: runtime conformance and SDK model verification on the submitted revision. -*Finding:* Checkpointing intermediate `(stepIndex, Datum, TraceEvent[])` into the Layer-3 UOR store when worker survival probability $P(\text{alive at } t) \le 0.60$ achieves the same minimum latency as $2\times$ active-active replication (`24.0` ticks) while eliminating **100% of wasted ring operations** (`480` vs `660` ops). +```sh +node scripts/check-model.mjs +sh scripts/check-model-sdk.sh +``` ---- +The second command requires the pinned SDK environment. It must run real LexLean/Lean and PrismPM gates; extraction or runtime tests alone do not establish that theorems compiled. No externally hosted verifier is required. Formal acceptance is reported only from an actual successful SDK run. See the [native build diagnosis and passing-project comparison](docs/native-build-diagnosis.md) for the reproduced compiler issue; no native gate was replaced or weakened. -## 3. Repository Layout +### Retain source evidence +After actual pinned verification succeeds, use its original success log to select the exact attestation and the build manifest it binds: + +```sh +node scripts/retain-authoring-evidence.mjs verification-output/lexlean-verify.stdout.log +node scripts/check-source-evidence.mjs ``` -stitch/ -├── Cargo.toml # Official uor-foundation = "0.5.2" Rust dependency -├── Makefile # Runs both Node stratum benchmarks and Cargo conformance tests -├── package.json # ES module manifest -├── index.html # Utilitarian browser benchmark & telemetry console -├── src/ -│ ├── lib.rs # Rust uor-foundation v0.5.2 conformance library & test -│ ├── layer1-uor/index.js # Layer 1: Z/(2^n)Z Datum, PrimitiveOp, Hasher axis, verifyTrace -│ ├── layer2-schedulers/index.js # Layer 2: Fixed, AIMD, Poisson-Survival, Entropy-Hysteresis -│ ├── layer3-storage/index.js # Layer 3: Unreplicated, Reactive R=3, Proactive 2-of-3 Parity DB -│ ├── layer4-compute/index.js # Layer 4: Restart, 2x Quorum, Survival-Checkpointed Compute -│ └── layer5-transport/index.js # Layer 5: RFC 8484 DoH (SRV/TXT) & WebRTC DataChannel -└── tests/ - └── run_all.js # Isolated unit assertions & comparative table runner -``` + +The helper preserves both input files byte-for-byte and derives `product/source-verification.json` from their records and current inputs. It validates source and lexicon digests, workspace coverage, proof results and pinned tool identities before replacing retained files. The summary is replaced last, so an interrupted multi-file replacement fails the consistency check rather than claiming success. Use only the actual verifier's emitted records: this is retention, not a verifier or a way to authenticate arbitrary JSON. Native Prism acceptance and its artifacts remain separate; capturing the current `app/prism.toml` and `app/prismpm.toml` for later freshness checks does not certify them. + +## Nonclaims + +SHA-256 and Ed25519 establish integrity and signature validity under their security assumptions, not retention or honest peer identity. DNS is discovery, not globally ordered state. The browser VM, STUN, WebRTC, DNS, signaling, relay availability and clocks remain modeled host boundaries. + +This implementation does not claim private relay storage, persistence after total information loss, exclusive job ownership during partitions, exactly-once effects, multi-writer consistency, optimal scheduling, or storage inside internet routers. New encodings, policies and transports must preserve admission obligations and disclose dependencies. ## License -MIT © [Syntra Labs](https://github.com/Syntra-Labs) +Project source: MIT © [Syntra Labs](https://github.com/Syntra-Labs). Bundled third-party assets retain their respective licenses; see the [provenance and packaging status](docs/vendor-provenance.md) before redistribution. diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..96c6dd4 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1,3 @@ +.lexlean/ +.prism/ +.lake/ diff --git a/app/README.md b/app/README.md new file mode 100644 index 0000000..fa5060a --- /dev/null +++ b/app/README.md @@ -0,0 +1,143 @@ +# Stitch source model + +This is Stitch's project-owned LexLean 1.2 model and `stitch.domain` language +extension. It is not a specification of the whole internet or a proof of the +browser, WebRTC, DNS, a relay, arbitrary VM effects, indefinite retention, or +policy optimality. + +## Domain graph + +- `Identity`: immutable canonical bytes, byte length, eight full 32-bit digest + words, and domain/canonicalization-bound digest observations. The legacy + truncated FNV address is not a cryptographic identity. +- `Encoding`: representation identity distinct from object identity, decoder, + dependency kind/presence/integrity, exact byte recovery, and complete recovery + byte accounting including external basis bytes. +- `Fragments`: indexed manifest-bound fragments; duplicate-index refusal; + XOR bit-plane recovery from systematic/left-parity/right-parity pairs. The + inductive bit-stream definitions cover every finite bit stream, rather than + only one example object. Byte layout, padding and commitments have independent + cross-language runtime vectors. +- `Custody`: requested, acknowledged, committed, failed and uncertain transfers; + exact request/manifest/fragment/index/holder/lease receipt binding; distinct + holders; and indexed migration/retirement transitions. Requests and uncertain + transfers do not establish completed custody. A receipt is not proof of future + reachability. +- `Observation`: observer-relative reachability, sequence and elapsed-time + freshness. A timeout does not assert permanent death. +- `Budget`: four independent resource dimensions, monotonic elapsed epochs, + reserve-before-effect admission and conservative settlement. Unknown outcomes + retain their entire reservation. No heuristic can change the bound. +- `Pointer`: a pinned single writer, full successor/predecessor bindings, exactly + one revision increment and half-open validity intervals. A signature-valid + observation does not establish the authority of an arbitrary key. Explicit + local recovery requires the separately accepted exact recent vault anchor and + matching independent live pin; no different retained head is overwritten. +- `Compute`: a concrete deterministic ring-instruction evaluator, all supported + opcodes and widths, checkpoint program/input/model/predecessor/replay bindings, + strict step advancement and uninterrupted/continued execution equivalence. + POW uses bounded modular square-and-multiply. Version 2 typed programs add + capacity-bound byte-sequence CONCAT and explicit result widths, including + non-power-of-two widths and empty sequences. Version 1 DIV/MOD by zero retain + Stitch's defined legacy zero result. See [primitive semantics](../docs/uor-primitives.md). +- `Effects`: correlated mesh/VM generations, DNS unknown-write reconciliation and honest C1 measurement transitions, bound to actual host callbacks. +- `Relay`: frame admission, assembly counters, deadlines, delivery and disclosure guards. Hash/UTF8 observations and the indexed-buffer representation remain explicit host adapter responsibilities. +- `Product.Experience`: actual browser journeys, evidence views, action guards and context-sensitive disclosure/navigation policy. +- `Evidence`: separate claim kinds and evidence levels, bounded reuse, explicit + host effects and named external assumptions. +- `System`: the product state, budgeted requests with custody/evidence frame + conditions, and a concrete invariant-preserving migration transition. No + caller-supplied “preservation passed” flag serves as the preservation proof. + +## What executes + +The browser runtime imports `src/layer1-uor/generated-model.js`, reproduced by +`node scripts/check-model.mjs --write`. Its closed Nat/Bool/record/list/inductive +subset is evaluated with BigInt. Program replay executes the source-model +`Stitch.Compute.ringStep`, and budget, pointer, checkpoint and custody admission +use the same source-derived predicates. Unsupported translator syntax fails. +The generator binds every source and language-extension file into +`modelSourceDigest` for provenance. Checkpoints bind the separate +`modelExecutionDigest`: reachable replay semantics and exact transitive adapter +bytes. Unrelated model/proof/UI changes need not invalidate execution identity; +changed replay adapters do. Old checkpoints are never silently relabeled. + +This subset translator is not LexLean, a semantic type checker, Lean, a Prism +compiler, an axiom audit, or a certificate. Its freshness check, generated-code +corpus and independent runtime oracles are implementation evidence. They do not +substitute for the exact SDK gate. + +`StitchApp` is explicitly a **conformance probe**, not a full network application. +It builds a source-derived pure WASM probe with 128-bit ring values and u64 +admission quantities. Its receipt/signature flags are observations supplied by +the host, not a crypto implementation. The probe has no host capabilities. + +## Proof and trust boundary + +The source contains stated reconstruction, admission/refusal, reservation, +settlement, migration/frame, pointer-order and continuation obligations with +explicit proof terms. A theorem is kernel-verified only after `lexlean verify` +succeeds for its exact source and axiom policy. Native artifact qualification +separately requires the full PrismPM build. The [source-verification summary](../product/source-verification.json) records the checked20-module closure and exact hashes. +A checked source theorem is still not evidence that separately handwritten +network/crypto/browser adapters implement every assumption. + +Cryptographic collision resistance, signature unforgeability, pinned-authority +bootstrap, receipt authentication, retention through a declared lease, +independent failure domains, a suitable clock, and source/artifact conformance +are explicitly external. Formal records never set these assumptions to true on +behalf of a host. No finite custody condition guarantees indefinite retention. + +## Reproduction + +The repository's `prismpm.lock` and `standards.lock` are copied byte-identically +from the reviewed official template. Use only the immutable SDK that lock names. +There is no handwritten `.holo` or fabricated verification record. + +Authoring, inside that SDK: + +1. `sh scripts/check-model-sdk.sh --prepare` writes the real source lock and + canonical formatting, then checks the source. +2. On the Docker-capable runner, `npx prism-code@0.7.2 axioms --write --project app` + derives exact policies from Lean's observed axiom sets. Review that diff. Do + not invent axiom allowances or weaken the verifier to get green output. +3. `node scripts/check-model.mjs --write` reproduces the source bindings after + canonicalization/auditing. Review and commit the canonical source, actual + lock, exact axiom policies and generated bindings together. +4. `sh scripts/check-model-sdk.sh --check` is read-only: SDK lock/standards, + binding freshness, canonical source and source lock, then the full PrismPM + verification, which owns LexLean checking, Lean and leanchecker verification, + native build and acceptance vectors. No separate proof build repeats it. + +Prepare output is an authoring artifact, not a release. The source lock is +produced by the actual pinned LexLean compiler. CI refuses absent committed +authoring inputs before downloading the SDK; it never rewrites source or axiom +policies to make a submission pass. The gate refuses stale locks and unreviewed +source changes. + +The hosted LexLean service receives publicly unlisted source. This project does +not send the user's private architecture input or invoke that service without +specific authorization. The fork's pinned-SDK Actions job is the intended build +route when the local machine lacks Docker/LexLean. + +## Probe wire contract + +All multibyte integers are unsigned, big-endian. Every request begins with +version byte `1` and operation byte. Lengths and Boolean flag bytes are checked +exactly; Boolean flags must be `0` or `1`. Responses are UTF-8 decimal values, +`admit`, `refuse`, or a typed error string. The model is over mathematical Nat; +the u64/u128 probe fields are a wire representation, not semantic budget limits. + +- `0` (36 bytes): width byte, opcode byte, 16-byte input, 16-byte argument. + Widths are 8/16/32/64/128. Operands are normalized in that ring. +- `1` (58 bytes): seven u64 fields: spent, reserved, cost, limit, now, last, end. +- `2` (45 bytes): current/next revision u64s; predecessor, authority and signature + observation flags; not-before, expiry and now u64s. +- `3` (10 bytes): eight flags: requested, acknowledged, matching manifest, + matching fragment, matching holder, live lease, current source, distinct target. +- `4` (7 bytes): two fragment-index bytes and matching manifest, valid-fragments, + dependencies-present flags. + +The probe's request maximum 58 is derived from these fixed records. Its 512-byte +allocation bound is the inherited SDK resource envelope, not a storage/network +claim; a unique 512-byte rejection vector exercises that boundary. diff --git a/app/lake-manifest.json b/app/lake-manifest.json new file mode 100644 index 0000000..b6674e4 --- /dev/null +++ b/app/lake-manifest.json @@ -0,0 +1 @@ +{"version":"1.2.0","packagesDir":".lake/packages","packages":[],"name":"StitchModel","lakeDir":".lake","fixedToolchain":false} diff --git a/app/lakefile.toml b/app/lakefile.toml new file mode 100644 index 0000000..9f91cb7 --- /dev/null +++ b/app/lakefile.toml @@ -0,0 +1,6 @@ +name = "StitchModel" +version = "0.3.0" +defaultTargets = ["StitchModel"] + +[[lean_lib]] +name = "StitchModel" diff --git a/app/language/prism.arch/entries/arch-component-kind.toml b/app/language/prism.arch/entries/arch-component-kind.toml new file mode 100644 index 0000000..dbd4780 --- /dev/null +++ b/app/language/prism.arch/entries/arch-component-kind.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-component-kind" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "ComponentKind" + +[[form]] +id = "arch-component-kind" +channel = "text" +surface = "architectural component kind" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-component.toml b/app/language/prism.arch/entries/arch-component.toml new file mode 100644 index 0000000..af43c9c --- /dev/null +++ b/app/language/prism.arch/entries/arch-component.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-component" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "Component" + +[[form]] +id = "arch-component" +channel = "text" +surface = "architectural component" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-concern.toml b/app/language/prism.arch/entries/arch-concern.toml new file mode 100644 index 0000000..75fc2df --- /dev/null +++ b/app/language/prism.arch/entries/arch-concern.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-concern" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "Concern" + +[[form]] +id = "arch-concern" +channel = "text" +surface = "architectural concern" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-edge-kind.toml b/app/language/prism.arch/entries/arch-edge-kind.toml new file mode 100644 index 0000000..ff413a4 --- /dev/null +++ b/app/language/prism.arch/entries/arch-edge-kind.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-edge-kind" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "EdgeKind" + +[[form]] +id = "arch-edge-kind" +channel = "text" +surface = "architectural edge kind" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-edge.toml b/app/language/prism.arch/entries/arch-edge.toml new file mode 100644 index 0000000..64cf40e --- /dev/null +++ b/app/language/prism.arch/entries/arch-edge.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-edge" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "Edge" + +[[form]] +id = "arch-edge" +channel = "text" +surface = "architectural edge" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-model-kind.toml b/app/language/prism.arch/entries/arch-model-kind.toml new file mode 100644 index 0000000..0414bac --- /dev/null +++ b/app/language/prism.arch/entries/arch-model-kind.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-model-kind" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "ModelKind" + +[[form]] +id = "arch-model-kind" +channel = "text" +surface = "architecture model kind" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-stakeholder.toml b/app/language/prism.arch/entries/arch-stakeholder.toml new file mode 100644 index 0000000..c3ff77d --- /dev/null +++ b/app/language/prism.arch/entries/arch-stakeholder.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-stakeholder" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "Stakeholder" + +[[form]] +id = "arch-stakeholder" +channel = "text" +surface = "stakeholder" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-standard-reference.toml b/app/language/prism.arch/entries/arch-standard-reference.toml new file mode 100644 index 0000000..1eac4a3 --- /dev/null +++ b/app/language/prism.arch/entries/arch-standard-reference.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-standard-reference" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "StandardReference" + +[[form]] +id = "arch-standard-reference" +channel = "text" +surface = "standards reference" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-text-application-model.toml b/app/language/prism.arch/entries/arch-text-application-model.toml new file mode 100644 index 0000000..23ca3d9 --- /dev/null +++ b/app/language/prism.arch/entries/arch-text-application-model.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-text-application-model" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.View.Text.V1.Model" +component = "TextApplication" + +[[form]] +id = "arch-text-application-model" +channel = "text" +surface = "Text application model" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-view-class.toml b/app/language/prism.arch/entries/arch-view-class.toml new file mode 100644 index 0000000..a49493d --- /dev/null +++ b/app/language/prism.arch/entries/arch-view-class.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-view-class" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "ViewClass" + +[[form]] +id = "arch-view-class" +channel = "text" +surface = "architecture view class" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-view.toml b/app/language/prism.arch/entries/arch-view.toml new file mode 100644 index 0000000..b75ebfa --- /dev/null +++ b/app/language/prism.arch/entries/arch-view.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-view" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "View" + +[[form]] +id = "arch-view" +channel = "text" +surface = "architecture view" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-viewpoint-class.toml b/app/language/prism.arch/entries/arch-viewpoint-class.toml new file mode 100644 index 0000000..fb12ac4 --- /dev/null +++ b/app/language/prism.arch/entries/arch-viewpoint-class.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-viewpoint-class" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "ViewpointClass" + +[[form]] +id = "arch-viewpoint-class" +channel = "text" +surface = "architecture viewpoint class" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/arch-viewpoint.toml b/app/language/prism.arch/entries/arch-viewpoint.toml new file mode 100644 index 0000000..005fb87 --- /dev/null +++ b/app/language/prism.arch/entries/arch-viewpoint.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "arch-viewpoint" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Arch" +component = "Viewpoint" + +[[form]] +id = "arch-viewpoint" +channel = "text" +surface = "architecture viewpoint" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/holo-flat-validation-input.toml b/app/language/prism.arch/entries/holo-flat-validation-input.toml new file mode 100644 index 0000000..9489644 --- /dev/null +++ b/app/language/prism.arch/entries/holo-flat-validation-input.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "holo-flat-validation-input" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Holo" +component = "FlatValidationInput" + +[[form]] +id = "holo-flat-validation-input" +channel = "text" +surface = "flat validation input" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/holo-normalized-model.toml b/app/language/prism.arch/entries/holo-normalized-model.toml new file mode 100644 index 0000000..919f2c8 --- /dev/null +++ b/app/language/prism.arch/entries/holo-normalized-model.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "holo-normalized-model" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Holo" +component = "NormalizedHolo" + +[[form]] +id = "holo-normalized-model" +channel = "text" +surface = "normalized hologram model" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/holo-standards-profile.toml b/app/language/prism.arch/entries/holo-standards-profile.toml new file mode 100644 index 0000000..dfe9042 --- /dev/null +++ b/app/language/prism.arch/entries/holo-standards-profile.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "holo-standards-profile" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Holo" +component = "StandardsProfile" + +[[form]] +id = "holo-standards-profile" +channel = "text" +surface = "fixed standards profile" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/prism-bounded-byte-buffer.toml b/app/language/prism.arch/entries/prism-bounded-byte-buffer.toml new file mode 100644 index 0000000..745b919 --- /dev/null +++ b/app/language/prism.arch/entries/prism-bounded-byte-buffer.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "prism-bounded-byte-buffer" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Bytes" +component = "BoundedBuffer" + +[[form]] +id = "prism-bounded-byte-buffer" +channel = "text" +surface = "Bounded byte buffer" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/prism-browser-system-model.toml b/app/language/prism.arch/entries/prism-browser-system-model.toml new file mode 100644 index 0000000..8c88467 --- /dev/null +++ b/app/language/prism.arch/entries/prism-browser-system-model.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "prism-browser-system-model" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Production.BrowserSystem" +component = "SystemModel" + +[[form]] +id = "prism-browser-system-model" +channel = "text" +surface = "Browser-resident system model" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/prism-production-system-model.toml b/app/language/prism.arch/entries/prism-production-system-model.toml new file mode 100644 index 0000000..534ab28 --- /dev/null +++ b/app/language/prism.arch/entries/prism-production-system-model.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "prism-production-system-model" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Production.Core" +component = "Component" + +[[form]] +id = "prism-production-system-model" +channel = "text" +surface = "Production system model" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/entries/prism-unicode-text-codec.toml b/app/language/prism.arch/entries/prism-unicode-text-codec.toml new file mode 100644 index 0000000..ad3af5c --- /dev/null +++ b/app/language/prism.arch/entries/prism-unicode-text-codec.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "prism-unicode-text-codec" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Utf8" +component = "encode" + +[[form]] +id = "prism-unicode-text-codec" +channel = "text" +surface = "Unicode text codec" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.arch/lexicon.toml b/app/language/prism.arch/lexicon.toml new file mode 100644 index 0000000..7639a32 --- /dev/null +++ b/app/language/prism.arch/lexicon.toml @@ -0,0 +1,5 @@ +spec = "lexlean/lexicon/1" +package = "prism.arch" +version = "1.0.0" +language = "1.2" +imports = ["lexlean.core@1.2.0", "lexlean.std.bool@1.2.0", "lexlean.std.nat@1.2.0"] diff --git a/app/language/prism.qual/entries/qual-characteristic.toml b/app/language/prism.qual/entries/qual-characteristic.toml new file mode 100644 index 0000000..9db0b43 --- /dev/null +++ b/app/language/prism.qual/entries/qual-characteristic.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "qual-characteristic" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Qual" +component = "ProductQualityCharacteristic" + +[[form]] +id = "qual-characteristic" +channel = "text" +surface = "quality characteristic" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.qual/entries/qual-measure.toml b/app/language/prism.qual/entries/qual-measure.toml new file mode 100644 index 0000000..aff301e --- /dev/null +++ b/app/language/prism.qual/entries/qual-measure.toml @@ -0,0 +1,18 @@ +spec = "lexlean/entry/1" +id = "qual-measure" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Qual" +component = "QualityMeasure" + +[[form]] +id = "qual-measure" +channel = "text" +surface = "quality measure" +canonical_source = true +features = ["sentence-case", "singular"] + diff --git a/app/language/prism.qual/entries/qual-requirement.toml b/app/language/prism.qual/entries/qual-requirement.toml new file mode 100644 index 0000000..562b582 --- /dev/null +++ b/app/language/prism.qual/entries/qual-requirement.toml @@ -0,0 +1,18 @@ +spec = "lexlean/entry/1" +id = "qual-requirement" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Qual" +component = "QualityRequirement" + +[[form]] +id = "qual-requirement" +channel = "text" +surface = "quality requirement" +canonical_source = true +features = ["sentence-case", "singular"] + diff --git a/app/language/prism.qual/entries/qual-subcharacteristic.toml b/app/language/prism.qual/entries/qual-subcharacteristic.toml new file mode 100644 index 0000000..606d912 --- /dev/null +++ b/app/language/prism.qual/entries/qual-subcharacteristic.toml @@ -0,0 +1,18 @@ +spec = "lexlean/entry/1" +id = "qual-subcharacteristic" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Qual" +component = "QualitySubcharacteristic" + +[[form]] +id = "qual-subcharacteristic" +channel = "text" +surface = "quality subcharacteristic" +canonical_source = true +features = ["sentence-case", "singular"] + diff --git a/app/language/prism.qual/lexicon.toml b/app/language/prism.qual/lexicon.toml new file mode 100644 index 0000000..62e4aa8 --- /dev/null +++ b/app/language/prism.qual/lexicon.toml @@ -0,0 +1,5 @@ +spec = "lexlean/lexicon/1" +package = "prism.qual" +version = "1.0.0" +language = "1.2" +imports = ["lexlean.core@1.2.0", "lexlean.std.nat@1.2.0", "prism.arch@1.0.0"] diff --git a/app/language/prism.sec/entries/sec-activity.toml b/app/language/prism.sec/entries/sec-activity.toml new file mode 100644 index 0000000..2420a3d --- /dev/null +++ b/app/language/prism.sec/entries/sec-activity.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "sec-activity" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Sec" +component = "SecurityActivity" + +[[form]] +id = "sec-activity" +channel = "text" +surface = "security activity" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.sec/entries/sec-asset.toml b/app/language/prism.sec/entries/sec-asset.toml new file mode 100644 index 0000000..5ba81fc --- /dev/null +++ b/app/language/prism.sec/entries/sec-asset.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "sec-asset" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Sec" +component = "Asset" + +[[form]] +id = "sec-asset" +channel = "text" +surface = "security asset" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.sec/entries/sec-control.toml b/app/language/prism.sec/entries/sec-control.toml new file mode 100644 index 0000000..290c125 --- /dev/null +++ b/app/language/prism.sec/entries/sec-control.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "sec-control" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Sec" +component = "ApplicationSecurityControl" + +[[form]] +id = "sec-control" +channel = "text" +surface = "security control" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.sec/entries/sec-impact.toml b/app/language/prism.sec/entries/sec-impact.toml new file mode 100644 index 0000000..dcb440e --- /dev/null +++ b/app/language/prism.sec/entries/sec-impact.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "sec-impact" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Sec" +component = "Impact" + +[[form]] +id = "sec-impact" +channel = "text" +surface = "security impact" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.sec/entries/sec-likelihood.toml b/app/language/prism.sec/entries/sec-likelihood.toml new file mode 100644 index 0000000..2bafbea --- /dev/null +++ b/app/language/prism.sec/entries/sec-likelihood.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "sec-likelihood" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Sec" +component = "Likelihood" + +[[form]] +id = "sec-likelihood" +channel = "text" +surface = "security likelihood" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.sec/entries/sec-measurement.toml b/app/language/prism.sec/entries/sec-measurement.toml new file mode 100644 index 0000000..61aae4d --- /dev/null +++ b/app/language/prism.sec/entries/sec-measurement.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "sec-measurement" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Sec" +component = "VerificationMeasurement" + +[[form]] +id = "sec-measurement" +channel = "text" +surface = "security verification measurement" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/prism.sec/entries/sec-risk.toml b/app/language/prism.sec/entries/sec-risk.toml new file mode 100644 index 0000000..d92e362 --- /dev/null +++ b/app/language/prism.sec/entries/sec-risk.toml @@ -0,0 +1,18 @@ +spec = "lexlean/entry/1" +id = "sec-risk" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Sec" +component = "Risk" + +[[form]] +id = "sec-risk" +channel = "text" +surface = "security risk" +canonical_source = true +features = ["sentence-case", "singular"] + diff --git a/app/language/prism.sec/entries/sec-threat.toml b/app/language/prism.sec/entries/sec-threat.toml new file mode 100644 index 0000000..deb7260 --- /dev/null +++ b/app/language/prism.sec/entries/sec-threat.toml @@ -0,0 +1,18 @@ +spec = "lexlean/entry/1" +id = "sec-threat" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Foundation.Sec" +component = "Threat" + +[[form]] +id = "sec-threat" +channel = "text" +surface = "security threat" +canonical_source = true +features = ["sentence-case", "singular"] + diff --git a/app/language/prism.sec/lexicon.toml b/app/language/prism.sec/lexicon.toml new file mode 100644 index 0000000..39c0756 --- /dev/null +++ b/app/language/prism.sec/lexicon.toml @@ -0,0 +1,5 @@ +spec = "lexlean/lexicon/1" +package = "prism.sec" +version = "1.0.0" +language = "1.2" +imports = ["lexlean.core@1.2.0", "lexlean.std.bool@1.2.0", "lexlean.std.nat@1.2.0", "prism.arch@1.0.0"] diff --git a/app/language/stitch.domain/entries/stitch-budget.toml b/app/language/stitch.domain/entries/stitch-budget.toml new file mode 100644 index 0000000..3416ea3 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-budget.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-budget" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.Budget" +component = "Budget" + +[[form]] +id = "stitch-budget" +channel = "text" +surface = "resource budget" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-checkpoint.toml b/app/language/stitch.domain/entries/stitch-checkpoint.toml new file mode 100644 index 0000000..4733926 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-checkpoint.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-checkpoint" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.Compute" +component = "Checkpoint" + +[[form]] +id = "stitch-checkpoint" +channel = "text" +surface = "deterministic checkpoint" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-encoding.toml b/app/language/stitch.domain/entries/stitch-encoding.toml new file mode 100644 index 0000000..4cc43d0 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-encoding.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-encoding" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.Encoding" +component = "Encoding" + +[[form]] +id = "stitch-encoding" +channel = "text" +surface = "exact encoding" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-evidence.toml b/app/language/stitch.domain/entries/stitch-evidence.toml new file mode 100644 index 0000000..686b63d --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-evidence.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-evidence" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.Evidence" +component = "Evidence" + +[[form]] +id = "stitch-evidence" +channel = "text" +surface = "scoped evidence" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-fragment.toml b/app/language/stitch.domain/entries/stitch-fragment.toml new file mode 100644 index 0000000..2bc52c1 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-fragment.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-fragment" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.Fragments" +component = "Fragment" + +[[form]] +id = "stitch-fragment" +channel = "text" +surface = "recovery fragment" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-object.toml b/app/language/stitch.domain/entries/stitch-object.toml new file mode 100644 index 0000000..f372952 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-object.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-object" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.Identity" +component = "Object" + +[[form]] +id = "stitch-object" +channel = "text" +surface = "immutable object" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-observation.toml b/app/language/stitch.domain/entries/stitch-observation.toml new file mode 100644 index 0000000..a5d4bf5 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-observation.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-observation" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.Observation" +component = "PeerObservation" + +[[form]] +id = "stitch-observation" +channel = "text" +surface = "peer observation" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-placement.toml b/app/language/stitch.domain/entries/stitch-placement.toml new file mode 100644 index 0000000..bc37a71 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-placement.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-placement" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.Custody" +component = "Placement" + +[[form]] +id = "stitch-placement" +channel = "text" +surface = "fragment placement" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-pointer.toml b/app/language/stitch.domain/entries/stitch-pointer.toml new file mode 100644 index 0000000..2ea13ee --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-pointer.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-pointer" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.Pointer" +component = "Pointer" + +[[form]] +id = "stitch-pointer" +channel = "text" +surface = "single writer pointer" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-product-brand.toml b/app/language/stitch.domain/entries/stitch-product-brand.toml new file mode 100644 index 0000000..61f1f27 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-product-brand.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-product-brand" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Product.Brand" +component = "sources" + +[[form]] +id = "stitch-product-brand" +channel = "text" +surface = "Stitch brand and design system" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-product-compliance.toml b/app/language/stitch.domain/entries/stitch-product-compliance.toml new file mode 100644 index 0000000..cebc972 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-product-compliance.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-product-compliance" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Product.Compliance" +component = "sources" + +[[form]] +id = "stitch-product-compliance" +channel = "text" +surface = "Stitch standards and evidence obligations" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-product-design.toml b/app/language/stitch.domain/entries/stitch-product-design.toml new file mode 100644 index 0000000..8608e00 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-product-design.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-product-design" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Product.Design" +component = "sources" + +[[form]] +id = "stitch-product-design" +channel = "text" +surface = "Stitch protocol design views" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-product-features.toml b/app/language/stitch.domain/entries/stitch-product-features.toml new file mode 100644 index 0000000..fbd0f43 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-product-features.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-product-features" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Product.Features" +component = "sources" + +[[form]] +id = "stitch-product-features" +channel = "text" +surface = "Stitch features and journeys" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-product-persistence.toml b/app/language/stitch.domain/entries/stitch-product-persistence.toml new file mode 100644 index 0000000..e186685 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-product-persistence.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-product-persistence" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Product.Persistence" +component = "sources" + +[[form]] +id = "stitch-product-persistence" +channel = "text" +surface = "Stitch identity persistence and safe automation" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-product-quality.toml b/app/language/stitch.domain/entries/stitch-product-quality.toml new file mode 100644 index 0000000..af56131 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-product-quality.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-product-quality" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Product.Quality" +component = "sources" + +[[form]] +id = "stitch-product-quality" +channel = "text" +surface = "Stitch quality requirements and open measurements" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-product-release.toml b/app/language/stitch.domain/entries/stitch-product-release.toml new file mode 100644 index 0000000..cb98f4b --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-product-release.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-product-release" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Product.Release" +component = "sources" + +[[form]] +id = "stitch-product-release" +channel = "text" +surface = "Stitch release and deployment contract" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-product-security.toml b/app/language/stitch.domain/entries/stitch-product-security.toml new file mode 100644 index 0000000..b503b88 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-product-security.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-product-security" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Product.Security" +component = "sources" + +[[form]] +id = "stitch-product-security" +channel = "text" +surface = "Stitch security and threat model" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-product-users.toml b/app/language/stitch.domain/entries/stitch-product-users.toml new file mode 100644 index 0000000..ef75c7e --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-product-users.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-product-users" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Product.Users" +component = "sources" + +[[form]] +id = "stitch-product-users" +channel = "text" +surface = "Stitch context of use and usability" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/entries/stitch-service-model.toml b/app/language/stitch.domain/entries/stitch-service-model.toml new file mode 100644 index 0000000..fdfa706 --- /dev/null +++ b/app/language/stitch.domain/entries/stitch-service-model.toml @@ -0,0 +1,17 @@ +spec = "lexlean/entry/1" +id = "stitch-service-model" +category = "label-word" +surface_arity = 0 +frame = "atom" + +[denotation] +kind = "document" +module = "Stitch.System" +component = "State" + +[[form]] +id = "stitch-service-model" +channel = "text" +surface = "Stitch recoverable service model" +canonical_source = true +features = ["sentence-case", "singular"] diff --git a/app/language/stitch.domain/lexicon.toml b/app/language/stitch.domain/lexicon.toml new file mode 100644 index 0000000..4e5dcc5 --- /dev/null +++ b/app/language/stitch.domain/lexicon.toml @@ -0,0 +1,5 @@ +spec = "lexlean/lexicon/1" +package = "stitch.domain" +version = "1.0.0" +language = "1.2" +imports = ["lexlean.core@1.2.0", "lexlean.std.bool@1.2.0", "lexlean.std.nat@1.2.0"] diff --git a/app/lean-toolchain b/app/lean-toolchain new file mode 100644 index 0000000..2b61957 --- /dev/null +++ b/app/lean-toolchain @@ -0,0 +1 @@ +leanprover/lean4:v4.32.1 diff --git a/app/lexlean.lock b/app/lexlean.lock new file mode 100644 index 0000000..e5caf9d --- /dev/null +++ b/app/lexlean.lock @@ -0,0 +1,87 @@ +spec = "lexlean/lock/2" +language = "1.2" +compiler_semantics = "5262e5b4c8b5668ae7066ad686757a6bb7f80c941d515fb9d586894fbc7de69a" +project_config_sha256 = "db033709d967898d0bf4430ea2e9283f174a8532342e4e8e8d356ba2b5a9404f" +lean_toolchain = "leanprover/lean4:v4.32.1" + +[[workspace_file]] +path = "lake-manifest.json" +sha256 = "1107bc06d0f0bf1716fbc980995e4895f608331a17863d16bb1ff631d70924f6" + +[[workspace_file]] +path = "lakefile.toml" +sha256 = "f93d661ae8380e42c7954c0a90166abb296ac100af42b403d7af0ac7e6b50094" + +[[workspace_file]] +path = "lean-toolchain" +sha256 = "8e3538e0ab5f81a3ee04927d8838c8c674e0e112838b4b3ce87ec218143276af" + +[[package]] +id = "lexlean.core" +version = "1.2.0" +kind = "builtin" +source = "embedded" +revision = "compiler-semantics" +tree_sha256 = "827317cae68c162f3a96c8a8de4e53ab348e7d3724fd2b834fa85ecde1a1b392" +manifest_sha256 = "271079763d269cc873531f515e56da960cd6321393b9460ff0e617666fa01d71" +imports = [] + +[[package]] +id = "lexlean.std.bool" +version = "1.2.0" +kind = "builtin" +source = "embedded" +revision = "compiler-semantics" +tree_sha256 = "3bc0fb09d706ffa7d5a1363302ea87c049acc7c7dcafde63c62682620c11be9b" +manifest_sha256 = "de58de2cf18a7a5a62d8c20649139d6dfe1f7b16b3130c75f150fbac5440a71e" +imports = ["lexlean.core@1.2.0"] + +[[package]] +id = "lexlean.std.nat" +version = "1.2.0" +kind = "builtin" +source = "embedded" +revision = "compiler-semantics" +tree_sha256 = "e0db021e01b91d651c43921d66f6b0023c8efbf17cac2ec53192ce5305e4e1ac" +manifest_sha256 = "6fb446b39e3c1c18a5f10cfa1f7aa2bd431837719eb0eb7489aadf452c9420a7" +imports = ["lexlean.core@1.2.0", "lexlean.std.bool@1.2.0"] + +[[package]] +id = "prism.arch" +version = "1.0.0" +kind = "path" +source = "language/prism.arch" +revision = "none" +tree_sha256 = "a5b1aa879a00c8f86100410c1ec1af4e2e983838f30e6dc82b3e989b0df65e2c" +manifest_sha256 = "14c95df8b512edacacdb1788b58ae90cf573b4e3f1dca0e41074bfde5a380c9f" +imports = ["lexlean.core@1.2.0", "lexlean.std.bool@1.2.0", "lexlean.std.nat@1.2.0"] + +[[package]] +id = "prism.qual" +version = "1.0.0" +kind = "path" +source = "language/prism.qual" +revision = "none" +tree_sha256 = "88748e3b24fa79693aed461bbce0fa626ec83356cd7ef980adaa22722a907602" +manifest_sha256 = "a79fae9a81e748c01f19a48dd066b0dedd356c05b791bd8bc8e7ce20d44cb335" +imports = ["lexlean.core@1.2.0", "lexlean.std.nat@1.2.0", "prism.arch@1.0.0"] + +[[package]] +id = "prism.sec" +version = "1.0.0" +kind = "path" +source = "language/prism.sec" +revision = "none" +tree_sha256 = "55bd2bc254d4170f6e76adc558955f1d1a31aa8a22ac88a3e3d6fe9307f76466" +manifest_sha256 = "d9b9663715d38c6d181becc8d433e3c3636b55d7ef97bd1f3d39688222925f7c" +imports = ["lexlean.core@1.2.0", "lexlean.std.bool@1.2.0", "lexlean.std.nat@1.2.0", "prism.arch@1.0.0"] + +[[package]] +id = "stitch.domain" +version = "1.0.0" +kind = "path" +source = "language/stitch.domain" +revision = "none" +tree_sha256 = "6dde6933233ce88c4aa0aa768bde3b50b3733345b183efca9aaa9d3a1244667e" +manifest_sha256 = "6b9d7544b96a6c0bbeacb5dd9972377ffa4f9ef23dffc92eb191bd90e39cc98d" +imports = ["lexlean.core@1.2.0", "lexlean.std.bool@1.2.0", "lexlean.std.nat@1.2.0"] diff --git a/app/lexlean.toml b/app/lexlean.toml new file mode 100644 index 0000000..61743f6 --- /dev/null +++ b/app/lexlean.toml @@ -0,0 +1,47 @@ +spec = "lexlean/project/1" +name = "stitch-recoverable-service" +language = "1.2" +module_prefix = "StitchModel" +source_roots = ["src"] +entrypoints = ["src/Product/Architecture.lex.tex", "src/Product/Brand.lex.tex", "src/Product/Compliance.lex.tex", "src/Product/Design.lex.tex", "src/Product/Experience.lex.tex", "src/Product/Features.lex.tex", "src/Product/Host.lex.tex", "src/Product/Model.lex.tex", "src/Product/Persistence.lex.tex", "src/Product/Quality.lex.tex", "src/Product/Release.lex.tex", "src/Product/Security.lex.tex", "src/Product/Users.lex.tex", "src/Stitch/Authority.lex.tex", "src/Stitch/ChannelFlow.lex.tex", "src/Stitch/Effects.lex.tex", "src/Stitch/PrismId.lex.tex", "src/Stitch/Recovery.lex.tex", "src/Stitch/Relay.lex.tex", "src/Stitch/Signaling.lex.tex", "src/Stitch/System.lex.tex", "src/Stitch/VmAdministration.lex.tex", "src/StitchApp.lex.tex"] +build_root = ".lexlean" +lockfile = "lexlean.lock" +lean_workspace = "." +lean_toolchain = "leanprover/lean4:v4.32.1" + +[[lexicon_source]] +package = "lexlean.std.nat" +kind = "builtin" + +[[lexicon_source]] +package = "prism.arch" +kind = "path" +path = "language/prism.arch" + +[[lexicon_source]] +package = "prism.qual" +kind = "path" +path = "language/prism.qual" + +[[lexicon_source]] +package = "prism.sec" +kind = "path" +path = "language/prism.sec" + +[[lexicon_source]] +package = "stitch.domain" +kind = "path" +path = "language/stitch.domain" + +[limits] +max_file_bytes = 4194304 +max_total_source_bytes = 67108864 +max_primitive_atoms = 2000000 +max_token_lattice_edges = 4000000 +max_parse_states = 4000000 +max_ir_nodes = 2000000 +max_scope_depth = 1024 +max_import_depth = 128 +max_diagnostics = 256 +max_child_output_bytes = 16777216 +child_timeout_ms = 300000 diff --git a/app/prism.toml b/app/prism.toml new file mode 100644 index 0000000..bfea9f2 --- /dev/null +++ b/app/prism.toml @@ -0,0 +1,10 @@ +[application] +name = "stitch-model" +version = "0.3.0" +description = "Source-modeled recovery, custody, resource admission and deterministic continuation contracts for Stitch." + +[model] +source = "src" +watch = ["src/**/*.lex.tex", "language/**/*.toml", "lexlean.toml"] + +[capabilities] diff --git a/app/prismpm.toml b/app/prismpm.toml new file mode 100644 index 0000000..1fa19ff --- /dev/null +++ b/app/prismpm.toml @@ -0,0 +1,9 @@ +spec = "prismpm/project/1" +project = "StitchModel" +lexlean_project = "lexlean.toml" +build_root = ".prism" + +[limits] +max_holo_bytes = 16777216 +max_entities = 100000 +max_diagnostics = 256 diff --git a/app/src/Foundation/Arch.lex.tex b/app/src/Foundation/Arch.lex.tex new file mode 100644 index 0000000..06b5477 --- /dev/null +++ b/app/src/Foundation/Arch.lex.tex @@ -0,0 +1,299 @@ +\begin{lexlean}{Foundation.Arch} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\title{Boolean} +\begin{semanticmodule} +structure{ + name: StandardReference, + type_parameters: [], + parameters: [], + fields: [ + {name: standardIndex, type: Nat}, + {name: editionIndex, type: Nat}, + {name: standardId, type: String}, + {name: edition, type: String} + ] +} + +inductive{ + name: ComponentKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: service, fields: []}, + {name: database, fields: []}, + {name: externalSystem, fields: []}, + {name: cliAdapter, fields: []}, + {name: staticSite, fields: []}, + {name: releaseBinary, fields: []} + ] +} + +inductive{ + name: EdgeKind, + type_parameters: [], + parameters: [], + constructors: [{name: dataFlow, fields: []}, {name: controlFlow, fields: []}] +} + +inductive{ + name: ModelKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: componentModel, fields: []}, + {name: securityModel, fields: []}, + {name: qualityModel, fields: []} + ] +} + +structure{ + name: Component, + type_parameters: [], + parameters: [], + fields: [ + {name: index, type: Nat}, + {name: kind, type: ComponentKind}, + {name: name, type: String}, + {name: text, type: String} + ] +} + +structure{ + name: Edge, + type_parameters: [], + parameters: [], + fields: [ + {name: index, type: Nat}, + {name: fromIndex, type: Nat}, + {name: toIndex, type: Nat}, + {name: kind, type: EdgeKind} + ] +} + +structure{ + name: Stakeholder, + type_parameters: [], + parameters: [], + fields: [{name: index, type: Nat}, {name: name, type: String}, {name: text, type: String}] +} + +structure{ + name: Concern, + type_parameters: [], + parameters: [], + fields: [{name: index, type: Nat}, {name: name, type: String}, {name: text, type: String}] +} + +structure{ + name: Viewpoint, + type_parameters: [], + parameters: [], + fields: [ + {name: index, type: Nat}, + {name: stakeholderIndex, type: Nat}, + {name: concernIndex, type: Nat}, + {name: modelKindIndex, type: Nat} + ] +} + +structure{ + name: View, + type_parameters: [], + parameters: [], + fields: [ + {name: index, type: Nat}, + {name: viewpointIndex, type: Nat}, + {name: modelKindIndex, type: Nat} + ] +} + +inductive{ + name: DesignDiagram, + type_parameters: [], + parameters: [], + constructors: [ + {name: opmObjectProcess, fields: []}, + {name: umlComponent, fields: []}, + {name: umlSequence, fields: []}, + {name: umlStateMachine, fields: []} + ] +} + +inductive{ + name: OpmThingKind, + type_parameters: [], + parameters: [], + constructors: [{name: object, fields: []}, {name: process, fields: []}] +} + +inductive{ + name: OpmLinkKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: agent, fields: []}, + {name: instrument, fields: []}, + {name: consumption, fields: []}, + {name: result, fields: []}, + {name: effect, fields: []}, + {name: invocation, fields: []}, + {name: aggregation, fields: []}, + {name: exhibition, fields: []}, + {name: generalization, fields: []}, + {name: classification, fields: []} + ] +} + +inductive{ + name: UmlMessageKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: synchronous, fields: []}, + {name: asynchronous, fields: []}, + {name: reply, fields: []} + ] +} + +structure{ + name: SystemProcess, + type_parameters: [], + parameters: [], + fields: [{name: owner, type: String}] +} + +structure{ + name: SystemState, + type_parameters: [], + parameters: [], + fields: [{name: owner, type: String}] +} + +structure{ + name: DesignView, + type_parameters: [], + parameters: [], + fields: [ + {name: title, type: String}, + {name: viewpoint, type: String}, + {name: diagram, type: DesignDiagram} + ] +} + +structure{ + name: OpmThing, + type_parameters: [], + parameters: [], + fields: [ + {name: view, type: String}, + {name: kind, type: OpmThingKind}, + {name: subject, type: String} + ] +} + +structure{ + name: OpmState, + type_parameters: [], + parameters: [], + fields: [{name: view, type: String}, {name: thing, type: String}, {name: state, type: String}] +} + +structure{ + name: OpmLink, + type_parameters: [], + parameters: [], + fields: [ + {name: view, type: String}, + {name: kind, type: OpmLinkKind}, + {name: source, type: String}, + {name: target, type: String} + ] +} + +structure{ + name: OpmZoom, + type_parameters: [], + parameters: [], + fields: [ + {name: view, type: String}, + {name: process, type: String}, + {name: subprocess, type: String}, + {name: order, type: Nat} + ] +} + +structure{ + name: UmlComponent, + type_parameters: [], + parameters: [], + fields: [{name: view, type: String}, {name: component, type: String}] +} + +structure{ + name: UmlConnector, + type_parameters: [], + parameters: [], + fields: [{name: view, type: String}, {name: edge, type: String}] +} + +structure{ + name: UmlLifeline, + type_parameters: [], + parameters: [], + fields: [{name: view, type: String}, {name: component, type: String}, {name: order, type: Nat}] +} + +structure{ + name: UmlMessage, + type_parameters: [], + parameters: [], + fields: [ + {name: view, type: String}, + {name: kind, type: UmlMessageKind}, + {name: order, type: Nat}, + {name: source, type: String}, + {name: target, type: String}, + {name: process, type: String} + ] +} + +structure{ + name: UmlState, + type_parameters: [], + parameters: [], + fields: [{name: view, type: String}, {name: state, type: String}, {name: initial, type: Bool}] +} + +structure{ + name: UmlTransition, + type_parameters: [], + parameters: [], + fields: [ + {name: view, type: String}, + {name: order, type: Nat}, + {name: source, type: String}, + {name: target, type: String}, + {name: trigger, type: String} + ] +} + +structure{ + name: Feature, + type_parameters: [], + parameters: [], + fields: [ + {name: statement, type: String}, + {name: calls, type: (List String)}, + {name: acceptance, type: (List String)} + ] +} + +structure{ + name: Journey, + type_parameters: [], + parameters: [], + fields: [{name: actor, type: String}, {name: steps, type: (List String)}] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Foundation/Bytes.lex.tex b/app/src/Foundation/Bytes.lex.tex new file mode 100644 index 0000000..f54f9c0 --- /dev/null +++ b/app/src/Foundation/Bytes.lex.tex @@ -0,0 +1,68 @@ +\begin{lexlean}{Foundation.Bytes} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\title{Bounded byte buffer} +\begin{semanticmodule} +inductive{ + name: ByteOrder, + type_parameters: [], + parameters: [], + constructors: [{name: LittleEndian, fields: []}, {name: BigEndian, fields: []}] +} + +inductive{ + name: BufferError, + type_parameters: [], + parameters: [], + constructors: [ + {name: OutOfBounds, fields: []}, + {name: LengthOverflow, fields: []}, + {name: NonCanonical, fields: []} + ] +} + +structure{ + name: BoundedBuffer, + type_parameters: [], + parameters: [], + fields: [{name: bytes, type: Bytes}, {name: maximum, type: UInt64}] +} + +definition{ + name: appendBytes, + parameters: [left : Bytes, right : Bytes], + result: Bytes, + body: (prim append left right : Bytes) +} + +definition{ + name: byteLength, + parameters: [value : Bytes], + result: Nat, + body: (prim length value : Nat) +} + +definition{ + name: byteAt, + parameters: [value : Bytes, offset : Nat], + result: (Option UInt8), + body: (prim index value offset : (Option UInt8)) +} + +definition{ + name: sliceBytes, + parameters: [value : Bytes, start : Nat, count : Nat], + result: (Option Bytes), + body: (prim slice value start count : (Option Bytes)) +} + +definition{ + name: compareBytes, + parameters: [left : Bytes, right : Bytes], + result: Ordering, + body: (prim compare_bytes left right : Ordering), + axioms: [propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Foundation/Experience/V1/Model.lex.tex b/app/src/Foundation/Experience/V1/Model.lex.tex new file mode 100644 index 0000000..e9133cd --- /dev/null +++ b/app/src/Foundation/Experience/V1/Model.lex.tex @@ -0,0 +1,184 @@ +\begin{lexlean}{Foundation.Experience.V1.Model} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\importmodule{Foundation.Arch} +\title{Boolean} +\begin{semanticmodule} +inductive{ + name: BrandElementKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: name, fields: []}, + {name: tagline, fields: []}, + {name: promise, fields: []}, + {name: positioning, fields: []}, + {name: mission, fields: []}, + {name: value, fields: []}, + {name: steward, fields: []}, + {name: callToAction, fields: []}, + {name: mark, fields: []}, + {name: palette, fields: []}, + {name: typography, fields: []}, + {name: productName, fields: []}, + {name: productPromise, fields: []} + ] +} + +inductive{ + name: TokenType, + type_parameters: [], + parameters: [], + constructors: [ + {name: color, fields: []}, + {name: dimension, fields: []}, + {name: number, fields: []}, + {name: gradient, fields: []}, + {name: fontFamily, fields: []} + ] +} + +inductive{ + name: ContrastCriterion, + type_parameters: [], + parameters: [], + constructors: [{name: text, fields: []}, {name: nonText, fields: []}] +} + +inductive{ + name: EnvironmentKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: technical, fields: []}, + {name: physical, fields: []}, + {name: social, fields: []} + ] +} + +inductive{ + name: UsabilityOutcome, + type_parameters: [], + parameters: [], + constructors: [ + {name: effectiveness, fields: []}, + {name: efficiency, fields: []}, + {name: satisfaction, fields: []} + ] +} + +structure{ + name: Authority, + type_parameters: [], + parameters: [], + fields: [ + {name: framework, type: String}, + {name: repository, type: String}, + {name: commit, type: String} + ] +} + +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: kappa, type: String} + ] +} + +structure{ + name: BrandElement, + type_parameters: [], + parameters: [], + fields: [ + {name: kind, type: BrandElementKind}, + {name: text, type: String}, + {name: source, type: Nat} + ] +} + +structure{ + name: DesignToken, + type_parameters: [], + parameters: [], + fields: [ + {name: name, type: String}, + {name: type, type: TokenType}, + {name: value, type: String}, + {name: hex, type: String}, + {name: source, type: Nat} + ] +} + +structure{ + name: ContrastPair, + type_parameters: [], + parameters: [], + fields: [ + {name: foreground, type: Nat}, + {name: background, type: Nat}, + {name: backgroundAlphaMilli, type: Nat}, + {name: criterion, type: ContrastCriterion}, + {name: observedMilli, type: Nat}, + {name: requiredMilli, type: Nat}, + {name: source, type: Nat} + ] +} + +structure{ + name: UserGroup, + type_parameters: [], + parameters: [], + fields: [ + {name: stakeholder, type: Foundation.Arch::Stakeholder}, + {name: characteristics, type: String} + ] +} + +structure{ + name: Goal, + type_parameters: [], + parameters: [], + fields: [ + {name: user, type: Nat}, + {name: journey, type: Foundation.Arch::Journey}, + {name: outcome, type: String} + ] +} + +structure{ + name: Task, + type_parameters: [], + parameters: [], + fields: [ + {name: goal, type: Nat}, + {name: order, type: Nat}, + {name: feature, type: Foundation.Arch::Feature} + ] +} + +structure{ + name: Environment, + type_parameters: [], + parameters: [], + fields: [{name: kind, type: EnvironmentKind}, {name: component, type: Foundation.Arch::Component}] +} + +structure{ + name: UsabilityMeasure, + type_parameters: [], + parameters: [], + fields: [ + {name: goal, type: Nat}, + {name: outcome, type: UsabilityOutcome}, + {name: observed, type: (Option Nat)}, + {name: method, type: String} + ] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Foundation/Qual.lex.tex b/app/src/Foundation/Qual.lex.tex new file mode 100644 index 0000000..6b5b44b --- /dev/null +++ b/app/src/Foundation/Qual.lex.tex @@ -0,0 +1,38 @@ +\begin{lexlean}{Foundation.Qual} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\title{Boolean} +\begin{semanticmodule} +structure{ + name: ProductQualityCharacteristic, + type_parameters: [], + parameters: [], + fields: [{name: index, type: Nat}] +} + +structure{ + name: QualitySubcharacteristic, + type_parameters: [], + parameters: [], + fields: [{name: index, type: Nat}, {name: characteristicIndex, type: Nat}] +} + +structure{ + name: QualityRequirement, + type_parameters: [], + parameters: [], + fields: [{name: index, type: Nat}, {name: subcharacteristicIndex, type: Nat}] +} + +structure{ + name: QualityMeasure, + type_parameters: [], + parameters: [], + fields: [ + {name: index, type: Nat}, + {name: requirementIndex, type: Nat}, + {name: threshold, type: Nat} + ] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Foundation/Sec.lex.tex b/app/src/Foundation/Sec.lex.tex new file mode 100644 index 0000000..10cdcfb --- /dev/null +++ b/app/src/Foundation/Sec.lex.tex @@ -0,0 +1,63 @@ +\begin{lexlean}{Foundation.Sec} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\title{Boolean} +\begin{semanticmodule} +inductive{ + name: Likelihood, + type_parameters: [], + parameters: [], + constructors: [{name: low, fields: []}, {name: medium, fields: []}, {name: high, fields: []}] +} + +inductive{ + name: Impact, + type_parameters: [], + parameters: [], + constructors: [{name: minor, fields: []}, {name: major, fields: []}, {name: critical, fields: []}] +} + +structure{ + name: Asset, + type_parameters: [], + parameters: [], + fields: [{name: index, type: Nat}, {name: componentIndex, type: Nat}] +} + +structure{name: Threat, type_parameters: [], parameters: [], fields: [{name: index, type: Nat}]} + +structure{ + name: Risk, + type_parameters: [], + parameters: [], + fields: [ + {name: index, type: Nat}, + {name: assetIndex, type: Nat}, + {name: threatIndex, type: Nat}, + {name: likelihood, type: Likelihood}, + {name: impact, type: Impact} + ] +} + +structure{ + name: ApplicationSecurityControl, + type_parameters: [], + parameters: [], + fields: [{name: index, type: Nat}, {name: riskIndex, type: Nat}] +} + +structure{ + name: SecurityActivity, + type_parameters: [], + parameters: [], + fields: [{name: index, type: Nat}, {name: controlIndex, type: Nat}] +} + +structure{ + name: VerificationMeasurement, + type_parameters: [], + parameters: [], + fields: [{name: index, type: Nat}, {name: controlIndex, type: Nat}, {name: passed, type: Bool}] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Foundation/View/Text/V1/Model.lex.tex b/app/src/Foundation/View/Text/V1/Model.lex.tex new file mode 100644 index 0000000..dcd17fa --- /dev/null +++ b/app/src/Foundation/View/Text/V1/Model.lex.tex @@ -0,0 +1,63 @@ +\begin{lexlean}{Foundation.View.Text.V1.Model} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\title{Text application model} +\begin{semanticmodule} +structure{ + name: TextView, + type_parameters: [], + parameters: [], + fields: [ + {name: title, type: String}, + {name: heading, type: String}, + {name: inputLabel, type: String}, + {name: submitLabel, type: String}, + {name: outputLabel, type: String}, + {name: inputError, type: String}, + {name: responseError, type: String} + ] +} + +structure{ + name: AcceptanceVector, + type_parameters: [], + parameters: [], + fields: [{name: request, type: Bytes}, {name: response, type: Bytes}] +} + +structure{ + name: TextApplication, + type_parameters: [], + parameters: [], + fields: [ + {name: profile, type: String}, + {name: name, type: String}, + {name: cargoName, type: String}, + {name: cargoVersion, type: String}, + {name: cargoDescription, type: String}, + {name: cargoRepository, type: String}, + {name: cargoHomepage, type: String}, + {name: libraryRoots, type: (List String)}, + {name: acceptanceVectors, type: (List AcceptanceVector)}, + {name: entryRoot, type: String}, + {name: coreContract, type: String}, + {name: requestMaximum, type: UInt32}, + {name: responseMaximum, type: UInt32}, + {name: guestAllocationMaximum, type: UInt32}, + {name: capabilitiesEmpty, type: Bool}, + {name: fatArchive, type: Bool}, + {name: primaryLayer, type: UInt8}, + {name: viewLayer, type: UInt8}, + {name: view, type: TextView} + ] +} + +definition{ + name: textApplicationProfile, + parameters: [], + result: String, + body: "prismpm/text-application/1" +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Architecture.lex.tex b/app/src/Product/Architecture.lex.tex new file mode 100644 index 0000000..973e1c3 --- /dev/null +++ b/app/src/Product/Architecture.lex.tex @@ -0,0 +1,491 @@ +\begin{lexlean}{Product.Architecture} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\importmodule{Foundation.Arch} +\title{architectural component} +\begin{semanticmodule} +definition{ + name: admission, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 0, kind := (ctor Foundation.Arch::ComponentKind.service), name := "admission", text := "Four-dimensional reservation ledger. Implementation: src/layer2-schedulers/policy.js. Domain contracts: Stitch.Budget."}) +} + +definition{ + name: browser, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 1, kind := (ctor Foundation.Arch::ComponentKind.staticSite), name := "browser", text := "Interactive five-layer Stitch product. Implementation: index.html. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: compute, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 2, kind := (ctor Foundation.Arch::ComponentKind.service), name := "compute", text := "Deterministic program and checkpoint replay. Implementation: src/layer4-compute/index.js, src/layer4-compute/replay.js. Domain contracts: Stitch.Compute."}) +} + +definition{ + name: cryptography, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 3, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "cryptography", text := "Browser WebCrypto SHA-256 and Ed25519. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: discovery, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 4, kind := (ctor Foundation.Arch::ComponentKind.service), name := "discovery", text := "DNS-over-HTTPS resolver and scoped DNS writer. Implementation: src/layer5-transport/index.js. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: identity, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 5, kind := (ctor Foundation.Arch::ComponentKind.service), name := "identity", text := "Canonical bytes, full commitments, raw encoding and fragments. Implementation: src/layer1-uor/contracts.js, src/layer1-uor/custody.js, src/layer1-uor/generated-model.js. Domain contracts: Stitch.Identity, Stitch.Encoding, Stitch.Fragments."}) +} + +definition{ + name: legacy, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 6, kind := (ctor Foundation.Arch::ComponentKind.service), name := "legacy", text := "Historical UOR and simulation conformance. Implementation: src/layer1-uor/index.js, src/layer3-storage/index.js, src/lib.rs. Domain contracts: historical simulation only."}) +} + +definition{ + name: nativeRouting, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 7, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "nativeRouting", text := "External Linux routing daemon; absent from browser. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: peers, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 8, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "peers", text := "Untrusted remote holders and compute peers. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: pointerAuthority, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 9, kind := (ctor Foundation.Arch::ComponentKind.service), name := "pointerAuthority", text := "Independently pinned single-writer key. Implementation: src/layer1-uor/pointer.js. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: publicRelay, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 11, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "publicRelay", text := "Optional public ntfy warm cache. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: runtimeHost, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 12, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "runtimeHost", text := "Browser, OS, clocks, RAM, networking and permissions. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: scheduler, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 13, kind := (ctor Foundation.Arch::ComponentKind.service), name := "scheduler", text := "Experimental proposals under enforced admission. Implementation: src/layer2-schedulers/index.js. Domain contracts: Stitch.Budget, Stitch.Observation."}) +} + +definition{ + name: signaling, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 14, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "signaling", text := "Public ntfy SDP/ICE signaling; BroadcastChannel on same origin. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: staticHost, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 15, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "staticHost", text := "Same-origin publication of application and VM assets. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: storage, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 16, kind := (ctor Foundation.Arch::ComponentKind.service), name := "storage", text := "Ephemeral local cache and conditional peer custody. Implementation: src/layer3-storage/custody.js, src/layer3-storage/index.js. Domain contracts: Stitch.Custody, Stitch.System."}) +} + +definition{ + name: transport, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 17, kind := (ctor Foundation.Arch::ComponentKind.service), name := "transport", text := "WebRTC channels, bounded messages and VM Ethernet bridge. Implementation: src/layer5-transport/index.js. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: vm, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 18, kind := (ctor Foundation.Arch::ComponentKind.service), name := "vm", text := "v86 x86 Linux guest and 9p filesystem bridge. Implementation: src/layer4-compute/index.js, v86/libv86.js, v86/v86.wasm, v86/seabios.bin, v86/vgabios.bin, images/buildroot-bzimage.bin. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: prismId, + parameters: [], + result: Foundation.Arch::Component, + body: (record Foundation.Arch::Component {index := 10, kind := (ctor Foundation.Arch::ComponentKind.service), name := "prismId", text := "Login-free prism identity: devices linked out of band, private boundary, substrate sync. Implementation: src/prism-id.js. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: browserAdmission, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 0, fromIndex := 1, toIndex := 0, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: browserCompute, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 1, fromIndex := 1, toIndex := 2, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: browserDiscovery, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 2, fromIndex := 1, toIndex := 4, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: browserScheduler, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 4, fromIndex := 1, toIndex := 13, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: browserStorage, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 5, fromIndex := 1, toIndex := 16, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: browserTransport, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 6, fromIndex := 1, toIndex := 17, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: browserVm, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 7, fromIndex := 1, toIndex := 18, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: computeAdmission, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 8, fromIndex := 2, toIndex := 0, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: computeIdentity, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 9, fromIndex := 2, toIndex := 5, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: computeStorage, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 10, fromIndex := 2, toIndex := 16, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: computeTransport, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 11, fromIndex := 2, toIndex := 17, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: discoveryAdmission, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 12, fromIndex := 4, toIndex := 0, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: discoveryAuthority, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 13, fromIndex := 4, toIndex := 9, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: discoveryHost, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 14, fromIndex := 4, toIndex := 12, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: identityCryptography, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 15, fromIndex := 5, toIndex := 3, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: relayTransport, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 18, fromIndex := 11, toIndex := 17, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: schedulerAdmission, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 19, fromIndex := 13, toIndex := 0, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: schedulerTransport, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 20, fromIndex := 13, toIndex := 17, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: signalingTransport, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 21, fromIndex := 14, toIndex := 17, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: staticBrowser, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 22, fromIndex := 15, toIndex := 1, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: staticVm, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 23, fromIndex := 15, toIndex := 18, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: storageAdmission, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 24, fromIndex := 16, toIndex := 0, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: storageIdentity, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 25, fromIndex := 16, toIndex := 5, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: storagePeers, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 26, fromIndex := 16, toIndex := 8, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: storageTransport, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 27, fromIndex := 16, toIndex := 17, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: transportAdmission, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 28, fromIndex := 17, toIndex := 0, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: transportPeers, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 29, fromIndex := 17, toIndex := 8, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: transportSignaling, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 30, fromIndex := 17, toIndex := 14, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: transportVm, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 31, fromIndex := 17, toIndex := 18, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: vmStorage, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 32, fromIndex := 18, toIndex := 16, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: vmTransport, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 33, fromIndex := 18, toIndex := 17, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: browserPrismId, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 3, fromIndex := 1, toIndex := 10, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: prismIdCryptography, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 16, fromIndex := 10, toIndex := 3, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: prismIdTransport, + parameters: [], + result: Foundation.Arch::Edge, + body: (record Foundation.Arch::Edge {index := 17, fromIndex := 10, toIndex := 17, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)}) +} + +definition{ + name: operator, + parameters: [], + result: Foundation.Arch::Stakeholder, + body: (record Foundation.Arch::Stakeholder {index := 0, name := "Stitch operator", text := "Chooses mesh participation, public disclosure, trusted pointer authority, DNS writes and VM actions."}) +} + +definition{ + name: recoverability, + parameters: [], + result: Foundation.Arch::Concern, + body: (record Foundation.Arch::Concern {index := 0, name := "Conditional recovery and honest assurance", text := "Recover exact bytes and replay pure jobs without confusing untrusted host observations, network availability or arbitrary VM effects with proved domain rules."}) +} + +definition{ + name: productViewpoint, + parameters: [], + result: Foundation.Arch::Viewpoint, + body: (record Foundation.Arch::Viewpoint {index := 0, stakeholderIndex := 0, concernIndex := 0, modelKindIndex := 0}) +} + +definition{ + name: productView, + parameters: [], + result: Foundation.Arch::View, + body: (record Foundation.Arch::View {index := 0, viewpointIndex := 0, modelKindIndex := 0}) +} + +definition{ + name: reader, + parameters: [], + result: Foundation.Arch::Stakeholder, + body: (record Foundation.Arch::Stakeholder {index := 1, name := "Stitch reader", text := "Learns the object, fragment, custody, replay and authority protocol before taking part."}) +} + +definition{ + name: reviewer, + parameters: [], + result: Foundation.Arch::Stakeholder, + body: (record Foundation.Arch::Stakeholder {index := 2, name := "Stitch reviewer", text := "Reviews exact-source evidence, host assumptions, vendor provenance and qualification gaps."}) +} + +definition{ + name: systemIntegrator, + parameters: [], + result: Foundation.Arch::Stakeholder, + body: (record Foundation.Arch::Stakeholder {index := 3, name := "Stitch systemIntegrator", text := "Embeds or extends the protocol without bypassing resource, trust or effect admission."}) +} + +definition{ + name: security, + parameters: [], + result: Foundation.Arch::Concern, + body: (record Foundation.Arch::Concern {index := 1, name := "security", text := "Keep independently accepted authority, exact commitments, explicit disclosure and ambiguous effects distinct."}) +} + +definition{ + name: transparency, + parameters: [], + result: Foundation.Arch::Concern, + body: (record Foundation.Arch::Concern {index := 2, name := "transparency", text := "Trace every product statement to its source and evidence scope; do not promote observations into certification."}) +} + +definition{ + name: usability, + parameters: [], + result: Foundation.Arch::Concern, + body: (record Foundation.Arch::Concern {index := 3, name := "usability", text := "Present the concept and protocol with readable explanations, scalable visuals, keyboard-accessible interaction and explicit evidence states."}) +} + +definition{ + name: readerViewpoint, + parameters: [], + result: Foundation.Arch::Viewpoint, + body: (record Foundation.Arch::Viewpoint {index := 1, stakeholderIndex := 1, concernIndex := 3, modelKindIndex := 0}) +} + +definition{ + name: readerView, + parameters: [], + result: Foundation.Arch::View, + body: (record Foundation.Arch::View {index := 1, viewpointIndex := 1, modelKindIndex := 0}) +} + +definition{ + name: reviewerViewpoint, + parameters: [], + result: Foundation.Arch::Viewpoint, + body: (record Foundation.Arch::Viewpoint {index := 2, stakeholderIndex := 2, concernIndex := 2, modelKindIndex := 0}) +} + +definition{ + name: reviewerView, + parameters: [], + result: Foundation.Arch::View, + body: (record Foundation.Arch::View {index := 2, viewpointIndex := 2, modelKindIndex := 0}) +} + +definition{ + name: systemIntegratorViewpoint, + parameters: [], + result: Foundation.Arch::Viewpoint, + body: (record Foundation.Arch::Viewpoint {index := 3, stakeholderIndex := 3, concernIndex := 1, modelKindIndex := 0}) +} + +definition{ + name: systemIntegratorView, + parameters: [], + result: Foundation.Arch::View, + body: (record Foundation.Arch::View {index := 3, viewpointIndex := 3, modelKindIndex := 0}) +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Brand.lex.tex b/app/src/Product/Brand.lex.tex new file mode 100644 index 0000000..92050e3 --- /dev/null +++ b/app/src/Product/Brand.lex.tex @@ -0,0 +1,70 @@ +\begin{lexlean}{Product.Brand} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Foundation.Experience.V1.Model} +\title{Stitch brand and design system} +\begin{semanticmodule} +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: sha256, type: String} + ] +} + +definition{ + name: sources, + parameters: [], + result: (List Source), + body: (cons (record Source {record := "Product.Brand", path := "index.html", firstLine := 0, lastLine := 0, sha256 := "b8e573b5b50c533114532ef4a6f851efc1508082c3a42d2d1002e20f22400801"}) (cons (record Source {record := "Product.Brand", path := "package.json", firstLine := 0, lastLine := 0, sha256 := "4cca578575a541919497c9ed1c517e970b7d820d464c7d594b8f0cb7bd23a3f4"}) (cons (record Source {record := "Product.Brand", path := "site/site.css", firstLine := 0, lastLine := 0, sha256 := "67332d156b7bfdbb212bef731374bec91f11d376aa938f45be07944fe2490dd9"}) (nil Source)))) +} + +definition{ + name: authority, + parameters: [], + result: Foundation.Experience.V1.Model::Authority, + body: (record Foundation.Experience.V1.Model::Authority {framework := "Wheeler brand identity; W3C Design Tokens; WCAG 2.2 SC 1.4.3 for the listed opaque text pairs only", repository := "https://github.com/Syntra-Labs/stitch", commit := "the exact revision of the cited sources"}) +} + +definition{ + name: brandSources, + parameters: [], + result: (List Foundation.Experience.V1.Model::Source), + body: (cons (record Foundation.Experience.V1.Model::Source {record := "Product.Brand", path := "index.html", firstLine := 0, lastLine := 0, kappa := "a5ee649c755a33ab8f60100f7dd357185424684cd75d935eda63274a98b60571"}) (cons (record Foundation.Experience.V1.Model::Source {record := "Product.Brand", path := "package.json", firstLine := 0, lastLine := 0, kappa := "073d458c9054acdf160b3a62feb1fb66a8525ecdd0f10d8b518318bb5611faa3"}) (cons (record Foundation.Experience.V1.Model::Source {record := "Product.Brand", path := "site/site.css", firstLine := 0, lastLine := 0, kappa := "3173583a128388aada2e80ad1dcbc311ffc4f76b399632c17de2b2ff2958d671"}) (nil Foundation.Experience.V1.Model::Source)))) +} + +definition{ + name: elements, + parameters: [], + result: (List Foundation.Experience.V1.Model::BrandElement), + body: (cons (record Foundation.Experience.V1.Model::BrandElement {kind := (ctor Foundation.Experience.V1.Model::BrandElementKind.productName), text := "Stitch", source := 1}) (cons (record Foundation.Experience.V1.Model::BrandElement {kind := (ctor Foundation.Experience.V1.Model::BrandElementKind.productPromise), text := "Model-driven recoverable objects and replayable computation across changing peers", source := 1}) (cons (record Foundation.Experience.V1.Model::BrandElement {kind := (ctor Foundation.Experience.V1.Model::BrandElementKind.typography), text := "\"JetBrains Mono\", \"Fira Code\", Consolas, monospace", source := 0}) (cons (record Foundation.Experience.V1.Model::BrandElement {kind := (ctor Foundation.Experience.V1.Model::BrandElementKind.palette), text := "bg #0a0a0a; panel #111111; border #2a2a2a; fg #e8e8e8; muted #888888; accent #bde8cc; site-muted #a1aaa4; site-line #303832", source := 0}) (nil Foundation.Experience.V1.Model::BrandElement))))) +} + +definition{ + name: tokens, + parameters: [], + result: (List Foundation.Experience.V1.Model::DesignToken), + body: (cons (record Foundation.Experience.V1.Model::DesignToken {name := "bg", type := (ctor Foundation.Experience.V1.Model::TokenType.color), value := "#0a0a0a", hex := "#0a0a0a", source := 0}) (cons (record Foundation.Experience.V1.Model::DesignToken {name := "panel", type := (ctor Foundation.Experience.V1.Model::TokenType.color), value := "#111111", hex := "#111111", source := 0}) (cons (record Foundation.Experience.V1.Model::DesignToken {name := "border", type := (ctor Foundation.Experience.V1.Model::TokenType.color), value := "#2a2a2a", hex := "#2a2a2a", source := 0}) (cons (record Foundation.Experience.V1.Model::DesignToken {name := "fg", type := (ctor Foundation.Experience.V1.Model::TokenType.color), value := "#e8e8e8", hex := "#e8e8e8", source := 0}) (cons (record Foundation.Experience.V1.Model::DesignToken {name := "muted", type := (ctor Foundation.Experience.V1.Model::TokenType.color), value := "#888888", hex := "#888888", source := 0}) (cons (record Foundation.Experience.V1.Model::DesignToken {name := "font", type := (ctor Foundation.Experience.V1.Model::TokenType.fontFamily), value := "\"JetBrains Mono\", \"Fira Code\", Consolas, monospace", hex := "", source := 0}) (cons (record Foundation.Experience.V1.Model::DesignToken {name := "accent", type := (ctor Foundation.Experience.V1.Model::TokenType.color), value := "#bde8cc", hex := "#bde8cc", source := 2}) (cons (record Foundation.Experience.V1.Model::DesignToken {name := "site-muted", type := (ctor Foundation.Experience.V1.Model::TokenType.color), value := "#a1aaa4", hex := "#a1aaa4", source := 2}) (cons (record Foundation.Experience.V1.Model::DesignToken {name := "site-line", type := (ctor Foundation.Experience.V1.Model::TokenType.color), value := "#303832", hex := "#303832", source := 2}) (nil Foundation.Experience.V1.Model::DesignToken)))))))))) +} + +definition{ + name: contrasts, + parameters: [], + result: (List Foundation.Experience.V1.Model::ContrastPair), + body: (cons (record Foundation.Experience.V1.Model::ContrastPair {foreground := 3, background := 0, backgroundAlphaMilli := 1000, criterion := (ctor Foundation.Experience.V1.Model::ContrastCriterion.text), observedMilli := 16158, requiredMilli := 4500, source := 0}) (cons (record Foundation.Experience.V1.Model::ContrastPair {foreground := 3, background := 1, backgroundAlphaMilli := 1000, criterion := (ctor Foundation.Experience.V1.Model::ContrastCriterion.text), observedMilli := 15411, requiredMilli := 4500, source := 0}) (cons (record Foundation.Experience.V1.Model::ContrastPair {foreground := 4, background := 1, backgroundAlphaMilli := 1000, criterion := (ctor Foundation.Experience.V1.Model::ContrastCriterion.text), observedMilli := 5326, requiredMilli := 4500, source := 0}) (cons (record Foundation.Experience.V1.Model::ContrastPair {foreground := 6, background := 0, backgroundAlphaMilli := 1000, criterion := (ctor Foundation.Experience.V1.Model::ContrastCriterion.text), observedMilli := 14686, requiredMilli := 4500, source := 0}) (cons (record Foundation.Experience.V1.Model::ContrastPair {foreground := 7, background := 0, backgroundAlphaMilli := 1000, criterion := (ctor Foundation.Experience.V1.Model::ContrastCriterion.text), observedMilli := 8297, requiredMilli := 4500, source := 0}) (nil Foundation.Experience.V1.Model::ContrastPair)))))) +} + +definition{ + name: contrastScope, + parameters: [], + result: String, + body: "These are arithmetic observations over the listed declared opaque text pairs. Focus, disabled states, overlays, browser rendering, user agents and assistive technologies need independent checks. A missing or failing pair cannot establish whole-page accessibility." +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Compliance.lex.tex b/app/src/Product/Compliance.lex.tex new file mode 100644 index 0000000..a869e7a --- /dev/null +++ b/app/src/Product/Compliance.lex.tex @@ -0,0 +1,139 @@ +\begin{lexlean}{Product.Compliance} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch standards and evidence obligations} +\begin{semanticmodule} +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: sha256, type: String} + ] +} + +definition{ + name: sources, + parameters: [], + result: (List Source), + body: (cons (record Source {record := "Product.Compliance", path := ".github/workflows/prism.yml", firstLine := 0, lastLine := 0, sha256 := "4fe595efda75eabd6d81db25b87a44d0d3fa186deb37b1c50b040095f488d093"}) (cons (record Source {record := "Product.Compliance", path := "app/src/Product/Architecture.lex.tex", firstLine := 0, lastLine := 0, sha256 := "198c55dae057fff7e5530027fd2449f86260cc58056ba4fc00c7b99734ececdc"}) (cons (record Source {record := "Product.Compliance", path := "docs/browser-authority.md", firstLine := 0, lastLine := 0, sha256 := "642c15248bd22ef2de107c9ca1e1b9dcecc24bb5ac8b59b78b14b98c6995a3c9"}) (cons (record Source {record := "Product.Compliance", path := "docs/canonical-json.md", firstLine := 0, lastLine := 0, sha256 := "d8f1bc75cd67bd6a3aa02f83b9cfd0aec767a9d17538f996062cc2428614061c"}) (cons (record Source {record := "Product.Compliance", path := "docs/dns-client.md", firstLine := 0, lastLine := 0, sha256 := "437c5ca3543e8c0f2ec5eec895b81e68960223372aa574674f429b254f0b39c1"}) (cons (record Source {record := "Product.Compliance", path := "docs/product-projection.md", firstLine := 0, lastLine := 0, sha256 := "446c2fcefd1519aa8a60f78115fb3f594ac3329018da3ef432381ea428c2faa1"}) (cons (record Source {record := "Product.Compliance", path := "docs/vendor-provenance.md", firstLine := 0, lastLine := 0, sha256 := "fe73438c181889157487931d6d2501175bf9becdbad5f6977b2edc6751fb986b"}) (cons (record Source {record := "Product.Compliance", path := "scripts/check-facets.mjs", firstLine := 0, lastLine := 0, sha256 := "4ccdee319cf9cec4066570e2bae311dfd0828a29891e88bc2ea2e6bc445bee51"}) (cons (record Source {record := "Product.Compliance", path := "scripts/check-product.mjs", firstLine := 0, lastLine := 0, sha256 := "63f6d356456b89c13a17b017b0a6d4fb2b2ba43e126b2d98b5dd059fabf83829"}) (cons (record Source {record := "Product.Compliance", path := "tests/browser-authority-lifecycle.test.js", firstLine := 0, lastLine := 0, sha256 := "6d8f3f41ddf18e5c42615e39e72f2965a39dddc5136f8d6388af5fe396d785b9"}) (cons (record Source {record := "Product.Compliance", path := "tests/canonical-json.test.js", firstLine := 0, lastLine := 0, sha256 := "927ca86d48dcabef1e376e2244c448672ae845653bf4afd7388b794228d562ab"}) (cons (record Source {record := "Product.Compliance", path := "tests/dns-wire.test.js", firstLine := 0, lastLine := 0, sha256 := "fadc7ec69c92e0e8ee24cdb827d840b1b3d0f6fabb7ab6379155dc394e30817a"}) (cons (record Source {record := "Product.Compliance", path := "tests/guest-qualification.test.js", firstLine := 0, lastLine := 0, sha256 := "47bfb6d3a8c050f8dae63c33d5ad65e7b32e9a6195e197d0a2b3af2d963b0f0b"}) (cons (record Source {record := "Product.Compliance", path := "tests/product-facets.test.js", firstLine := 0, lastLine := 0, sha256 := "0219469047bd8cf22e6b71b6a6797606eaa9ff065a61ad078de36a9f662a1629"}) (nil Source))))))))))))))) +} + +structure{ + name: Obligation, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: standard, type: String}, + {name: obligation, type: String}, + {name: source, type: String}, + {name: evidence, type: String}, + {name: status, type: String} + ] +} + +definition{ + name: obligationArchitecture, + parameters: [], + result: Obligation, + body: (record Obligation {id := "Architecture", standard := "ISO/IEC/IEEE 42010", obligation := "Represent every component, flow, stakeholder and concern with traceable viewpoints.", source := "app/src/Product/Architecture.lex.tex", evidence := "scripts/check-product.mjs", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationDesign, + parameters: [], + result: Obligation, + body: (record Obligation {id := "Design", standard := "ISO/PAS 19450 and UML 2.5.1", obligation := "Provide OPM object/process and UML component, sequence and state-machine views; views remain conditional on real domain predicates.", source := "app/src/Product/Design.lex.tex", evidence := "scripts/check-facets.mjs", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationFeatures, + parameters: [], + result: Obligation, + body: (record Obligation {id := "Features", standard := "Prism official feature and journey facets", obligation := "Every existing action has a declared call and named acceptance evidence; each journey names declared features.", source := "app/src/Product/Features.lex.tex", evidence := "tests/product-facets.test.js", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationThreatModel, + parameters: [], + result: Obligation, + body: (record Obligation {id := "ThreatModel", standard := "ISO 27034, ISO 27005 and STRIDE", obligation := "Give every threat a traceable control/evidence path while retaining qualitative assessment and residual host assumptions.", source := "app/src/Product/Security.lex.tex", evidence := "tests/product-facets.test.js", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationQuality, + parameters: [], + result: Obligation, + body: (record Obligation {id := "Quality", standard := "ISO/IEC 25010:2023", obligation := "Distinguish source-derived counts, configured limits, zero-defect obligations and unmeasured observations.", source := "app/src/Product/Quality.lex.tex", evidence := "tests/product-facets.test.js", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationCanonicalBytes, + parameters: [], + result: Obligation, + body: (record Obligation {id := "CanonicalBytes", standard := "RFC 8785", obligation := "Canonical JSON and framed commitments are checked at byte boundaries.", source := "docs/canonical-json.md", evidence := "tests/canonical-json.test.js", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationDns, + parameters: [], + result: Obligation, + body: (record Obligation {id := "Dns", standard := "RFC 1035, RFC 8484 and provider contracts", obligation := "DNS wire decoding and full multipart pointer publication retain exact scope and unknown-effect reconciliation.", source := "docs/dns-client.md", evidence := "tests/dns-wire.test.js", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationIdentityPersistence, + parameters: [], + result: Obligation, + body: (record Obligation {id := "IdentityPersistence", standard := "Origin storage and WebCrypto contracts", obligation := "Restore only existing active saved identity; do not infer trust from supplied data or recover keys after total loss.", source := "docs/browser-authority.md", evidence := "tests/browser-authority-lifecycle.test.js", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationContextOfUse, + parameters: [], + result: Obligation, + body: (record Obligation {id := "ContextOfUse", standard := "ISO 9241-11 and ISO 9241-210", obligation := "Connect stakeholders to goals, tasks and environments; unmeasured effectiveness, efficiency and satisfaction remain open.", source := "app/src/Product/Users.lex.tex", evidence := "tests/product-facets.test.js", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationBrand, + parameters: [], + result: Obligation, + body: (record Obligation {id := "Brand", standard := "Wheeler; W3C Design Tokens; scoped WCAG 2.2 measurements", obligation := "Preserve Stitch identity and source its design tokens. Listed contrast measurements are not whole-page accessibility conformance.", source := "app/src/Product/Brand.lex.tex", evidence := "tests/product-facets.test.js", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationDistribution, + parameters: [], + result: Obligation, + body: (record Obligation {id := "Distribution", standard := "Dependency source and license obligations", obligation := "Keep exact asset identity and accompanying materials, separately from security/qualification evidence.", source := "docs/vendor-provenance.md", evidence := "tests/guest-qualification.test.js", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligationRelease, + parameters: [], + result: Obligation, + body: (record Obligation {id := "Release", standard := "Pinned SDK and exact-revision acceptance", obligation := "Source, native artifact, runtime, hosted browser and field qualification are distinct gates.", source := "docs/product-projection.md", evidence := ".github/workflows/prism.yml", status := "Documented obligation and named evidence procedure; not an external compliance certification."}) +} + +definition{ + name: obligations, + parameters: [], + result: (List Obligation), + body: (cons (obligationArchitecture) (cons (obligationDesign) (cons (obligationFeatures) (cons (obligationThreatModel) (cons (obligationQuality) (cons (obligationCanonicalBytes) (cons (obligationDns) (cons (obligationIdentityPersistence) (cons (obligationContextOfUse) (cons (obligationBrand) (cons (obligationDistribution) (cons (obligationRelease) (nil Obligation))))))))))))) +} + +definition{ + name: scope, + parameters: [], + result: String, + body: "Standards organize and test the product model; these declarations do not assert organizational, legal, security or whole-browser certification. Evidence is qualified only by its exact observed run and stated scope." +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Design.lex.tex b/app/src/Product/Design.lex.tex new file mode 100644 index 0000000..da4084c --- /dev/null +++ b/app/src/Product/Design.lex.tex @@ -0,0 +1,841 @@ +\begin{lexlean}{Product.Design} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Foundation.Arch} +\importmodule{Product.Architecture} +\title{Stitch protocol design views} +\begin{semanticmodule} +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: sha256, type: String} + ] +} + +definition{ + name: sources, + parameters: [], + result: (List Source), + body: (cons (record Source {record := "Product.Design", path := "app/src/Product/Architecture.lex.tex", firstLine := 0, lastLine := 0, sha256 := "198c55dae057fff7e5530027fd2449f86260cc58056ba4fc00c7b99734ececdc"}) (cons (record Source {record := "Product.Design", path := "app/src/Product/Model.lex.tex", firstLine := 0, lastLine := 0, sha256 := "3017e652d02156eca68bc00cbb3cdfb54cebcfe290a3b9463493d9326da399f8"}) (cons (record Source {record := "Product.Design", path := "app/src/Stitch/Effects.lex.tex", firstLine := 0, lastLine := 0, sha256 := "7ccc2c30cca7df663541ceece0c85226f921160f56f4ec681703a8d5b589263b"}) (cons (record Source {record := "Product.Design", path := "docs/lifecycle-effects.md", firstLine := 0, lastLine := 0, sha256 := "7205e561aaf22ce66cb06af54a8d82a11c85c0ad6b55bc0821a91004d0750a80"}) (cons (record Source {record := "Product.Design", path := "docs/prism-model.md", firstLine := 0, lastLine := 0, sha256 := "ece338421a27de9e0f588e66badf477eebe3012d194103f14a722db02cec24c7"}) (cons (record Source {record := "Product.Design", path := "src/layer1-uor/pointer.js", firstLine := 0, lastLine := 0, sha256 := "99cce36bc7a981536e1c6df22956b5c34db9689ccc377b0e808b09502d5f09fc"}) (cons (record Source {record := "Product.Design", path := "src/layer2-schedulers/policy.js", firstLine := 0, lastLine := 0, sha256 := "8f2074f8fe07a7b1fda51896d78f11a797564afb64accebc7291261e5c00639f"}) (cons (record Source {record := "Product.Design", path := "src/layer3-storage/index.js", firstLine := 0, lastLine := 0, sha256 := "905067fe5ebac2f6a6cb2cdda29e37265409f3e7a5e4b786e9e18e21bc4af676"}) (nil Source))))))))) +} + +definition{ + name: viewComponents, + parameters: [], + result: Foundation.Arch::DesignView, + body: (record Foundation.Arch::DesignView {title := "Five-layer browser component relationships", viewpoint := "Product.Architecture::productViewpoint", diagram := (ctor Foundation.Arch::DesignDiagram.umlComponent)}) +} + +definition{ + name: viewObjectProcess, + parameters: [], + result: Foundation.Arch::DesignView, + body: (record Foundation.Arch::DesignView {title := "Recoverable object process", viewpoint := "Product.Architecture::productViewpoint", diagram := (ctor Foundation.Arch::DesignDiagram.opmObjectProcess)}) +} + +definition{ + name: viewPublicationSequence, + parameters: [], + result: Foundation.Arch::DesignView, + body: (record Foundation.Arch::DesignView {title := "Scoped publication and read-only reconciliation", viewpoint := "Product.Architecture::productViewpoint", diagram := (ctor Foundation.Arch::DesignDiagram.umlSequence)}) +} + +definition{ + name: viewPublicationState, + parameters: [], + result: Foundation.Arch::DesignView, + body: (record Foundation.Arch::DesignView {title := "Unknown writes are never repeated", viewpoint := "Product.Architecture::productViewpoint", diagram := (ctor Foundation.Arch::DesignDiagram.umlStateMachine)}) +} + +definition{ + name: componentAdmission, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::admission"}) +} + +definition{ + name: componentBrowser, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::browser"}) +} + +definition{ + name: componentCompute, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::compute"}) +} + +definition{ + name: componentCryptography, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::cryptography"}) +} + +definition{ + name: componentDiscovery, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::discovery"}) +} + +definition{ + name: componentIdentity, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::identity"}) +} + +definition{ + name: componentLegacy, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::legacy"}) +} + +definition{ + name: componentNativeRouting, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::nativeRouting"}) +} + +definition{ + name: componentPeers, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::peers"}) +} + +definition{ + name: componentPointerAuthority, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::pointerAuthority"}) +} + +definition{ + name: componentPublicRelay, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::publicRelay"}) +} + +definition{ + name: componentRuntimeHost, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::runtimeHost"}) +} + +definition{ + name: componentScheduler, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::scheduler"}) +} + +definition{ + name: componentSignaling, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::signaling"}) +} + +definition{ + name: componentStaticHost, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::staticHost"}) +} + +definition{ + name: componentStorage, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::storage"}) +} + +definition{ + name: componentTransport, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::transport"}) +} + +definition{ + name: componentVm, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::vm"}) +} + +definition{ + name: componentPrismId, + parameters: [], + result: Foundation.Arch::UmlComponent, + body: (record Foundation.Arch::UmlComponent {view := "Product.Design::viewComponents", component := "Product.Architecture::prismId"}) +} + +definition{ + name: connectorBrowserAdmission, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::browserAdmission"}) +} + +definition{ + name: connectorBrowserCompute, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::browserCompute"}) +} + +definition{ + name: connectorBrowserDiscovery, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::browserDiscovery"}) +} + +definition{ + name: connectorBrowserScheduler, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::browserScheduler"}) +} + +definition{ + name: connectorBrowserStorage, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::browserStorage"}) +} + +definition{ + name: connectorBrowserTransport, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::browserTransport"}) +} + +definition{ + name: connectorBrowserVm, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::browserVm"}) +} + +definition{ + name: connectorComputeAdmission, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::computeAdmission"}) +} + +definition{ + name: connectorComputeIdentity, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::computeIdentity"}) +} + +definition{ + name: connectorComputeStorage, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::computeStorage"}) +} + +definition{ + name: connectorComputeTransport, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::computeTransport"}) +} + +definition{ + name: connectorDiscoveryAdmission, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::discoveryAdmission"}) +} + +definition{ + name: connectorDiscoveryAuthority, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::discoveryAuthority"}) +} + +definition{ + name: connectorDiscoveryHost, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::discoveryHost"}) +} + +definition{ + name: connectorIdentityCryptography, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::identityCryptography"}) +} + +definition{ + name: connectorRelayTransport, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::relayTransport"}) +} + +definition{ + name: connectorSchedulerAdmission, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::schedulerAdmission"}) +} + +definition{ + name: connectorSchedulerTransport, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::schedulerTransport"}) +} + +definition{ + name: connectorSignalingTransport, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::signalingTransport"}) +} + +definition{ + name: connectorStaticBrowser, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::staticBrowser"}) +} + +definition{ + name: connectorStaticVm, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::staticVm"}) +} + +definition{ + name: connectorStorageAdmission, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::storageAdmission"}) +} + +definition{ + name: connectorStorageIdentity, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::storageIdentity"}) +} + +definition{ + name: connectorStoragePeers, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::storagePeers"}) +} + +definition{ + name: connectorStorageTransport, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::storageTransport"}) +} + +definition{ + name: connectorTransportAdmission, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::transportAdmission"}) +} + +definition{ + name: connectorTransportPeers, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::transportPeers"}) +} + +definition{ + name: connectorTransportSignaling, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::transportSignaling"}) +} + +definition{ + name: connectorTransportVm, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::transportVm"}) +} + +definition{ + name: connectorVmStorage, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::vmStorage"}) +} + +definition{ + name: connectorVmTransport, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::vmTransport"}) +} + +definition{ + name: connectorBrowserPrismId, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::browserPrismId"}) +} + +definition{ + name: connectorPrismIdCryptography, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::prismIdCryptography"}) +} + +definition{ + name: connectorPrismIdTransport, + parameters: [], + result: Foundation.Arch::UmlConnector, + body: (record Foundation.Arch::UmlConnector {view := "Product.Design::viewComponents", edge := "Product.Architecture::prismIdTransport"}) +} + +definition{ + name: processAdmitObject, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::storage"}) +} + +definition{ + name: processCommitLocal, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::storage"}) +} + +definition{ + name: processRequestPlacement, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::transport"}) +} + +definition{ + name: processCheckReceipt, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::storage"}) +} + +definition{ + name: processRecover, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::storage"}) +} + +definition{ + name: processBeginWrite, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::discovery"}) +} + +definition{ + name: processReconcile, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::discovery"}) +} + +definition{ + name: processConfirm, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::discovery"}) +} + +definition{ + name: processRefuse, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::discovery"}) +} + +definition{ + name: processRetainUnknown, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::discovery"}) +} + +definition{ + name: processAuthorizePointer, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::pointerAuthority"}) +} + +definition{ + name: processDispatchDnsWrite, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::runtimeHost"}) +} + +definition{ + name: processObserveDnsRecord, + parameters: [], + result: Foundation.Arch::SystemProcess, + body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::runtimeHost"}) +} + +definition{ + name: objectIdentity, + parameters: [], + result: Foundation.Arch::OpmThing, + body: (record Foundation.Arch::OpmThing {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmThingKind.object), subject := "Product.Architecture::identity"}) +} + +definition{ + name: objectAdmission, + parameters: [], + result: Foundation.Arch::OpmThing, + body: (record Foundation.Arch::OpmThing {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmThingKind.object), subject := "Product.Architecture::admission"}) +} + +definition{ + name: objectStorage, + parameters: [], + result: Foundation.Arch::OpmThing, + body: (record Foundation.Arch::OpmThing {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmThingKind.object), subject := "Product.Architecture::storage"}) +} + +definition{ + name: objectPeers, + parameters: [], + result: Foundation.Arch::OpmThing, + body: (record Foundation.Arch::OpmThing {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmThingKind.object), subject := "Product.Architecture::peers"}) +} + +definition{ + name: opmAdmitObject, + parameters: [], + result: Foundation.Arch::OpmThing, + body: (record Foundation.Arch::OpmThing {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmThingKind.process), subject := "Product.Design::processAdmitObject"}) +} + +definition{ + name: opmCommitLocal, + parameters: [], + result: Foundation.Arch::OpmThing, + body: (record Foundation.Arch::OpmThing {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmThingKind.process), subject := "Product.Design::processCommitLocal"}) +} + +definition{ + name: opmRequestPlacement, + parameters: [], + result: Foundation.Arch::OpmThing, + body: (record Foundation.Arch::OpmThing {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmThingKind.process), subject := "Product.Design::processRequestPlacement"}) +} + +definition{ + name: opmCheckReceipt, + parameters: [], + result: Foundation.Arch::OpmThing, + body: (record Foundation.Arch::OpmThing {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmThingKind.process), subject := "Product.Design::processCheckReceipt"}) +} + +definition{ + name: opmRecover, + parameters: [], + result: Foundation.Arch::OpmThing, + body: (record Foundation.Arch::OpmThing {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmThingKind.process), subject := "Product.Design::processRecover"}) +} + +definition{ + name: opmLink0, + parameters: [], + result: Foundation.Arch::OpmLink, + body: (record Foundation.Arch::OpmLink {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmLinkKind.instrument), source := "Product.Architecture::identity", target := "Product.Design::processAdmitObject"}) +} + +definition{ + name: opmLink1, + parameters: [], + result: Foundation.Arch::OpmLink, + body: (record Foundation.Arch::OpmLink {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmLinkKind.instrument), source := "Product.Architecture::admission", target := "Product.Design::processAdmitObject"}) +} + +definition{ + name: opmLink2, + parameters: [], + result: Foundation.Arch::OpmLink, + body: (record Foundation.Arch::OpmLink {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmLinkKind.invocation), source := "Product.Design::processAdmitObject", target := "Product.Design::processCommitLocal"}) +} + +definition{ + name: opmLink3, + parameters: [], + result: Foundation.Arch::OpmLink, + body: (record Foundation.Arch::OpmLink {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmLinkKind.effect), source := "Product.Architecture::storage", target := "Product.Design::processCommitLocal"}) +} + +definition{ + name: opmLink4, + parameters: [], + result: Foundation.Arch::OpmLink, + body: (record Foundation.Arch::OpmLink {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmLinkKind.invocation), source := "Product.Design::processCommitLocal", target := "Product.Design::processRequestPlacement"}) +} + +definition{ + name: opmLink5, + parameters: [], + result: Foundation.Arch::OpmLink, + body: (record Foundation.Arch::OpmLink {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmLinkKind.instrument), source := "Product.Architecture::peers", target := "Product.Design::processCheckReceipt"}) +} + +definition{ + name: opmLink6, + parameters: [], + result: Foundation.Arch::OpmLink, + body: (record Foundation.Arch::OpmLink {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmLinkKind.invocation), source := "Product.Design::processCheckReceipt", target := "Product.Design::processRecover"}) +} + +definition{ + name: opmLink7, + parameters: [], + result: Foundation.Arch::OpmLink, + body: (record Foundation.Arch::OpmLink {view := "Product.Design::viewObjectProcess", kind := (ctor Foundation.Arch::OpmLinkKind.effect), source := "Product.Architecture::storage", target := "Product.Design::processRecover"}) +} + +definition{ + name: lifelineBrowser, + parameters: [], + result: Foundation.Arch::UmlLifeline, + body: (record Foundation.Arch::UmlLifeline {view := "Product.Design::viewPublicationSequence", component := "Product.Architecture::browser", order := 0}) +} + +definition{ + name: lifelineDiscovery, + parameters: [], + result: Foundation.Arch::UmlLifeline, + body: (record Foundation.Arch::UmlLifeline {view := "Product.Design::viewPublicationSequence", component := "Product.Architecture::discovery", order := 1}) +} + +definition{ + name: lifelinePointerAuthority, + parameters: [], + result: Foundation.Arch::UmlLifeline, + body: (record Foundation.Arch::UmlLifeline {view := "Product.Design::viewPublicationSequence", component := "Product.Architecture::pointerAuthority", order := 2}) +} + +definition{ + name: lifelineRuntimeHost, + parameters: [], + result: Foundation.Arch::UmlLifeline, + body: (record Foundation.Arch::UmlLifeline {view := "Product.Design::viewPublicationSequence", component := "Product.Architecture::runtimeHost", order := 3}) +} + +definition{ + name: message0, + parameters: [], + result: Foundation.Arch::UmlMessage, + body: (record Foundation.Arch::UmlMessage {view := "Product.Design::viewPublicationSequence", kind := (ctor Foundation.Arch::UmlMessageKind.synchronous), order := 0, source := "Product.Architecture::browser", target := "Product.Architecture::discovery", process := "Product.Design::processBeginWrite"}) +} + +definition{ + name: message1, + parameters: [], + result: Foundation.Arch::UmlMessage, + body: (record Foundation.Arch::UmlMessage {view := "Product.Design::viewPublicationSequence", kind := (ctor Foundation.Arch::UmlMessageKind.synchronous), order := 1, source := "Product.Architecture::discovery", target := "Product.Architecture::pointerAuthority", process := "Product.Design::processAuthorizePointer"}) +} + +definition{ + name: message2, + parameters: [], + result: Foundation.Arch::UmlMessage, + body: (record Foundation.Arch::UmlMessage {view := "Product.Design::viewPublicationSequence", kind := (ctor Foundation.Arch::UmlMessageKind.asynchronous), order := 2, source := "Product.Architecture::discovery", target := "Product.Architecture::runtimeHost", process := "Product.Design::processDispatchDnsWrite"}) +} + +definition{ + name: message3, + parameters: [], + result: Foundation.Arch::UmlMessage, + body: (record Foundation.Arch::UmlMessage {view := "Product.Design::viewPublicationSequence", kind := (ctor Foundation.Arch::UmlMessageKind.reply), order := 3, source := "Product.Architecture::runtimeHost", target := "Product.Architecture::discovery", process := "Product.Design::processDispatchDnsWrite"}) +} + +definition{ + name: message4, + parameters: [], + result: Foundation.Arch::UmlMessage, + body: (record Foundation.Arch::UmlMessage {view := "Product.Design::viewPublicationSequence", kind := (ctor Foundation.Arch::UmlMessageKind.synchronous), order := 4, source := "Product.Architecture::discovery", target := "Product.Architecture::discovery", process := "Product.Design::processRetainUnknown"}) +} + +definition{ + name: message5, + parameters: [], + result: Foundation.Arch::UmlMessage, + body: (record Foundation.Arch::UmlMessage {view := "Product.Design::viewPublicationSequence", kind := (ctor Foundation.Arch::UmlMessageKind.synchronous), order := 5, source := "Product.Architecture::browser", target := "Product.Architecture::discovery", process := "Product.Design::processReconcile"}) +} + +definition{ + name: message6, + parameters: [], + result: Foundation.Arch::UmlMessage, + body: (record Foundation.Arch::UmlMessage {view := "Product.Design::viewPublicationSequence", kind := (ctor Foundation.Arch::UmlMessageKind.asynchronous), order := 6, source := "Product.Architecture::discovery", target := "Product.Architecture::runtimeHost", process := "Product.Design::processObserveDnsRecord"}) +} + +definition{ + name: message7, + parameters: [], + result: Foundation.Arch::UmlMessage, + body: (record Foundation.Arch::UmlMessage {view := "Product.Design::viewPublicationSequence", kind := (ctor Foundation.Arch::UmlMessageKind.reply), order := 7, source := "Product.Architecture::runtimeHost", target := "Product.Architecture::discovery", process := "Product.Design::processObserveDnsRecord"}) +} + +definition{ + name: message8, + parameters: [], + result: Foundation.Arch::UmlMessage, + body: (record Foundation.Arch::UmlMessage {view := "Product.Design::viewPublicationSequence", kind := (ctor Foundation.Arch::UmlMessageKind.synchronous), order := 8, source := "Product.Architecture::discovery", target := "Product.Architecture::discovery", process := "Product.Design::processConfirm"}) +} + +definition{ + name: stateIdle, + parameters: [], + result: Foundation.Arch::SystemState, + body: (record Foundation.Arch::SystemState {owner := "Product.Architecture::discovery"}) +} + +definition{ + name: umlIdle, + parameters: [], + result: Foundation.Arch::UmlState, + body: (record Foundation.Arch::UmlState {view := "Product.Design::viewPublicationState", state := "Product.Design::stateIdle", initial := true}) +} + +definition{ + name: statePublished, + parameters: [], + result: Foundation.Arch::SystemState, + body: (record Foundation.Arch::SystemState {owner := "Product.Architecture::discovery"}) +} + +definition{ + name: umlPublished, + parameters: [], + result: Foundation.Arch::UmlState, + body: (record Foundation.Arch::UmlState {view := "Product.Design::viewPublicationState", state := "Product.Design::statePublished", initial := false}) +} + +definition{ + name: stateRefused, + parameters: [], + result: Foundation.Arch::SystemState, + body: (record Foundation.Arch::SystemState {owner := "Product.Architecture::discovery"}) +} + +definition{ + name: umlRefused, + parameters: [], + result: Foundation.Arch::UmlState, + body: (record Foundation.Arch::UmlState {view := "Product.Design::viewPublicationState", state := "Product.Design::stateRefused", initial := false}) +} + +definition{ + name: stateUnknown, + parameters: [], + result: Foundation.Arch::SystemState, + body: (record Foundation.Arch::SystemState {owner := "Product.Architecture::discovery"}) +} + +definition{ + name: umlUnknown, + parameters: [], + result: Foundation.Arch::UmlState, + body: (record Foundation.Arch::UmlState {view := "Product.Design::viewPublicationState", state := "Product.Design::stateUnknown", initial := false}) +} + +definition{ + name: transition0, + parameters: [], + result: Foundation.Arch::UmlTransition, + body: (record Foundation.Arch::UmlTransition {view := "Product.Design::viewPublicationState", order := 0, source := "Product.Design::stateIdle", target := "Product.Design::stateUnknown", trigger := "Product.Design::processBeginWrite"}) +} + +definition{ + name: transition1, + parameters: [], + result: Foundation.Arch::UmlTransition, + body: (record Foundation.Arch::UmlTransition {view := "Product.Design::viewPublicationState", order := 1, source := "Product.Design::statePublished", target := "Product.Design::stateUnknown", trigger := "Product.Design::processBeginWrite"}) +} + +definition{ + name: transition2, + parameters: [], + result: Foundation.Arch::UmlTransition, + body: (record Foundation.Arch::UmlTransition {view := "Product.Design::viewPublicationState", order := 2, source := "Product.Design::stateRefused", target := "Product.Design::stateUnknown", trigger := "Product.Design::processBeginWrite"}) +} + +definition{ + name: transition3, + parameters: [], + result: Foundation.Arch::UmlTransition, + body: (record Foundation.Arch::UmlTransition {view := "Product.Design::viewPublicationState", order := 3, source := "Product.Design::stateUnknown", target := "Product.Design::statePublished", trigger := "Product.Design::processConfirm"}) +} + +definition{ + name: transition4, + parameters: [], + result: Foundation.Arch::UmlTransition, + body: (record Foundation.Arch::UmlTransition {view := "Product.Design::viewPublicationState", order := 4, source := "Product.Design::stateUnknown", target := "Product.Design::statePublished", trigger := "Product.Design::processReconcile"}) +} + +definition{ + name: transition5, + parameters: [], + result: Foundation.Arch::UmlTransition, + body: (record Foundation.Arch::UmlTransition {view := "Product.Design::viewPublicationState", order := 5, source := "Product.Design::stateUnknown", target := "Product.Design::stateRefused", trigger := "Product.Design::processRefuse"}) +} + +definition{ + name: transition6, + parameters: [], + result: Foundation.Arch::UmlTransition, + body: (record Foundation.Arch::UmlTransition {view := "Product.Design::viewPublicationState", order := 6, source := "Product.Design::stateUnknown", target := "Product.Design::stateUnknown", trigger := "Product.Design::processRetainUnknown"}) +} + +definition{ + name: boundary, + parameters: [], + result: String, + body: "Design relationships are views of existing contracts. AdmitObject is storage-owned orchestration using identity and admission, not an admission-led storage write. DNS host calls and replies name host-owned processes; local retention and confirmation remain discovery-owned conditional decisions. Transition edges remain conditional on Stitch.Effects predicates and exact host observations. They neither execute effects nor prove the host implements every transition." +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Experience.lex.tex b/app/src/Product/Experience.lex.tex new file mode 100644 index 0000000..03eda82 --- /dev/null +++ b/app/src/Product/Experience.lex.tex @@ -0,0 +1,925 @@ +\begin{lexlean}{Product.Experience} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch recoverable service model} +\begin{semanticmodule} +structure{ + name: Facts, + type_parameters: [], + parameters: [], + fields: [ + {name: recoveryBusy, type: Bool}, + {name: recoveryFileSelected, type: Bool}, + {name: recoveryHasEvidence, type: Bool}, + {name: recoveryHasObjects, type: Bool}, + {name: recoveryHasJobs, type: Bool}, + {name: recoveryHasAnchors, type: Bool}, + {name: recoveryAnchorConsent, type: Bool}, + {name: recoveryAcceptedAnchor, type: Bool}, + {name: recoveryCanRestoreAnchor, type: Bool}, + {name: recoveryRestoredAnchor, type: Bool}, + {name: vmCanBoot, type: Bool}, + {name: vmCanExecute, type: Bool}, + {name: vmCanAdminister, type: Bool}, + {name: vmCanCancelObservation, type: Bool}, + {name: vmCanForgetCommand, type: Bool}, + {name: vmCanReconcileCommand, type: Bool}, + {name: vmAdminBlocked, type: Bool}, + {name: vmTerminationPending, type: Bool}, + {name: vmStopped, type: Bool}, + {name: vmDestroyed, type: Bool}, + {name: disclosureAccepted, type: Bool}, + {name: meshJoined, type: Bool}, + {name: peersReachable, type: Bool}, + {name: relayEnabled, type: Bool}, + {name: hasObject, type: Bool}, + {name: hasPartial, type: Bool}, + {name: placementObjectSelected, type: Bool}, + {name: recoverablePlacement, type: Bool}, + {name: hasJobs, type: Bool}, + {name: unfinishedJobs, type: Bool}, + {name: replayedJobs, type: Bool}, + {name: vmBooting, type: Bool}, + {name: vmReady, type: Bool}, + {name: vmFailed, type: Bool}, + {name: authorityPinned, type: Bool}, + {name: headRetained, type: Bool}, + {name: dnsConfigured, type: Bool}, + {name: publicationBusy, type: Bool}, + {name: publicationUnknown, type: Bool}, + {name: publicationPublished, type: Bool}, + {name: policyBlocked, type: Bool}, + {name: policyAttention, type: Bool} + ] +} + +structure{ + name: Journey, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: target, type: String}, + {name: title, type: String}, + {name: summary, type: String} + ] +} + +structure{ + name: View, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: journey, type: String}, + {name: title, type: String}, + {name: evidence, type: String}, + {name: detail, type: String} + ] +} + +structure{ + name: Action, + type_parameters: [], + parameters: [], + fields: [ + {name: code, type: Nat}, + {name: id, type: String}, + {name: control, type: String}, + {name: journey, type: String}, + {name: label, type: String}, + {name: help, type: String} + ] +} + +definition{ + name: initialFacts, + parameters: [], + result: Facts, + body: (record Facts {recoveryBusy := false, recoveryFileSelected := false, recoveryHasEvidence := false, recoveryHasObjects := false, recoveryHasJobs := false, recoveryHasAnchors := false, recoveryAnchorConsent := false, recoveryAcceptedAnchor := false, recoveryCanRestoreAnchor := false, recoveryRestoredAnchor := false, vmCanBoot := false, vmCanExecute := false, vmCanAdminister := false, vmCanCancelObservation := false, vmCanForgetCommand := false, vmCanReconcileCommand := false, vmAdminBlocked := false, vmTerminationPending := false, vmStopped := false, vmDestroyed := false, disclosureAccepted := false, meshJoined := false, peersReachable := false, relayEnabled := false, hasObject := false, hasPartial := false, placementObjectSelected := false, recoverablePlacement := false, hasJobs := false, unfinishedJobs := false, replayedJobs := false, vmBooting := false, vmReady := false, vmFailed := false, authorityPinned := false, headRetained := false, dnsConfigured := false, publicationBusy := false, publicationUnknown := false, publicationPublished := false, policyBlocked := false, policyAttention := false}) +} + +definition{ + name: journeyMesh, + parameters: [], + result: Journey, + body: (record Journey {id := "mesh", target := "meshPanel", title := "Join a mesh", summary := "Review public signaling disclosure, join explicitly, then inspect reachable peers."}) +} + +definition{ + name: journeyObjects, + parameters: [], + result: Journey, + body: (record Journey {id := "objects", target := "objectsPanel", title := "Store, place and recover objects", summary := "Separate local integrity from conditional peer custody and actual recovery."}) +} + +definition{ + name: journeyCompute, + parameters: [], + result: Journey, + body: (record Journey {id := "compute", target := "computePanel", title := "Run and resume pure jobs", summary := "Replay deterministic checkpoints before continuation; VM effects have a separate contract."}) +} + +definition{ + name: journeyVm, + parameters: [], + result: Journey, + body: (record Journey {id := "vm", target := "vmPanel", title := "Inspect host VM effects", summary := "Boot and execute only through the observed VM lifecycle. Output integrity does not certify execution."}) +} + +definition{ + name: journeyPointers, + parameters: [], + result: Journey, + body: (record Journey {id := "pointers", target := "pointersPanel", title := "Pin, discover and publish pointers", summary := "Pin authority independently, retain the local head, and reconcile uncertain provider writes."}) +} + +definition{ + name: journeyResources, + parameters: [], + result: Journey, + body: (record Journey {id := "resources", target := "resourcesPanel", title := "Inspect and renew allowances", summary := "Inspect bounded application charges, export them, and explicitly grant a new epoch."}) +} + +definition{ + name: journeys, + parameters: [], + result: (List Journey), + body: (cons (journeyMesh) (cons (journeyObjects) (cons (journeyCompute) (cons (journeyVm) (cons (journeyPointers) (cons (journeyResources) (nil Journey))))))) +} + +definition{ + name: meshDisclosure, + parameters: [], + result: View, + body: (record View {id := "meshDisclosure", journey := "mesh", title := "Review disclosure", evidence := "NOT JOINED", detail := "Joining sends mesh topic, signaling messages and ICE connection metadata to public ntfy signaling and STUN services. Mesh keys are not passwords. Object and job bytes require the separate public relay opt-in."}) +} + +definition{ + name: meshReady, + parameters: [], + result: View, + body: (record View {id := "meshReady", journey := "mesh", title := "Ready for explicit join", evidence := "DISCLOSURE ACCEPTED", detail := "No connection is established by accepting disclosure alone. Choose Join Mesh and Sync to start."}) +} + +definition{ + name: meshSearching, + parameters: [], + result: View, + body: (record View {id := "meshSearching", journey := "mesh", title := "Joined; looking for peers", evidence := "NO OPEN PEER OBSERVED", detail := "A join request does not establish peer availability. Keep this tab open or explicitly rejoin after changing the mesh key."}) +} + +definition{ + name: meshConnected, + parameters: [], + result: View, + body: (record View {id := "meshConnected", journey := "mesh", title := "Peer channel observed", evidence := "OPEN CHANNEL OBSERVED", detail := "An open channel is a current local observation, not durable custody, authority, or a distinct failure domain."}) +} + +definition{ + name: objectsEmpty, + parameters: [], + result: View, + body: (record View {id := "objectsEmpty", journey := "objects", title := "No local object bytes", evidence := "NO RECOVERY EVIDENCE", detail := "Store an object, or fetch retained fragments. Recovery needs two distinct valid fragments of the exact encoding; an empty result is not a successful recovery."}) +} + +definition{ + name: objectsPartial, + parameters: [], + result: View, + body: (record View {id := "objectsPartial", journey := "objects", title := "Waiting for enough fragments", evidence := "PARTIAL FRAGMENTS", detail := "Insufficient fragments do not establish object integrity. Fetch again when holders are reachable; do not erase other retained copies."}) +} + +definition{ + name: objectsLocal, + parameters: [], + result: View, + body: (record View {id := "objectsLocal", journey := "objects", title := "Local object verified", evidence := "DIGEST MATCH; REMOTE CUSTODY UNESTABLISHED", detail := "Local bytes match the complete commitment. Select that exact retained object and repair placement after peers join, leases expire or routes change. Pending or uncertain transfers never establish remote redundancy."}) +} + +definition{ + name: objectsPlaced, + parameters: [], + result: View, + body: (record View {id := "objectsPlaced", journey := "objects", title := "Conditional placement observed", evidence := "DIGEST-CHECKED PEER ASSERTIONS", detail := "At least one object has two current committed fragment assertions on currently reachable routes. Repair the selected object to fill missing indices or explicitly replace a current holder. Recovery still depends on truthful, reachable holders and exact encoding. Distinct peer identifiers do not establish independent machines."}) +} + +definition{ + name: computeEmpty, + parameters: [], + result: View, + body: (record View {id := "computeEmpty", journey := "compute", title := "No pure jobs observed", evidence := "NO EXECUTION EVIDENCE", detail := "Start a deterministic job or scan reachable checkpoints. Host and VM effects are not replay-certified."}) +} + +definition{ + name: computeUnverified, + parameters: [], + result: View, + body: (record View {id := "computeUnverified", journey := "compute", title := "Unfinished job requires replay", evidence := "UNVERIFIED CHECKPOINT", detail := "A checkpoint claim is not execution evidence. Resume scans validate identity, program and checkpoint chain and replay before continuation."}) +} + +definition{ + name: computeReplay, + parameters: [], + result: View, + body: (record View {id := "computeReplay", journey := "compute", title := "Pure continuation checked locally", evidence := "REPLAYED PURE CHECKPOINT", detail := "Observed pure checkpoints were independently replayed by this browser adapter. This does not certify VM effects, a remote worker, availability, or durable retention."}) +} + +definition{ + name: computeDone, + parameters: [], + result: View, + body: (record View {id := "computeDone", journey := "compute", title := "Pure job state observed", evidence := "PURE JOB STATE; INSPECT EACH ROW", detail := "Completion and replay are separate. Each job row reports its own execution evidence; no aggregate claim certifies every job."}) +} + +definition{ + name: vmIdle, + parameters: [], + result: View, + body: (record View {id := "vmIdle", journey := "vm", title := "VM not running", evidence := "HOST EFFECT NOT STARTED", detail := "Boot loads the local v86 assets. Guest execution and its network effects remain host assumptions, separate from deterministic pure-job replay."}) +} + +definition{ + name: vmBooting, + parameters: [], + result: View, + body: (record View {id := "vmBooting", journey := "vm", title := "VM boot in progress", evidence := "HOST EFFECT PENDING", detail := "Wait for an observed ready or failed lifecycle. Repeated boot and command execution are unavailable while booting."}) +} + +definition{ + name: vmReady, + parameters: [], + result: View, + body: (record View {id := "vmReady", journey := "vm", title := "VM reports ready", evidence := "HOST-OBSERVED READY", detail := "Commands execute in the guest. Stored stdout can receive an object digest, but that digest is not evidence that the command executed correctly or only once."}) +} + +definition{ + name: vmFailed, + parameters: [], + result: View, + body: (record View {id := "vmFailed", journey := "vm", title := "VM failed or interrupted", evidence := "HOST EFFECT FAILED", detail := "Inspect the VM error before choosing another boot. Do not treat a timeout or missing output as proof that guest effects did not occur."}) +} + +definition{ + name: pointerUnpinned, + parameters: [], + result: View, + body: (record View {id := "pointerUnpinned", journey := "pointers", title := "Authority must be pinned", evidence := "UNTRUSTED DISCOVERY", detail := "DNS records are discovery hints. Enter a key learned independently or explicitly choose and pin a saved or session-only signing key. A discovered key cannot authorize itself."}) +} + +definition{ + name: pointerPinned, + parameters: [], + result: View, + body: (record View {id := "pointerPinned", journey := "pointers", title := "Authority pinned; no retained head", evidence := "PINNED KEY ONLY", detail := "Discover or paste a signed pointer. With no retained head only a valid bootstrap is accepted; a lost later head requires a trusted recent anchor."}) +} + +definition{ + name: pointerLocal, + parameters: [], + result: View, + body: (record View {id := "pointerLocal", journey := "pointers", title := "Local pointer admitted", evidence := "OBSERVER-LOCAL HEAD; NOT PUBLISHED", detail := "The signature, authority and succession were accepted against this session head. This is not a provider publication receipt or global consensus."}) +} + +definition{ + name: pointerPending, + parameters: [], + result: View, + body: (record View {id := "pointerPending", journey := "pointers", title := "Provider operation pending", evidence := "PUBLICATION PENDING", detail := "Wait for the provider observation. Do not start another candidate while the current operation is in flight."}) +} + +definition{ + name: pointerUnknown, + parameters: [], + result: View, + body: (record View {id := "pointerUnknown", journey := "pointers", title := "Reconcile the exact candidate", evidence := "PUBLICATION UNKNOWN", detail := "The write may have completed. The retained candidate remains the reconciliation target. Read the provider without repeating the write or advancing to another candidate."}) +} + +definition{ + name: pointerPublished, + parameters: [], + result: View, + body: (record View {id := "pointerPublished", journey := "pointers", title := "Provider record observed", evidence := "PROVIDER CONFIRMED; OBSERVER-LOCAL", detail := "The provider confirmed this candidate or a read found its exact bytes. This does not establish global DNS ordering, resolver propagation, or consensus."}) +} + +definition{ + name: resourcesActive, + parameters: [], + result: View, + body: (record View {id := "resourcesActive", journey := "resources", title := "Application allowance active", evidence := "APPLICATION ACCOUNTING ONLY", detail := "Requests, application transfer bytes, new cache allocations and pure ring steps are bounded. TLS, ICE/STUN, VM work and host overhead are outside this accounting."}) +} + +definition{ + name: resourcesBlocked, + parameters: [], + result: View, + body: (record View {id := "resourcesBlocked", journey := "resources", title := "Review exhausted or refused allowance", evidence := "ALLOWANCE OR REFUSAL NEEDS REVIEW", detail := "Inspect and export retained charges. Each operation still checks its exact resource vector; a zero or exhausted dimension does not forbid work that consumes none of it. An expired epoch or full reservation log needs renewal. Renewal retains charges and does not retry effects."}) +} + +definition{ + name: actionJoin, + parameters: [], + result: Action, + body: (record Action {code := 0, id := "join", control := "reconnectBtn", journey := "mesh", label := "Join Mesh and Sync", help := "Requires explicit signaling disclosure and an available application allowance."}) +} + +definition{ + name: actionStore, + parameters: [], + result: Action, + body: (record Action {code := 1, id := "store", control := "dbPutBtn", journey := "objects", label := "Store and Request Placement", help := "Commit local bytes; request conditional placement with reachable peers."}) +} + +definition{ + name: actionClear, + parameters: [], + result: Action, + body: (record Action {code := 2, id := "clear", control := "dbWipeLocalBtn", journey := "objects", label := "Clear Local Object Bytes", help := "Only local bytes are cleared. Recovery may fail if no other fragments remain."}) +} + +definition{ + name: actionRecover, + parameters: [], + result: Action, + body: (record Action {code := 3, id := "recover", control := "dbSyncBtn", journey := "objects", label := "Fetch Reachable Fragments", help := "Checks fragments and complete object commitment before recovery."}) +} + +definition{ + name: actionStart, + parameters: [], + result: Action, + body: (record Action {code := 4, id := "start", control := "startJobBtn", journey := "compute", label := "Start Pure Replayable Job", help := "Deterministic ring work; not guest execution."}) +} + +definition{ + name: actionResume, + parameters: [], + result: Action, + body: (record Action {code := 5, id := "resume", control := "takeoverJobsBtn", journey := "compute", label := "Scan and Resume Pure Jobs", help := "Replay accepted checkpoints before continuation."}) +} + +definition{ + name: actionBoot, + parameters: [], + result: Action, + body: (record Action {code := 6, id := "boot", control := "bootVmBtn", journey := "vm", label := "Boot Linux VM", help := "Offline boot needs no IP address. Ethernet sharing requires an explicit static IPv4 host address and compatible subnet prefix before boot. Destroy retained instances before reconfiguration; operators must ensure address uniqueness."}) +} + +definition{ + name: actionExecute, + parameters: [], + result: Action, + body: (record Action {code := 7, id := "execute", control := "runVmCmdBtn", journey := "vm", label := "Run Guest Command and Store Stdout", help := "Host effect; a stored output digest does not certify execution."}) +} + +definition{ + name: actionSrv, + parameters: [], + result: Action, + body: (record Action {code := 8, id := "srv", control := "resolveSrvBtn", journey := "pointers", label := "Discover SRV Records", help := "DNS is discovery evidence only."}) +} + +definition{ + name: actionTxt, + parameters: [], + result: Action, + body: (record Action {code := 9, id := "txt", control := "resolveTxtBtn", journey := "pointers", label := "Discover and Check TXT Pointers", help := "Only independently pinned keys can authorize admitted pointer heads."}) +} + +definition{ + name: actionPin, + parameters: [], + result: Action, + body: (record Action {code := 10, id := "pin", control := "pinSessionAuthorityBtn", journey := "pointers", label := "Trust Saved Key or Create Session Key", help := "Explicitly pin the restored saved key, or create a session-only key if none is loaded. A different key does not inherit earlier trust."}) +} + +definition{ + name: actionAdmit, + parameters: [], + result: Action, + body: (record Action {code := 11, id := "admit", control := "admitPointerBtn", journey := "pointers", label := "Admit Pasted Pointer", help := "Requires a pinned authority and available application allowance."}) +} + +definition{ + name: actionPublish, + parameters: [], + result: Action, + body: (record Action {code := 12, id := "publish", control := "writeSignedDnsBtn", journey := "pointers", label := "Admit Next Pointer and Publish TXT", help := "Without provider credentials, only the local head is admitted. Unresolved writes cannot advance candidates."}) +} + +definition{ + name: actionReconcile, + parameters: [], + result: Action, + body: (record Action {code := 13, id := "reconcile", control := "reconcilePointerBtn", journey := "pointers", label := "Reconcile Unknown Publication", help := "Read the exact scoped provider candidate; do not repeat the uncertain write."}) +} + +definition{ + name: actionRenew, + parameters: [], + result: Action, + body: (record Action {code := 14, id := "renew", control := "renewBudgetBtn", journey := "resources", label := "Start New Epoch with These Limits", help := "Grants a fresh bounded allowance; retains prior epochs and does not retry effects."}) +} + +definition{ + name: actionExport, + parameters: [], + result: Action, + body: (record Action {code := 15, id := "export", control := "exportBudgetHistoryBtn", journey := "resources", label := "Export Policy History", help := "Export existing accounting without changing or refunding charges."}) +} + +definition{ + name: actionRecoveryExport, + parameters: [], + result: Action, + body: (record Action {code := 16, id := "RecoveryExport", control := "exportRecoveryBtn", journey := "objects", label := "Export Live Evidence", help := "Export complete local objects, pure checkpoints and supplied pointer evidence; no keys."}) +} + +definition{ + name: actionRecoveryImport, + parameters: [], + result: Action, + body: (record Action {code := 17, id := "RecoveryImport", control := "importRecoveryBtn", journey := "objects", label := "Verify and Import Locally", help := "Validate the complete bounded file before committing session-only evidence; no host effects."}) +} + +definition{ + name: actionRecoverySave, + parameters: [], + result: Action, + body: (record Action {code := 18, id := "RecoverySave", control := "exportRecoveredBtn", journey := "objects", label := "Export Recovery Vault", help := "Save verified evidence externally; accepted trust is never transferred by a file."}) +} + +definition{ + name: actionRecoveryDownload, + parameters: [], + result: Action, + body: (record Action {code := 19, id := "RecoveryDownload", control := "downloadRecoveredObjectBtn", journey := "objects", label := "Download Verified Object", help := "Download checked local bytes without mounting or publishing them."}) +} + +definition{ + name: actionRecoveryFinish, + parameters: [], + result: Action, + body: (record Action {code := 20, id := "RecoveryFinish", control := "resumeRecoveredJobBtn", journey := "objects", label := "Finish Pure Job Locally", help := "Explicitly finish deterministic ring work only; no VM or external effects."}) +} + +definition{ + name: actionRecoveryTrust, + parameters: [], + result: Action, + body: (record Action {code := 21, id := "RecoveryTrust", control := "acceptRecoveryAnchorBtn", journey := "objects", label := "Accept Exact Recent Anchor", help := "Requires independently obtained exact recent digest and writer key, current validity and explicit consent."}) +} + +definition{ + name: actionVmStop, + parameters: [], + result: Action, + body: (record Action {code := 22, id := "VmStop", control := "stopVmBtn", journey := "vm", label := "Stop VM", help := "Stop the current guest; an unconfirmed stop remains quarantined."}) +} + +definition{ + name: actionVmDestroy, + parameters: [], + result: Action, + body: (record Action {code := 23, id := "VmDestroy", control := "destroyVmBtn", journey := "vm", label := "Destroy VM", help := "Destroy the guest instance, revoke its grants and refuse stale callbacks."}) +} + +definition{ + name: actionVmCancel, + parameters: [], + result: Action, + body: (record Action {code := 24, id := "VmCancel", control := "cancelVmObservationBtn", journey := "vm", label := "Cancel and Stop VM", help := "Before dispatch, prevent the command. After dispatch, stop the whole VM, including other guest work; prior effects remain unknown."}) +} + +definition{ + name: actionVmReconcile, + parameters: [], + result: Action, + body: (record Action {code := 25, id := "VmReconcile", control := "reconcileVmCommandBtn", journey := "vm", label := "Observe Selected Command Result", help := "Observe the same command result without executing the command again."}) +} + +definition{ + name: actionVmForget, + parameters: [], + result: Action, + body: (record Action {code := 26, id := "VmForget", control := "forgetVmCommandBtn", journey := "vm", label := "Forget Resolved Command Evidence", help := "Free retained host command output only when resolved. Unknown effects stay retained; guest files are unchanged."}) +} + +definition{ + name: actionSaveAuthority, + parameters: [], + result: Action, + body: (record Action {code := 27, id := "saveAuthority", control := "saveAuthorityBtn", journey := "pointers", label := "Set Up or Restore Saved Authority", help := "Save a nonextractable origin-local signing key and explicitly pin it. Browser storage can be lost; there is no key backup or automatic replacement."}) +} + +definition{ + name: actionLoadPublication, + parameters: [], + result: Action, + body: (record Action {code := 28, id := "loadPublication", control := "loadPublicationBtn", journey := "pointers", label := "Load Saved Publication", help := "Load the exact zone, name and authority journal before reconciliation. Never repeat an unknown write merely because its owner tab closed."}) +} + +definition{ + name: actionRecoveryRestore, + parameters: [], + result: Action, + body: (record Action {code := 29, id := "RecoveryRestore", control := "restoreRecoveryAnchorBtn", journey := "objects", label := "Restore Accepted Live Head", help := "Explicitly restore only the separately accepted exact anchor into the same pinned live name and key, with no different retained head. No DNS, mesh or VM effect."}) +} + +definition{ + name: actionPlacementRepair, + parameters: [], + result: Action, + body: (record Action {code := 30, id := "PlacementRepair", control := "repairPlacementBtn", journey := "objects", label := "Repair Selected Placement", help := "Use the exact retained verified object to fill missing fragments, refresh expired custody or replace a selected live holder. Uncertain requests and old copies stay accounted; only fresh checked receipts establish custody."}) +} + +definition{ + name: placementRepairAllowed, + parameters: [selected : Bool, peers : Bool, blocked : Bool], + result: Bool, + body: (selected && (peers && (not blocked))) +} + +theorem{ + name: unselectedObjectCannotRepair, + parameters: [], + statement: (forall (peers : Bool), (forall (blocked : Bool), ((placementRepairAllowed false peers blocked) = false))), + proof: decide{} +} + +theorem{ + name: blockedPolicyCannotRepair, + parameters: [], + statement: (forall (selected : Bool), (forall (peers : Bool), ((placementRepairAllowed selected peers true) = false))), + proof: decide{} +} + +definition{ + name: actions, + parameters: [], + result: (List Action), + body: (cons (actionJoin) (cons (actionStore) (cons (actionClear) (cons (actionRecover) (cons (actionStart) (cons (actionResume) (cons (actionBoot) (cons (actionExecute) (cons (actionSrv) (cons (actionTxt) (cons (actionPin) (cons (actionAdmit) (cons (actionPublish) (cons (actionReconcile) (cons (actionRenew) (cons (actionExport) (cons (actionRecoveryExport) (cons (actionRecoveryImport) (cons (actionRecoverySave) (cons (actionRecoveryDownload) (cons (actionRecoveryFinish) (cons (actionRecoveryTrust) (cons (actionVmStop) (cons (actionVmDestroy) (cons (actionVmCancel) (cons (actionVmReconcile) (cons (actionVmForget) (cons (actionSaveAuthority) (cons (actionLoadPublication) (cons (actionRecoveryRestore) (cons (actionPlacementRepair) (nil Action)))))))))))))))))))))))))))))))) +} + +definition{ + name: recoveryEmpty, + parameters: [], + result: View, + body: (record View {id := "recoveryEmpty", journey := "objects", title := "No imported recovery evidence", evidence := "NO RESTORE EVIDENCE", detail := "Export complete live evidence before losing RAM, or choose a retained file. No recovery can survive loss of every required byte."}) +} + +definition{ + name: recoveryChecking, + parameters: [], + result: View, + body: (record View {id := "recoveryChecking", journey := "objects", title := "Checking recovery evidence", evidence := "NOT YET COMMITTED", detail := "The candidate is being validated. Existing evidence remains unchanged until the complete bounded operation commits."}) +} + +definition{ + name: recoveryChecked, + parameters: [], + result: View, + body: (record View {id := "recoveryChecked", journey := "objects", title := "Recovery evidence checked locally", evidence := "SESSION-ONLY VERIFIED EVIDENCE", detail := "Download restored objects or explicitly finish pure jobs. Imported pointer anchors remain untrusted; no mesh, VM or DNS effects ran."}) +} + +definition{ + name: recoveryTrusted, + parameters: [], + result: View, + body: (record View {id := "recoveryTrusted", journey := "objects", title := "Exact anchor accepted locally", evidence := "OPERATOR-ACCEPTED RECENT ANCHOR", detail := "The operator accepted an independently obtained exact digest and writer. Restore it separately into the same independently pinned live scope to resume strict succession. A different retained head is never overwritten. This is not global latest-state evidence or durable authority recovery."}) +} + +definition{ + name: recoveryRestored, + parameters: [], + result: View, + body: (record View {id := "recoveryRestored", journey := "objects", title := "Accepted anchor is the live local head", evidence := "STRICT SUCCESSION AVAILABLE", detail := "Only the exact next revision can advance this pinned observer. Restoration made no DNS write, mesh or VM effect, and proves neither global freshness nor durable retention."}) +} + +definition{ + name: vmTerminationPending, + parameters: [], + result: View, + body: (record View {id := "vmTerminationPending", journey := "vm", title := "Awaiting VM termination confirmation", evidence := "HOST TERMINATION PENDING", detail := "Stop or destroy was requested. The instance remains retained and locked until the host confirms the outcome. Prior command evidence is unchanged; unknown guest effects are not rolled back."}) +} + +definition{ + name: vmStopped, + parameters: [], + result: View, + body: (record View {id := "vmStopped", journey := "vm", title := "VM stop confirmed; instance retained", evidence := "HOST-OBSERVED STOPPED", detail := "The emulator confirmed stop. Destroy the retained instance before booting or changing configuration. Completed command evidence remains available; unknown prior guest effects remain unknown."}) +} + +definition{ + name: vmDestroyed, + parameters: [], + result: View, + body: (record View {id := "vmDestroyed", journey := "vm", title := "VM destruction confirmed", evidence := "HOST-OBSERVED DESTROYED", detail := "The emulator confirmed destruction and released the instance. You may configure and boot a fresh VM. Retained command evidence is unchanged; unknown prior guest effects are not rolled back."}) +} + +definition{ + name: vmQuarantined, + parameters: [], + result: View, + body: (record View {id := "vmQuarantined", journey := "vm", title := "Guest administration unresolved", evidence := "HOST OUTCOME UNKNOWN", detail := "The guest instance is quarantined. Stop or destroy it explicitly; do not repeat an unknown command or boot another instance."}) +} + +definition{ + name: recoveryView, + parameters: [facts : Facts], + result: View, + body: (if (project facts recoveryBusy) then (recoveryChecking) else (if (project facts recoveryRestoredAnchor) then (recoveryRestored) else (if (project facts recoveryAcceptedAnchor) then (recoveryTrusted) else (if (project facts recoveryHasEvidence) then (recoveryChecked) else (recoveryEmpty))))) +} + +definition{ + name: meshView, + parameters: [facts : Facts], + result: View, + body: (if (project facts disclosureAccepted) then (if (project facts meshJoined) then (if (project facts peersReachable) then (meshConnected) else (meshSearching)) else (meshReady)) else (meshDisclosure)) +} + +definition{ + name: objectsView, + parameters: [facts : Facts], + result: View, + body: (if (project facts hasObject) then (if (project facts recoverablePlacement) then (objectsPlaced) else (objectsLocal)) else (if (project facts hasPartial) then (objectsPartial) else (objectsEmpty))) +} + +definition{ + name: computeView, + parameters: [facts : Facts], + result: View, + body: (if (project facts unfinishedJobs) then (if (project facts replayedJobs) then (computeReplay) else (computeUnverified)) else (if (project facts hasJobs) then (computeDone) else (computeEmpty))) +} + +definition{ + name: vmView, + parameters: [facts : Facts], + result: View, + body: (if (project facts vmTerminationPending) then (vmTerminationPending) else (if (project facts vmStopped) then (vmStopped) else (if (project facts vmAdminBlocked) then (vmQuarantined) else (if (project facts vmDestroyed) then (vmDestroyed) else (if (project facts vmBooting) then (vmBooting) else (if (project facts vmReady) then (vmReady) else (if (project facts vmFailed) then (vmFailed) else (vmIdle)))))))) +} + +definition{ + name: pointersView, + parameters: [facts : Facts], + result: View, + body: (if (project facts authorityPinned) then (if (project facts publicationBusy) then (pointerPending) else (if (project facts publicationUnknown) then (pointerUnknown) else (if (project facts publicationPublished) then (pointerPublished) else (if (project facts headRetained) then (pointerLocal) else (pointerPinned))))) else (pointerUnpinned)) +} + +definition{ + name: resourcesView, + parameters: [facts : Facts], + result: View, + body: (if ((project facts policyBlocked) || (project facts policyAttention)) then (resourcesBlocked) else (resourcesActive)) +} + +definition{ + name: joinAllowed, + parameters: [disclosed : Bool, blocked : Bool], + result: Bool, + body: (disclosed && (not blocked)) +} + +definition{ + name: publicationAllowed, + parameters: [pinned : Bool, candidate : Bool, busy : Bool, unknown : Bool, blocked : Bool], + result: Bool, + body: (pinned && (candidate && ((not busy) && ((not unknown) && (not blocked))))) +} + +definition{ + name: reconciliationAllowed, + parameters: [pinned : Bool, configured : Bool, unknown : Bool, busy : Bool, blocked : Bool], + result: Bool, + body: (pinned && (configured && (unknown && ((not busy) && (not blocked))))) +} + +definition{ + name: executionAllowed, + parameters: [ready : Bool, blocked : Bool], + result: Bool, + body: (ready && (not blocked)) +} + +definition{ + name: actionAllowed, + parameters: [action : Nat, facts : Facts], + result: Bool, + body: (if (action =? 0) then (joinAllowed (project facts disclosureAccepted) (project facts policyBlocked)) else (if (action =? 1) then (not (project facts policyBlocked)) else (if (action =? 2) then (project facts hasObject) else (if (action =? 3) then (((project facts meshJoined) || (project facts relayEnabled)) && (not (project facts policyBlocked))) else (if (action =? 4) then (not (project facts policyBlocked)) else (if (action =? 5) then (((project facts unfinishedJobs) || ((project facts meshJoined) || (project facts relayEnabled))) && (not (project facts policyBlocked))) else (if (action =? 6) then ((project facts vmCanBoot) && ((not (project facts vmReady)) && (not (project facts vmBooting)))) else (if (action =? 7) then ((project facts vmCanExecute) && (executionAllowed (project facts vmReady) (project facts policyBlocked))) else (if (action =? 8) then (not (project facts policyBlocked)) else (if (action =? 9) then (not (project facts policyBlocked)) else (if (action =? 10) then true else (if (action =? 11) then ((project facts authorityPinned) && (not (project facts policyBlocked))) else (if (action =? 12) then (publicationAllowed (project facts authorityPinned) ((project facts hasObject) || (project facts headRetained)) (project facts publicationBusy) (project facts publicationUnknown) (project facts policyBlocked)) else (if (action =? 13) then (reconciliationAllowed (project facts authorityPinned) (project facts dnsConfigured) (project facts publicationUnknown) (project facts publicationBusy) (project facts policyBlocked)) else (if (action =? 14) then true else (if (action =? 15) then true else (if (action =? 16) then ((not (project facts recoveryBusy)) && ((project facts hasObject) || ((project facts hasJobs) || (project facts headRetained)))) else (if (action =? 17) then ((not (project facts recoveryBusy)) && (project facts recoveryFileSelected)) else (if (action =? 18) then ((not (project facts recoveryBusy)) && (project facts recoveryHasEvidence)) else (if (action =? 19) then ((not (project facts recoveryBusy)) && (project facts recoveryHasObjects)) else (if (action =? 20) then ((not (project facts recoveryBusy)) && (project facts recoveryHasJobs)) else (if (action =? 21) then ((not (project facts recoveryBusy)) && ((project facts recoveryHasAnchors) && (project facts recoveryAnchorConsent))) else (if (action =? 22) then ((project facts vmCanAdminister) && (not (project facts vmStopped))) else (if (action =? 23) then (project facts vmCanAdminister) else (if (action =? 24) then (project facts vmCanCancelObservation) else (if (action =? 25) then (project facts vmCanReconcileCommand) else (if (action =? 26) then (project facts vmCanForgetCommand) else (if (action =? 30) then (placementRepairAllowed (project facts placementObjectSelected) (project facts peersReachable) (project facts policyBlocked)) else (if (action =? 29) then ((not (project facts recoveryBusy)) && ((project facts recoveryAcceptedAnchor) && (project facts recoveryCanRestoreAnchor))) else ((action =? 27) || (action =? 28))))))))))))))))))))))))))))))) +} + +definition{ + name: integrityLabel, + parameters: [verified : Bool], + result: String, + body: (if verified then "DIGEST MATCH" else "PARTIAL") +} + +definition{ + name: executionLabel, + parameters: [replayed : Bool], + result: String, + body: (if replayed then "REPLAYED PURE CHECKPOINT" else "UNVERIFIED") +} + +definition{ + name: productTitle, + parameters: [], + result: String, + body: "Stitch / recoverable objects and replayable pure jobs" +} + +definition{ + name: disclosureLabel, + parameters: [], + result: String, + body: "Allow public mesh signaling (topic, signaling messages and ICE metadata; not private)" +} + +definition{ + name: relayLabel, + parameters: [], + result: String, + body: "Public object relay: share object/job bytes on ntfy.sh (not private)" +} + +definition{ + name: provenanceLabel, + parameters: [], + result: String, + body: "Journeys, evidence labels and action admission are projected from Product.Experience. Browser observations and adapter tests are not whole-host certification." +} + +definition{ + name: unknownPublicationFacts, + parameters: [], + result: Facts, + body: (record Facts {recoveryBusy := false, recoveryFileSelected := false, recoveryHasEvidence := false, recoveryHasObjects := false, recoveryHasJobs := false, recoveryHasAnchors := false, recoveryAnchorConsent := false, recoveryAcceptedAnchor := false, recoveryCanRestoreAnchor := false, recoveryRestoredAnchor := false, vmCanBoot := false, vmCanExecute := false, vmCanAdminister := false, vmCanCancelObservation := false, vmCanForgetCommand := false, vmCanReconcileCommand := false, vmAdminBlocked := false, vmTerminationPending := false, vmStopped := false, vmDestroyed := false, disclosureAccepted := false, meshJoined := false, peersReachable := false, relayEnabled := false, hasObject := true, hasPartial := false, placementObjectSelected := false, recoverablePlacement := false, hasJobs := false, unfinishedJobs := false, replayedJobs := false, vmBooting := false, vmReady := false, vmFailed := false, authorityPinned := true, headRetained := true, dnsConfigured := true, publicationBusy := false, publicationUnknown := true, publicationPublished := false, policyBlocked := false, policyAttention := false}) +} + +theorem{ + name: unknownPublicationDoesNotPermitNewCandidate, + parameters: [], + statement: ((actionAllowed 12 (unknownPublicationFacts)) = false), + proof: decide{} +} + +theorem{ + name: unknownPublicationOffersReconciliation, + parameters: [], + statement: ((actionAllowed 13 (unknownPublicationFacts)) = true), + proof: decide{} +} + +theorem{ + name: unknownPublicationIsVisible, + parameters: [], + statement: ((project (pointersView (unknownPublicationFacts)) id) = "pointerUnknown"), + proof: decide{} +} + +theorem{ + name: initialMeshCannotJoinWithoutDisclosure, + parameters: [], + statement: ((actionAllowed 0 (initialFacts)) = false), + proof: decide{} +} + +theorem{ + name: initialVmCannotExecute, + parameters: [], + statement: ((actionAllowed 7 (initialFacts)) = false), + proof: decide{} +} + +theorem{ + name: initialPolicyCanBeExported, + parameters: [], + statement: ((actionAllowed 15 (initialFacts)) = true), + proof: decide{} +} + +structure{ + name: EvidenceStyle, + type_parameters: [], + parameters: [], + fields: [{name: id, type: String}, {name: color, type: String}] +} + +definition{ + name: evidenceStyles, + parameters: [], + result: (List EvidenceStyle), + body: (cons (record EvidenceStyle {id := "observed", color := "#8ce6ac"}) (cons (record EvidenceStyle {id := "attention", color := "#f5b66b"}) (cons (record EvidenceStyle {id := "pending", color := "#9bc4ff"}) (cons (record EvidenceStyle {id := "unestablished", color := "#c4c4c4"}) (nil EvidenceStyle))))) +} + +definition{ + name: viewStyle, + parameters: [facts : Facts, journey : Nat], + result: String, + body: (if (journey =? 0) then (if (project facts disclosureAccepted) then (if (project facts peersReachable) then "observed" else "pending") else "attention") else (if (journey =? 1) then (if (project facts hasObject) then "observed" else "unestablished") else (if (journey =? 2) then (if (project facts replayedJobs) then "observed" else "unestablished") else (if (journey =? 3) then (if (project facts vmTerminationPending) then "pending" else (if (project facts vmStopped) then "observed" else (if (project facts vmAdminBlocked) then "attention" else (if (project facts vmDestroyed) then "observed" else (if (project facts vmBooting) then "pending" else (if (project facts vmFailed) then "attention" else "unestablished")))))) else (if (journey =? 4) then (if (project facts publicationUnknown) then "attention" else (if (project facts publicationBusy) then "pending" else (if (project facts headRetained) then "observed" else "unestablished"))) else (if (project facts policyBlocked) then "attention" else "observed")))))) +} + +definition{name: statusLivePolicy, parameters: [], result: String, body: "polite"} + +definition{name: navigationLabel, parameters: [], result: String, body: "Stitch operator journeys"} + +definition{name: focusNavigationTarget, parameters: [], result: Bool, body: true} + +definition{name: navigationScrollBehavior, parameters: [], result: String, body: "auto"} + +theorem{ + name: unknownNeverPermitsPublication, + parameters: [], + statement: (forall (pinned : Bool), (forall (candidate : Bool), (forall (busy : Bool), (forall (blocked : Bool), ((publicationAllowed pinned candidate busy true blocked) = false))))), + proof: decide{} +} + +theorem{ + name: undisclosedNeverPermitsJoin, + parameters: [], + statement: (forall (blocked : Bool), ((joinAllowed false blocked) = false)), + proof: decide{} +} + +theorem{ + name: unreadyNeverPermitsGuestExecution, + parameters: [], + statement: (forall (blocked : Bool), ((executionAllowed false blocked) = false)), + proof: decide{} +} + +theorem{ + name: budgetBlockNeverPermitsPublication, + parameters: [], + statement: (forall (pinned : Bool), (forall (candidate : Bool), (forall (busy : Bool), (forall (unknown : Bool), ((publicationAllowed pinned candidate busy unknown true) = false))))), + proof: decide{} +} + +theorem{ + name: knownPublicationNeverOffersReconciliation, + parameters: [], + statement: (forall (pinned : Bool), (forall (configured : Bool), (forall (busy : Bool), (forall (blocked : Bool), ((reconciliationAllowed pinned configured false busy blocked) = false))))), + proof: decide{} +} + +definition{ + name: journeyVisible, + parameters: [selected : Nat, journey : Nat], + result: Bool, + body: (selected =? journey) +} + +definition{ + name: explanationInitiallyOpen, + parameters: [facts : Facts, journey : Nat], + result: Bool, + body: (if (journey =? 0) then (not (project facts disclosureAccepted)) else (if (journey =? 4) then (project facts publicationUnknown) else (if (journey =? 5) then ((project facts policyBlocked) || (project facts policyAttention)) else false))) +} + +definition{ + name: publicationSetupVisible, + parameters: [facts : Facts], + result: Bool, + body: (project facts authorityPinned) +} + +definition{name: explanationLabel, parameters: [], result: String, body: "What this evidence means"} + +definition{ + name: recoveryPolicyLabel, + parameters: [], + result: String, + body: "Review resource policy" +} + +definition{ + name: recoveryPolicyVisible, + parameters: [facts : Facts], + result: Bool, + body: ((project facts policyBlocked) || (project facts policyAttention)) +} + +definition{ + name: admissionInputVisible, + parameters: [facts : Facts], + result: Bool, + body: (project facts authorityPinned) +} + +definition{ + name: vmCommandVisible, + parameters: [facts : Facts], + result: Bool, + body: (project facts vmReady) +} + +definition{ + name: publicationSetupInitiallyOpen, + parameters: [facts : Facts], + result: Bool, + body: (project facts publicationUnknown) +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Features.lex.tex b/app/src/Product/Features.lex.tex new file mode 100644 index 0000000..13453d8 --- /dev/null +++ b/app/src/Product/Features.lex.tex @@ -0,0 +1,1046 @@ +\begin{lexlean}{Product.Features} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Foundation.Arch} +\importmodule{Product.Architecture} +\title{Stitch features and journeys} +\begin{semanticmodule} +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: sha256, type: String} + ] +} + +definition{ + name: sources, + parameters: [], + result: (List Source), + body: (cons (record Source {record := "Product.Features", path := "app/src/Product/Experience.lex.tex", firstLine := 0, lastLine := 0, sha256 := "6f2625fdce3d3d51899cabc17ce3d57ec0a9381dd3bf3e6477da6ae3ccfb84bd"}) (cons (record Source {record := "Product.Features", path := "docs/prism-model.md", firstLine := 0, lastLine := 0, sha256 := "ece338421a27de9e0f588e66badf477eebe3012d194103f14a722db02cec24c7"}) (cons (record Source {record := "Product.Features", path := "docs/product-projection.md", firstLine := 0, lastLine := 0, sha256 := "446c2fcefd1519aa8a60f78115fb3f594ac3329018da3ef432381ea428c2faa1"}) (cons (record Source {record := "Product.Features", path := "index.html", firstLine := 0, lastLine := 0, sha256 := "b8e573b5b50c533114532ef4a6f851efc1508082c3a42d2d1002e20f22400801"}) (cons (record Source {record := "Product.Features", path := "site/catalog.js", firstLine := 0, lastLine := 0, sha256 := "b72eea8eafcd5a8a9d996c1b78619ca9d113fd530e82c39baade83fee0b28f36"}) (cons (record Source {record := "Product.Features", path := "site/explorer.js", firstLine := 0, lastLine := 0, sha256 := "72b1e0d06485e235429601ff640772aff4565002a37290454fd08fd40c0a1b79"}) (cons (record Source {record := "Product.Features", path := "src/authority-ui.js", firstLine := 0, lastLine := 0, sha256 := "96e76a92918a52dff05780b76f59158916540fd38d1ced986fd6001d3ee1482b"}) (cons (record Source {record := "Product.Features", path := "tests/authenticated-signaling.test.js", firstLine := 0, lastLine := 0, sha256 := "58263f698373030cd4c20007b1c0b0e9dc8b781558a7366f1acd32decdfe6d5f"}) (cons (record Source {record := "Product.Features", path := "tests/authority-ui.test.js", firstLine := 0, lastLine := 0, sha256 := "d0f986cc126047f3b269dc47509c5ade56a5bfa2e6cf30ee62906a527326cc7d"}) (cons (record Source {record := "Product.Features", path := "tests/browser-authority-lifecycle.test.js", firstLine := 0, lastLine := 0, sha256 := "6d8f3f41ddf18e5c42615e39e72f2965a39dddc5136f8d6388af5fe396d785b9"}) (cons (record Source {record := "Product.Features", path := "tests/browser/authority.spec.mjs", firstLine := 0, lastLine := 0, sha256 := "6e6bd7264dc80bea62459381d27998dc399655f874a36a481daf0bd94af88be2"}) (cons (record Source {record := "Product.Features", path := "tests/browser/mesh.spec.mjs", firstLine := 0, lastLine := 0, sha256 := "5c77135433b1a26adc59e12a4aefeb9258e2622fcc533a4fccd558a5bada62f1"}) (cons (record Source {record := "Product.Features", path := "tests/browser/site.spec.mjs", firstLine := 0, lastLine := 0, sha256 := "973145fcf6ad6d5e645a9492f811e28cb3297a1c50d2f4629e15e1da7844cc71"}) (cons (record Source {record := "Product.Features", path := "tests/browser/vm.spec.mjs", firstLine := 0, lastLine := 0, sha256 := "198cf744f3651923a35f6f9c9a0eccf5e710bf7907b06a46b41d294ef936278c"}) (cons (record Source {record := "Product.Features", path := "tests/contracts.test.js", firstLine := 0, lastLine := 0, sha256 := "f1ac995b74ceabd230e670476016796ca18c31ad43c0639ddfb700aba52dde60"}) (cons (record Source {record := "Product.Features", path := "tests/custody.test.js", firstLine := 0, lastLine := 0, sha256 := "7d688bec8a34729197bae605daacd4b3efeedb0e901b8af31322925bd0717329"}) (cons (record Source {record := "Product.Features", path := "tests/dns-publication.test.js", firstLine := 0, lastLine := 0, sha256 := "02fe2e5e85a715481cd11b55534dffe42b7f27305f63f1fb3bdb03815225d98c"}) (cons (record Source {record := "Product.Features", path := "tests/execution-identity.test.js", firstLine := 0, lastLine := 0, sha256 := "cd680245065fa6be6ed51fc77324022c29938298f3f53c76b67fc36415e55a56"}) (cons (record Source {record := "Product.Features", path := "tests/operator-ui.test.js", firstLine := 0, lastLine := 0, sha256 := "06ffd0c89d0ba6345b7da56284d3a3cec813d4cfd6fea231140ca9bb910e516f"}) (cons (record Source {record := "Product.Features", path := "tests/placement-repair.test.js", firstLine := 0, lastLine := 0, sha256 := "295ba55268bbcb3be7bd3c9b77a11b4938167ef0bebf83b85facedd536e1ad85"}) (cons (record Source {record := "Product.Features", path := "tests/pointer-recovery.test.js", firstLine := 0, lastLine := 0, sha256 := "57eb8bab548b1e0f5cd4ee66a3a71dda8057859f18ecf4c751fbd930b4ac0fc4"}) (cons (record Source {record := "Product.Features", path := "tests/primitive-operations.test.js", firstLine := 0, lastLine := 0, sha256 := "e3c00e18d47db0de4dd19bffeba1edcb58f82b106f8f66d429a725248ec14a98"}) (cons (record Source {record := "Product.Features", path := "tests/product-facets.test.js", firstLine := 0, lastLine := 0, sha256 := "0219469047bd8cf22e6b71b6a6797606eaa9ff065a61ad078de36a9f662a1629"}) (cons (record Source {record := "Product.Features", path := "tests/product-model.test.js", firstLine := 0, lastLine := 0, sha256 := "fd91398d31af63b605e9dbc9f2b6b103ad4821df1cd55aba077648fabfba80e2"}) (cons (record Source {record := "Product.Features", path := "tests/recovery.test.js", firstLine := 0, lastLine := 0, sha256 := "da7f23c8411b4adc63fffa602351ad3ecd0999909717c48bf91aeb21bc5f9d11"}) (cons (record Source {record := "Product.Features", path := "tests/runtime-admission.test.js", firstLine := 0, lastLine := 0, sha256 := "684901ac8a287078f86958f414d3d514e910cd44fa6f6be1b80cd6435c4c3404"}) (cons (record Source {record := "Product.Features", path := "tests/site-explorer.test.js", firstLine := 0, lastLine := 0, sha256 := "83cbd8bdf511a211a3e4c83ee2e41f34f16f1c021019cecbf0d4bf35622eec45"}) (cons (record Source {record := "Product.Features", path := "tests/source-evidence.test.js", firstLine := 0, lastLine := 0, sha256 := "5e6f783768f076e1fc037803d87595eb78c34a358fc5d6119a48c5f5e6107a49"}) (cons (record Source {record := "Product.Features", path := "tests/transport-generation.test.js", firstLine := 0, lastLine := 0, sha256 := "4787ce02dd406ff86055e4aa18c77a760045456772e2b9f78a8f34fc11cb9eec"}) (cons (record Source {record := "Product.Features", path := "tests/vm-administration.test.js", firstLine := 0, lastLine := 0, sha256 := "db3a943b140e27bf10d8da74140b6359e6570f490eaafe2ddb9d4f492aa566b4"}) (cons (record Source {record := "Product.Features", path := "tests/vm-lifecycle.test.js", firstLine := 0, lastLine := 0, sha256 := "3864bbceb02efb69ac55ef37c4944c02677b12aabfce57ee50f3914fd0df20af"}) (nil Source)))))))))))))))))))))))))))))))) +} + +definition{ + name: callJoin, + parameters: [], + result: String, + body: "Browser control #reconnectBtn: Join Mesh and Sync" +} + +definition{ + name: acceptJoin, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authenticated-signaling.test.js; tests/transport-generation.test.js; tests/browser/mesh.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 0." +} + +definition{ + name: featureJoin, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Join Mesh and Sync. Requires explicit signaling disclosure and an available application allowance.", calls := (cons "Product.Features::callJoin" (nil String)), acceptance := (cons "Product.Features::acceptJoin" (nil String))}) +} + +definition{ + name: callStore, + parameters: [], + result: String, + body: "Browser control #dbPutBtn: Store and Request Placement" +} + +definition{ + name: acceptStore, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 1." +} + +definition{ + name: featureStore, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Store and Request Placement. Commit local bytes; request conditional placement with reachable peers.", calls := (cons "Product.Features::callStore" (nil String)), acceptance := (cons "Product.Features::acceptStore" (nil String))}) +} + +definition{ + name: callClear, + parameters: [], + result: String, + body: "Browser control #dbWipeLocalBtn: Clear Local Object Bytes" +} + +definition{ + name: acceptClear, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 2." +} + +definition{ + name: featureClear, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Clear Local Object Bytes. Only local bytes are cleared. Recovery may fail if no other fragments remain.", calls := (cons "Product.Features::callClear" (nil String)), acceptance := (cons "Product.Features::acceptClear" (nil String))}) +} + +definition{ + name: callRecover, + parameters: [], + result: String, + body: "Browser control #dbSyncBtn: Fetch Reachable Fragments" +} + +definition{ + name: acceptRecover, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 3." +} + +definition{ + name: featureRecover, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Fetch Reachable Fragments. Checks fragments and complete object commitment before recovery.", calls := (cons "Product.Features::callRecover" (nil String)), acceptance := (cons "Product.Features::acceptRecover" (nil String))}) +} + +definition{ + name: callStart, + parameters: [], + result: String, + body: "Browser control #startJobBtn: Start Pure Replayable Job" +} + +definition{ + name: acceptStart, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/execution-identity.test.js; tests/primitive-operations.test.js; tests/runtime-admission.test.js. Exact action guard: Product.Experience::actionAllowed code 4." +} + +definition{ + name: featureStart, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Start Pure Replayable Job. Deterministic ring work; not guest execution.", calls := (cons "Product.Features::callStart" (nil String)), acceptance := (cons "Product.Features::acceptStart" (nil String))}) +} + +definition{ + name: callResume, + parameters: [], + result: String, + body: "Browser control #takeoverJobsBtn: Scan and Resume Pure Jobs" +} + +definition{ + name: acceptResume, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/execution-identity.test.js; tests/primitive-operations.test.js; tests/runtime-admission.test.js. Exact action guard: Product.Experience::actionAllowed code 5." +} + +definition{ + name: featureResume, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Scan and Resume Pure Jobs. Replay accepted checkpoints before continuation.", calls := (cons "Product.Features::callResume" (nil String)), acceptance := (cons "Product.Features::acceptResume" (nil String))}) +} + +definition{ + name: callBoot, + parameters: [], + result: String, + body: "Browser control #bootVmBtn: Boot Linux VM" +} + +definition{ + name: acceptBoot, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/vm-lifecycle.test.js; tests/vm-administration.test.js; tests/browser/vm.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 6." +} + +definition{ + name: featureBoot, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Boot Linux VM. Offline boot needs no IP address. Ethernet sharing requires an explicit static IPv4 host address and compatible subnet prefix before boot. Destroy retained instances before reconfiguration; operators must ensure address uniqueness.", calls := (cons "Product.Features::callBoot" (nil String)), acceptance := (cons "Product.Features::acceptBoot" (nil String))}) +} + +definition{ + name: callExecute, + parameters: [], + result: String, + body: "Browser control #runVmCmdBtn: Run Guest Command and Store Stdout" +} + +definition{ + name: acceptExecute, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/vm-lifecycle.test.js; tests/vm-administration.test.js; tests/browser/vm.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 7." +} + +definition{ + name: featureExecute, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Run Guest Command and Store Stdout. Host effect; a stored output digest does not certify execution.", calls := (cons "Product.Features::callExecute" (nil String)), acceptance := (cons "Product.Features::acceptExecute" (nil String))}) +} + +definition{ + name: callSrv, + parameters: [], + result: String, + body: "Browser control #resolveSrvBtn: Discover SRV Records" +} + +definition{ + name: acceptSrv, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/dns-publication.test.js; tests/browser-authority-lifecycle.test.js; tests/browser/authority.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 8." +} + +definition{ + name: featureSrv, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Discover SRV Records. DNS is discovery evidence only.", calls := (cons "Product.Features::callSrv" (nil String)), acceptance := (cons "Product.Features::acceptSrv" (nil String))}) +} + +definition{ + name: callTxt, + parameters: [], + result: String, + body: "Browser control #resolveTxtBtn: Discover and Check TXT Pointers" +} + +definition{ + name: acceptTxt, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/dns-publication.test.js; tests/browser-authority-lifecycle.test.js; tests/browser/authority.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 9." +} + +definition{ + name: featureTxt, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Discover and Check TXT Pointers. Only independently pinned keys can authorize admitted pointer heads.", calls := (cons "Product.Features::callTxt" (nil String)), acceptance := (cons "Product.Features::acceptTxt" (nil String))}) +} + +definition{ + name: callPin, + parameters: [], + result: String, + body: "Browser control #pinSessionAuthorityBtn: Trust Saved Key or Create Session Key" +} + +definition{ + name: acceptPin, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/dns-publication.test.js; tests/browser-authority-lifecycle.test.js; tests/browser/authority.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 10." +} + +definition{ + name: featurePin, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Trust Saved Key or Create Session Key. Explicitly pin the restored saved key, or create a session-only key if none is loaded. A different key does not inherit earlier trust.", calls := (cons "Product.Features::callPin" (nil String)), acceptance := (cons "Product.Features::acceptPin" (nil String))}) +} + +definition{ + name: callAdmit, + parameters: [], + result: String, + body: "Browser control #admitPointerBtn: Admit Pasted Pointer" +} + +definition{ + name: acceptAdmit, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/dns-publication.test.js; tests/browser-authority-lifecycle.test.js; tests/browser/authority.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 11." +} + +definition{ + name: featureAdmit, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Admit Pasted Pointer. Requires a pinned authority and available application allowance.", calls := (cons "Product.Features::callAdmit" (nil String)), acceptance := (cons "Product.Features::acceptAdmit" (nil String))}) +} + +definition{ + name: callPublish, + parameters: [], + result: String, + body: "Browser control #writeSignedDnsBtn: Admit Next Pointer and Publish TXT" +} + +definition{ + name: acceptPublish, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/dns-publication.test.js; tests/browser-authority-lifecycle.test.js; tests/browser/authority.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 12." +} + +definition{ + name: featurePublish, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Admit Next Pointer and Publish TXT. Without provider credentials, only the local head is admitted. Unresolved writes cannot advance candidates.", calls := (cons "Product.Features::callPublish" (nil String)), acceptance := (cons "Product.Features::acceptPublish" (nil String))}) +} + +definition{ + name: callReconcile, + parameters: [], + result: String, + body: "Browser control #reconcilePointerBtn: Reconcile Unknown Publication" +} + +definition{ + name: acceptReconcile, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/dns-publication.test.js; tests/browser-authority-lifecycle.test.js; tests/browser/authority.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 13." +} + +definition{ + name: featureReconcile, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Reconcile Unknown Publication. Read the exact scoped provider candidate; do not repeat the uncertain write.", calls := (cons "Product.Features::callReconcile" (nil String)), acceptance := (cons "Product.Features::acceptReconcile" (nil String))}) +} + +definition{ + name: callRenew, + parameters: [], + result: String, + body: "Browser control #renewBudgetBtn: Start New Epoch with These Limits" +} + +definition{ + name: acceptRenew, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/runtime-admission.test.js; tests/operator-ui.test.js. Exact action guard: Product.Experience::actionAllowed code 14." +} + +definition{ + name: featureRenew, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Start New Epoch with These Limits. Grants a fresh bounded allowance; retains prior epochs and does not retry effects.", calls := (cons "Product.Features::callRenew" (nil String)), acceptance := (cons "Product.Features::acceptRenew" (nil String))}) +} + +definition{ + name: callExport, + parameters: [], + result: String, + body: "Browser control #exportBudgetHistoryBtn: Export Policy History" +} + +definition{ + name: acceptExport, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/runtime-admission.test.js; tests/operator-ui.test.js. Exact action guard: Product.Experience::actionAllowed code 15." +} + +definition{ + name: featureExport, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Export Policy History. Export existing accounting without changing or refunding charges.", calls := (cons "Product.Features::callExport" (nil String)), acceptance := (cons "Product.Features::acceptExport" (nil String))}) +} + +definition{ + name: callRecoveryExport, + parameters: [], + result: String, + body: "Browser control #exportRecoveryBtn: Export Live Evidence" +} + +definition{ + name: acceptRecoveryExport, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 16." +} + +definition{ + name: featureRecoveryExport, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Export Live Evidence. Export complete local objects, pure checkpoints and supplied pointer evidence; no keys.", calls := (cons "Product.Features::callRecoveryExport" (nil String)), acceptance := (cons "Product.Features::acceptRecoveryExport" (nil String))}) +} + +definition{ + name: callRecoveryImport, + parameters: [], + result: String, + body: "Browser control #importRecoveryBtn: Verify and Import Locally" +} + +definition{ + name: acceptRecoveryImport, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 17." +} + +definition{ + name: featureRecoveryImport, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Verify and Import Locally. Validate the complete bounded file before committing session-only evidence; no host effects.", calls := (cons "Product.Features::callRecoveryImport" (nil String)), acceptance := (cons "Product.Features::acceptRecoveryImport" (nil String))}) +} + +definition{ + name: callRecoverySave, + parameters: [], + result: String, + body: "Browser control #exportRecoveredBtn: Export Recovery Vault" +} + +definition{ + name: acceptRecoverySave, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 18." +} + +definition{ + name: featureRecoverySave, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Export Recovery Vault. Save verified evidence externally; accepted trust is never transferred by a file.", calls := (cons "Product.Features::callRecoverySave" (nil String)), acceptance := (cons "Product.Features::acceptRecoverySave" (nil String))}) +} + +definition{ + name: callRecoveryDownload, + parameters: [], + result: String, + body: "Browser control #downloadRecoveredObjectBtn: Download Verified Object" +} + +definition{ + name: acceptRecoveryDownload, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 19." +} + +definition{ + name: featureRecoveryDownload, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Download Verified Object. Download checked local bytes without mounting or publishing them.", calls := (cons "Product.Features::callRecoveryDownload" (nil String)), acceptance := (cons "Product.Features::acceptRecoveryDownload" (nil String))}) +} + +definition{ + name: callRecoveryFinish, + parameters: [], + result: String, + body: "Browser control #resumeRecoveredJobBtn: Finish Pure Job Locally" +} + +definition{ + name: acceptRecoveryFinish, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 20." +} + +definition{ + name: featureRecoveryFinish, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Finish Pure Job Locally. Explicitly finish deterministic ring work only; no VM or external effects.", calls := (cons "Product.Features::callRecoveryFinish" (nil String)), acceptance := (cons "Product.Features::acceptRecoveryFinish" (nil String))}) +} + +definition{ + name: callRecoveryTrust, + parameters: [], + result: String, + body: "Browser control #acceptRecoveryAnchorBtn: Accept Exact Recent Anchor" +} + +definition{ + name: acceptRecoveryTrust, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 21." +} + +definition{ + name: featureRecoveryTrust, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Accept Exact Recent Anchor. Requires independently obtained exact recent digest and writer key, current validity and explicit consent.", calls := (cons "Product.Features::callRecoveryTrust" (nil String)), acceptance := (cons "Product.Features::acceptRecoveryTrust" (nil String))}) +} + +definition{ + name: callVmStop, + parameters: [], + result: String, + body: "Browser control #stopVmBtn: Stop VM" +} + +definition{ + name: acceptVmStop, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/vm-lifecycle.test.js; tests/vm-administration.test.js; tests/browser/vm.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 22." +} + +definition{ + name: featureVmStop, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Stop VM. Stop the current guest; an unconfirmed stop remains quarantined.", calls := (cons "Product.Features::callVmStop" (nil String)), acceptance := (cons "Product.Features::acceptVmStop" (nil String))}) +} + +definition{ + name: callVmDestroy, + parameters: [], + result: String, + body: "Browser control #destroyVmBtn: Destroy VM" +} + +definition{ + name: acceptVmDestroy, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/vm-lifecycle.test.js; tests/vm-administration.test.js; tests/browser/vm.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 23." +} + +definition{ + name: featureVmDestroy, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Destroy VM. Destroy the guest instance, revoke its grants and refuse stale callbacks.", calls := (cons "Product.Features::callVmDestroy" (nil String)), acceptance := (cons "Product.Features::acceptVmDestroy" (nil String))}) +} + +definition{ + name: callVmCancel, + parameters: [], + result: String, + body: "Browser control #cancelVmObservationBtn: Cancel and Stop VM" +} + +definition{ + name: acceptVmCancel, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/vm-lifecycle.test.js; tests/vm-administration.test.js; tests/browser/vm.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 24." +} + +definition{ + name: featureVmCancel, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Cancel and Stop VM. Before dispatch, prevent the command. After dispatch, stop the whole VM, including other guest work; prior effects remain unknown.", calls := (cons "Product.Features::callVmCancel" (nil String)), acceptance := (cons "Product.Features::acceptVmCancel" (nil String))}) +} + +definition{ + name: callVmReconcile, + parameters: [], + result: String, + body: "Browser control #reconcileVmCommandBtn: Observe Selected Command Result" +} + +definition{ + name: acceptVmReconcile, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/vm-lifecycle.test.js; tests/vm-administration.test.js; tests/browser/vm.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 25." +} + +definition{ + name: featureVmReconcile, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Observe Selected Command Result. Observe the same command result without executing the command again.", calls := (cons "Product.Features::callVmReconcile" (nil String)), acceptance := (cons "Product.Features::acceptVmReconcile" (nil String))}) +} + +definition{ + name: callVmForget, + parameters: [], + result: String, + body: "Browser control #forgetVmCommandBtn: Forget Resolved Command Evidence" +} + +definition{ + name: acceptVmForget, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/vm-lifecycle.test.js; tests/vm-administration.test.js; tests/browser/vm.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 26." +} + +definition{ + name: featureVmForget, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Forget Resolved Command Evidence. Free retained host command output only when resolved. Unknown effects stay retained; guest files are unchanged.", calls := (cons "Product.Features::callVmForget" (nil String)), acceptance := (cons "Product.Features::acceptVmForget" (nil String))}) +} + +definition{ + name: callSaveAuthority, + parameters: [], + result: String, + body: "Browser control #saveAuthorityBtn: Set Up or Restore Saved Authority" +} + +definition{ + name: acceptSaveAuthority, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/dns-publication.test.js; tests/browser-authority-lifecycle.test.js; tests/browser/authority.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 27." +} + +definition{ + name: featureSaveAuthority, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Set Up or Restore Saved Authority. Save a nonextractable origin-local signing key and explicitly pin it. Browser storage can be lost; there is no key backup or automatic replacement.", calls := (cons "Product.Features::callSaveAuthority" (nil String)), acceptance := (cons "Product.Features::acceptSaveAuthority" (nil String))}) +} + +definition{ + name: callLoadPublication, + parameters: [], + result: String, + body: "Browser control #loadPublicationBtn: Load Saved Publication" +} + +definition{ + name: acceptLoadPublication, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/dns-publication.test.js; tests/browser-authority-lifecycle.test.js; tests/browser/authority.spec.mjs. Exact action guard: Product.Experience::actionAllowed code 28." +} + +definition{ + name: featureLoadPublication, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Load Saved Publication. Load the exact zone, name and authority journal before reconciliation. Never repeat an unknown write merely because its owner tab closed.", calls := (cons "Product.Features::callLoadPublication" (nil String)), acceptance := (cons "Product.Features::acceptLoadPublication" (nil String))}) +} + +definition{ + name: callRecoveryRestore, + parameters: [], + result: String, + body: "Browser control #restoreRecoveryAnchorBtn: Restore Accepted Live Head" +} + +definition{ + name: acceptRecoveryRestore, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 29." +} + +definition{ + name: featureRecoveryRestore, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Restore Accepted Live Head. Explicitly restore only the separately accepted exact anchor into the same pinned live name and key, with no different retained head. No DNS, mesh or VM effect.", calls := (cons "Product.Features::callRecoveryRestore" (nil String)), acceptance := (cons "Product.Features::acceptRecoveryRestore" (nil String))}) +} + +definition{ + name: callPlacementRepair, + parameters: [], + result: String, + body: "Browser control #repairPlacementBtn: Repair Selected Placement" +} + +definition{ + name: acceptPlacementRepair, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/custody.test.js; tests/placement-repair.test.js; tests/recovery.test.js; tests/pointer-recovery.test.js. Exact action guard: Product.Experience::actionAllowed code 30." +} + +definition{ + name: featurePlacementRepair, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Repair Selected Placement. Use the exact retained verified object to fill missing fragments, refresh expired custody or replace a selected live holder. Uncertain requests and old copies stay accounted; only fresh checked receipts establish custody.", calls := (cons "Product.Features::callPlacementRepair" (nil String)), acceptance := (cons "Product.Features::acceptPlacementRepair" (nil String))}) +} + +definition{ + name: callLearnProtocol, + parameters: [], + result: String, + body: "Browser surface #encodeExample: Explore exact fragment recovery locally" +} + +definition{ + name: acceptLearnProtocol, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/site-explorer.test.js; tests/browser/site.spec.mjs" +} + +definition{ + name: featureLearnProtocol, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Explore exact fragment recovery locally. Change the input, withhold a fragment or alter a byte using the real custody verifier; no mesh or persistence effects.", calls := (cons "Product.Features::callLearnProtocol" (nil String)), acceptance := (cons "Product.Features::acceptLearnProtocol" (nil String))}) +} + +definition{ + name: callInspectFacetSources, + parameters: [], + result: String, + body: "Browser surface #facetCatalogContent: Inspect source-derived product facets" +} + +definition{ + name: acceptInspectFacetSources, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/site-explorer.test.js; tests/product-facets.test.js" +} + +definition{ + name: featureInspectFacetSources, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Inspect source-derived product facets. Read declaration counts, source links and evidence boundaries without a verification badge.", calls := (cons "Product.Features::callInspectFacetSources" (nil String)), acceptance := (cons "Product.Features::acceptInspectFacetSources" (nil String))}) +} + +definition{ + name: callReviewHostBoundaries, + parameters: [], + result: String, + body: "docs/product-projection.md" +} + +definition{ + name: acceptReviewHostBoundaries, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/source-evidence.test.js; tests/product-model.test.js" +} + +definition{ + name: featureReviewHostBoundaries, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Review whole-product host and release boundaries. Separate exact-source/native probe results from actual browser, network, VM and provider qualification.", calls := (cons "Product.Features::callReviewHostBoundaries" (nil String)), acceptance := (cons "Product.Features::acceptReviewHostBoundaries" (nil String))}) +} + +definition{name: callExtendProtocol, parameters: [], result: String, body: "docs/prism-model.md"} + +definition{ + name: acceptExtendProtocol, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/contracts.test.js; tests/execution-identity.test.js; tests/product-model.test.js" +} + +definition{ + name: featureExtendProtocol, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Extend source-owned protocol contracts. Locate versioned encoding dependencies, reserve-before-effect limits, replay identity and positive/negative evidence before extending adapters.", calls := (cons "Product.Features::callExtendProtocol" (nil String)), acceptance := (cons "Product.Features::acceptExtendProtocol" (nil String))}) +} + +definition{ + name: callInspectAuthorityStorage, + parameters: [], + result: String, + body: "Browser surface #inspectAuthorityStorageBtn: Inspect Origin Storage and Journal" +} + +definition{ + name: acceptInspectAuthorityStorage, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featureInspectAuthorityStorage, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Inspect Origin Storage and Journal. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 0; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callInspectAuthorityStorage" (nil String)), acceptance := (cons "Product.Features::acceptInspectAuthorityStorage" (nil String))}) +} + +definition{ + name: callRotateAuthority, + parameters: [], + result: String, + body: "Browser surface #rotateAuthorityBtn: Rotate Saved Signing Key" +} + +definition{ + name: acceptRotateAuthority, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featureRotateAuthority, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Rotate Saved Signing Key. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 1; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callRotateAuthority" (nil String)), acceptance := (cons "Product.Features::acceptRotateAuthority" (nil String))}) +} + +definition{ + name: callRevokeAuthority, + parameters: [], + result: String, + body: "Browser surface #revokeAuthorityBtn: Revoke Saved Signing Key Locally" +} + +definition{ + name: acceptRevokeAuthority, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featureRevokeAuthority, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Revoke Saved Signing Key Locally. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 2; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callRevokeAuthority" (nil String)), acceptance := (cons "Product.Features::acceptRevokeAuthority" (nil String))}) +} + +definition{ + name: callSaveTrustedAnchor, + parameters: [], + result: String, + body: "Browser surface #saveTrustedAnchorBtn: Save Current Exact Trust Anchor" +} + +definition{ + name: acceptSaveTrustedAnchor, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featureSaveTrustedAnchor, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Save Current Exact Trust Anchor. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 3; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callSaveTrustedAnchor" (nil String)), acceptance := (cons "Product.Features::acceptSaveTrustedAnchor" (nil String))}) +} + +definition{ + name: callRestoreTrustedAnchor, + parameters: [], + result: String, + body: "Browser surface #restoreTrustedAnchorBtn: Restore Saved Head to Current Pin" +} + +definition{ + name: acceptRestoreTrustedAnchor, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featureRestoreTrustedAnchor, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Restore Saved Head to Current Pin. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 4; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callRestoreTrustedAnchor" (nil String)), acceptance := (cons "Product.Features::acceptRestoreTrustedAnchor" (nil String))}) +} + +definition{ + name: callMigrateTrustedAnchor, + parameters: [], + result: String, + body: "Browser surface #migrateTrustedAnchorBtn: Migrate Saved Trust to Pasted Anchor" +} + +definition{ + name: acceptMigrateTrustedAnchor, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featureMigrateTrustedAnchor, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Migrate Saved Trust to Pasted Anchor. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 5; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callMigrateTrustedAnchor" (nil String)), acceptance := (cons "Product.Features::acceptMigrateTrustedAnchor" (nil String))}) +} + +definition{ + name: callRevokeTrustedAnchor, + parameters: [], + result: String, + body: "Browser surface #revokeTrustedAnchorBtn: Revoke Saved Trust Locally" +} + +definition{ + name: acceptRevokeTrustedAnchor, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featureRevokeTrustedAnchor, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Revoke Saved Trust Locally. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 6; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callRevokeTrustedAnchor" (nil String)), acceptance := (cons "Product.Features::acceptRevokeTrustedAnchor" (nil String))}) +} + +definition{ + name: callPersistAuthorityStorage, + parameters: [], + result: String, + body: "Browser surface #persistAuthorityStorageBtn: Request Browser Storage Persistence" +} + +definition{ + name: acceptPersistAuthorityStorage, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featurePersistAuthorityStorage, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Request Browser Storage Persistence. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 7; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callPersistAuthorityStorage" (nil String)), acceptance := (cons "Product.Features::acceptPersistAuthorityStorage" (nil String))}) +} + +definition{ + name: callExportAuthorityJournal, + parameters: [], + result: String, + body: "Browser surface #exportAuthorityJournalBtn: Export Public Authority Journal" +} + +definition{ + name: acceptExportAuthorityJournal, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featureExportAuthorityJournal, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Export Public Authority Journal. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 8; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callExportAuthorityJournal" (nil String)), acceptance := (cons "Product.Features::acceptExportAuthorityJournal" (nil String))}) +} + +definition{ + name: callCompactAuthorityJournal, + parameters: [], + result: String, + body: "Browser surface #compactAuthorityJournalBtn: Remove Definitely Refused Journal Entries" +} + +definition{ + name: acceptCompactAuthorityJournal, + parameters: [], + result: String, + body: "Evidence to run, not a pass claim: tests/authority-ui.test.js; tests/browser-authority-lifecycle.test.js" +} + +definition{ + name: featureCompactAuthorityJournal, + parameters: [], + result: Foundation.Arch::Feature, + body: (record Foundation.Arch::Feature {statement := "Remove Definitely Refused Journal Entries. Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 9; no new global identity, implicit trust or resolution of unknown effects.", calls := (cons "Product.Features::callCompactAuthorityJournal" (nil String)), acceptance := (cons "Product.Features::acceptCompactAuthorityJournal" (nil String))}) +} + +definition{ + name: journeyMesh, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::operator", steps := (cons "Product.Features::featureJoin" (nil String))}) +} + +definition{ + name: journeyObjects, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::operator", steps := (cons "Product.Features::featureStore" (cons "Product.Features::featurePlacementRepair" (cons "Product.Features::featureRecoveryExport" (cons "Product.Features::featureRecoveryImport" (cons "Product.Features::featureRecoveryDownload" (nil String))))))}) +} + +definition{ + name: journeyCompute, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::operator", steps := (cons "Product.Features::featureStart" (cons "Product.Features::featureResume" (nil String)))}) +} + +definition{ + name: journeyVm, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::operator", steps := (cons "Product.Features::featureBoot" (cons "Product.Features::featureExecute" (cons "Product.Features::featureVmReconcile" (cons "Product.Features::featureVmStop" (cons "Product.Features::featureVmDestroy" (nil String))))))}) +} + +definition{ + name: journeyPointers, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::operator", steps := (cons "Product.Features::featureSaveAuthority" (cons "Product.Features::featurePin" (cons "Product.Features::featureTxt" (cons "Product.Features::featureAdmit" (cons "Product.Features::featurePublish" (cons "Product.Features::featureLoadPublication" (cons "Product.Features::featureReconcile" (nil String))))))))}) +} + +definition{ + name: journeyResources, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::operator", steps := (cons "Product.Features::featureExport" (cons "Product.Features::featureRenew" (nil String)))}) +} + +definition{ + name: journeyReader, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::reader", steps := (cons "Product.Features::featureLearnProtocol" (cons "Product.Features::featureInspectFacetSources" (nil String)))}) +} + +definition{ + name: journeyReviewer, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::reviewer", steps := (cons "Product.Features::featureInspectFacetSources" (cons "Product.Features::featureReviewHostBoundaries" (nil String)))}) +} + +definition{ + name: journeyIntegrator, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::systemIntegrator", steps := (cons "Product.Features::featureLearnProtocol" (cons "Product.Features::featureReviewHostBoundaries" (cons "Product.Features::featureExtendProtocol" (nil String))))}) +} + +definition{ + name: journeyAuthority, + parameters: [], + result: Foundation.Arch::Journey, + body: (record Foundation.Arch::Journey {actor := "Product.Architecture::operator", steps := (cons "Product.Features::featureInspectAuthorityStorage" (cons "Product.Features::featureSaveTrustedAnchor" (cons "Product.Features::featureRestoreTrustedAnchor" (cons "Product.Features::featureExportAuthorityJournal" (nil String)))))}) +} + +definition{ + name: scope, + parameters: [], + result: String, + body: "Feature acceptance names executable evidence; only a successful exact-revision run establishes its result. Journeys describe ordered available tasks, not an instruction to repeat effects." +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Host.lex.tex b/app/src/Product/Host.lex.tex new file mode 100644 index 0000000..aee958d --- /dev/null +++ b/app/src/Product/Host.lex.tex @@ -0,0 +1,326 @@ +\begin{lexlean}{Product.Host} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Stitch.Identity} +\importmodule{Stitch.Budget} +\title{Stitch recoverable service model} +\begin{semanticmodule} +inductive{ + name: Capability, + type_parameters: [], + parameters: [], + constructors: [ + {name: Dom, fields: []}, + {name: Cryptography, fields: []}, + {name: MonotonicClock, fields: []}, + {name: WallClock, fields: []}, + {name: SessionStorage, fields: []}, + {name: PeerChannel, fields: []}, + {name: LocalBroadcast, fields: []}, + {name: PublicSignaling, fields: []}, + {name: DnsRead, fields: []}, + {name: DnsWrite, fields: []}, + {name: PublicRelay, fields: []}, + {name: VirtualMachine, fields: []}, + {name: ArtifactFetch, fields: []}, + {name: NativeRouting, fields: []}, + {name: OriginStorage, fields: []}, + {name: WebLock, fields: []} + ] +} + +inductive{ + name: Outcome, + type_parameters: [], + parameters: [], + constructors: [ + {name: Pending, fields: []}, + {name: Succeeded, fields: []}, + {name: Failed, fields: []}, + {name: Unknown, fields: []} + ] +} + +structure{ + name: Grant, + type_parameters: [], + parameters: [], + fields: [ + {name: capability, type: Capability}, + {name: destinationRoot, type: Stitch.Identity::Digest}, + {name: subjectRoot, type: Stitch.Identity::Digest}, + {name: session, type: Nat}, + {name: validFrom, type: Nat}, + {name: validUntil, type: Nat}, + {name: authorized, type: Bool}, + {name: disclosureAccepted, type: Bool} + ] +} + +structure{ + name: Request, + type_parameters: [], + parameters: [], + fields: [ + {name: actionId, type: Stitch.Identity::Digest}, + {name: capability, type: Capability}, + {name: destinationRoot, type: Stitch.Identity::Digest}, + {name: subjectRoot, type: Stitch.Identity::Digest}, + {name: session, type: Nat}, + {name: cost, type: Stitch.Budget::Resources} + ] +} + +structure{ + name: Effect, + type_parameters: [], + parameters: [], + fields: [ + {name: request, type: Request}, + {name: requestedAt, type: Nat}, + {name: outcome, type: Outcome} + ] +} + +structure{ + name: Observation, + type_parameters: [], + parameters: [], + fields: [ + {name: actionId, type: Stitch.Identity::Digest}, + {name: capability, type: Capability}, + {name: destinationRoot, type: Stitch.Identity::Digest}, + {name: subjectRoot, type: Stitch.Identity::Digest}, + {name: session, type: Nat}, + {name: observedAt, type: Nat}, + {name: outcome, type: Outcome} + ] +} + +structure{ + name: State, + type_parameters: [], + parameters: [], + fields: [ + {name: ledger, type: Stitch.Budget::Ledger}, + {name: session, type: Nat}, + {name: effects, type: (List Effect)}, + {name: observations, type: (List Observation)} + ] +} + +definition{ + name: capabilityCode, + parameters: [capability : Capability], + result: Nat, + body: (match capability + | Capability.Dom => 0 + | Capability.Cryptography => 1 + | Capability.MonotonicClock => 2 + | Capability.WallClock => 3 + | Capability.SessionStorage => 4 + | Capability.PeerChannel => 5 + | Capability.LocalBroadcast => 6 + | Capability.PublicSignaling => 7 + | Capability.DnsRead => 8 + | Capability.DnsWrite => 9 + | Capability.PublicRelay => 10 + | Capability.VirtualMachine => 11 + | Capability.ArtifactFetch => 12 + | Capability.NativeRouting => 13 + | Capability.OriginStorage => 14 + | Capability.WebLock => 15) +} + +definition{ + name: outcomeCode, + parameters: [outcome : Outcome], + result: Nat, + body: (match outcome + | Outcome.Pending => 0 + | Outcome.Succeeded => 1 + | Outcome.Failed => 2 + | Outcome.Unknown => 3) +} + +definition{ + name: requiresDisclosure, + parameters: [capability : Capability], + result: Bool, + body: (((capabilityCode capability) =? 7) || (((capabilityCode capability) =? 9) || ((capabilityCode capability) =? 10))) +} + +definition{ + name: browserSupported, + parameters: [capability : Capability], + result: Bool, + body: (not ((capabilityCode capability) =? 13)) +} + +definition{ + name: requestAllowed, + parameters: [state : State, request : Request, grant : Grant, now : Nat], + result: Bool, + body: ((browserSupported (project request capability)) && ((project grant authorized) && (((project request session) =? (project state session)) && (((project grant session) =? (project state session)) && (((capabilityCode (project request capability)) =? (capabilityCode (project grant capability))) && ((Stitch.Identity::digestWellFormed (project request destinationRoot)) && ((Stitch.Identity::digestWellFormed (project request subjectRoot)) && ((Stitch.Identity::sameDigest (project request destinationRoot) (project grant destinationRoot)) && ((Stitch.Identity::sameDigest (project request subjectRoot) (project grant subjectRoot)) && (((project grant validFrom) <=? now) && ((now false + | List.cons head tail => ((observationMatches head observation) || (pendingMatches tail observation))), + recursive_argument: effects +} + +definition{ + name: finish, + parameters: [effects : (List Effect), observation : Observation], + result: (List Effect), + body: (match effects + | List.nil => (nil Effect) + | List.cons head tail => (if (observationMatches head observation) then (cons (record Effect {request := (project head request), requestedAt := (project head requestedAt), outcome := (project observation outcome)}) tail) else (cons head (finish tail observation)))), + recursive_argument: effects +} + +definition{ + name: sessionFilter, + parameters: [difference : Nat, whenEqual : State, whenDifferent : State], + result: State, + body: (match difference | Nat.zero => whenEqual | Nat.succ rest => whenDifferent) +} + +definition{ + name: ledgerFilter, + parameters: [ + difference : Nat, + whenEqual : Stitch.Budget::Ledger, + whenDifferent : Stitch.Budget::Ledger + ], + result: Stitch.Budget::Ledger, + body: (match difference | Nat.zero => whenEqual | Nat.succ rest => whenDifferent) +} + +theorem{ + name: sessionFilterLedger, + parameters: [difference : Nat, whenEqual : State, whenDifferent : State], + statement: ((project (sessionFilter difference whenEqual whenDifferent) ledger) = (ledgerFilter difference (project whenEqual ledger) (project whenDifferent ledger))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: zero}, + {proof: reflexivity{}, binders: [rest], constructor: succ} + ], + scrutinee: difference + } +} + +theorem{ + name: ledgerFilterSame, + parameters: [difference : Nat, ledger : Stitch.Budget::Ledger], + statement: ((ledgerFilter difference ledger ledger) = ledger), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: zero}, + {proof: reflexivity{}, binders: [rest], constructor: succ} + ], + scrutinee: difference + } +} + +theorem{ + name: positiveSessionFilterFact, + parameters: [difference : Nat, whenEqual : State, whenDifferent : State], + statement: (((0 < difference) -> ((sessionFilter difference whenEqual whenDifferent) = whenDifferent)) <-> (0 = 0)), + proof: cases{ + branches: [ + { + proof: constructor{ + branches: [linear_arithmetic{}, linear_arithmetic{definitions: [sessionFilter]}] + }, + binders: [], + constructor: zero + }, + { + proof: constructor{ + branches: [linear_arithmetic{}, linear_arithmetic{definitions: [sessionFilter]}] + }, + binders: [rest], + constructor: succ + } + ], + scrutinee: difference + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: sessionLessThanDifference, + parameters: [state : State, observation : Observation], + statement: (((project observation session) < (project state session)) <-> (0 < (prim subtract (project state session) (project observation session) : Nat))), + proof: constructor{branches: [linear_arithmetic{}, linear_arithmetic{}]}, + axioms: [Quot.sound, propext] +} + +definition{ + name: observationCandidate, + parameters: [state : State, observation : Observation], + result: State, + body: (record State {ledger := (project state ledger), session := (project state session), effects := (if (pendingMatches (project state effects) observation) then (finish (project state effects) observation) else (project state effects)), observations := (if (pendingMatches (project state effects) observation) then (cons observation (project state observations)) else (project state observations))}) +} + +definition{ + name: observe, + parameters: [state : State, observation : Observation], + result: State, + body: (sessionFilter (prim subtract (project state session) (project observation session) : Nat) (sessionFilter (prim subtract (project observation session) (project state session) : Nat) (observationCandidate state observation) state) state) +} + +theorem{ + name: requestDoesNotCreateObservation, + parameters: [state : State, request : Request, grant : Grant, now : Nat], + statement: ((project (reserve state request grant now) observations) = (project state observations)), + proof: reflexivity{} +} + +theorem{ + name: observationCannotRefundLedger, + parameters: [state : State, observation : Observation], + statement: ((project (observe state observation) ledger) = (project state ledger)), + proof: simplify{ + definitions: [ledgerFilterSame, observationCandidate, observe, sessionFilterLedger] + }, + axioms: [propext] +} + +theorem{ + name: staleSessionCannotComplete, + parameters: [state : State, observation : Observation], + statement: (((project observation session) < (project state session)) -> ((observe state observation) = state)), + proof: simplify{definitions: [observe, positiveSessionFilterFact, sessionLessThanDifference]}, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: nativeRoutingRefused, + parameters: [], + statement: ((browserSupported (ctor Capability.NativeRouting)) = false), + proof: decide{} +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Model.lex.tex b/app/src/Product/Model.lex.tex new file mode 100644 index 0000000..16e60d4 --- /dev/null +++ b/app/src/Product/Model.lex.tex @@ -0,0 +1,959 @@ +\begin{lexlean}{Product.Model} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch recoverable service model} +\begin{semanticmodule} +structure{ + name: Component, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: role, type: String}, + {name: implementation, type: (List String)}, + {name: models, type: (List String)}, + {name: trustBoundary, type: Bool} + ] +} + +structure{ + name: Assumption, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: statement, type: String}, + {name: evidence, type: String}, + {name: scope, type: String} + ] +} + +structure{ + name: CapabilityContract, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: owner, type: String}, + {name: capability, type: String}, + {name: operation, type: String}, + {name: source, type: String}, + {name: inputs, type: (List String)}, + {name: outputs, type: (List String)}, + {name: preconditions, type: (List String)}, + {name: failures, type: (List String)}, + {name: assumptions, type: (List String)}, + {name: proofScope, type: String}, + {name: enabledByDefault, type: Bool} + ] +} + +structure{ + name: Dependency, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: consumer, type: String}, + {name: kind, type: String}, + {name: locator, type: String}, + {name: versionPolicy, type: String}, + {name: trust, type: String}, + {name: required, type: Bool} + ] +} + +structure{ + name: Deployment, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: kind, type: String}, + {name: entry, type: String}, + {name: files, type: (List String)}, + {name: requiredCapabilities, type: (List String)}, + {name: secrets, type: (List String)}, + {name: readiness, type: String}, + {name: rollback, type: String}, + {name: releaseGate, type: String} + ] +} + +structure{ + name: Asset, + type_parameters: [], + parameters: [], + fields: [ + {name: path, type: String}, + {name: role, type: String}, + {name: origin, type: String}, + {name: licenseStatus, type: String}, + {name: redistributionCleared, type: Bool} + ] +} + +definition{ + name: componentAdmission, + parameters: [], + result: Component, + body: (record Component {id := "admission", role := "Four-dimensional reservation ledger", implementation := (cons "src/layer2-schedulers/policy.js" (nil String)), models := (cons "Stitch.Budget" (nil String)), trustBoundary := false}) +} + +definition{ + name: componentBrowser, + parameters: [], + result: Component, + body: (record Component {id := "browser", role := "Interactive five-layer Stitch product", implementation := (cons "site/catalog.js" (cons "site/site.css" (cons "site/explorer.js" (cons "site/stitch-fabric.svg" (cons "site/facets.json" (cons "index.html" (cons "src/product-experience.js" (cons "src/recovery-ui.js" (cons "src/authority-ui.js" (nil String)))))))))), models := (cons "Product.Experience" (cons "Stitch.Recovery" (cons "Product.Host" (cons "Product.Model" (nil String))))), trustBoundary := true}) +} + +definition{ + name: componentCompute, + parameters: [], + result: Component, + body: (record Component {id := "compute", role := "Deterministic program and checkpoint replay", implementation := (cons "src/layer4-compute/index.js" (cons "src/layer4-compute/replay.js" (nil String))), models := (cons "Stitch.Compute" (nil String)), trustBoundary := false}) +} + +definition{ + name: componentCryptography, + parameters: [], + result: Component, + body: (record Component {id := "cryptography", role := "Browser WebCrypto SHA-256 and Ed25519", implementation := (nil String), models := (cons "Stitch.Identity" (cons "Stitch.Pointer" (nil String))), trustBoundary := true}) +} + +definition{ + name: componentDiscovery, + parameters: [], + result: Component, + body: (record Component {id := "discovery", role := "DNS-over-HTTPS resolver and scoped DNS writer", implementation := (cons "src/layer5-transport/index.js" (cons "src/layer5-transport/dns-wire.js" (nil String))), models := (cons "Stitch.Pointer" (cons "Stitch.Observation" (nil String))), trustBoundary := true}) +} + +definition{ + name: componentIdentity, + parameters: [], + result: Component, + body: (record Component {id := "identity", role := "Canonical bytes, full commitments, raw encoding and fragments", implementation := (cons "src/layer1-uor/contracts.js" (cons "src/layer1-uor/custody.js" (cons "src/layer1-uor/generated-model.js" (nil String)))), models := (cons "Stitch.Identity" (cons "Stitch.Encoding" (cons "Stitch.Fragments" (nil String)))), trustBoundary := false}) +} + +definition{ + name: componentLegacy, + parameters: [], + result: Component, + body: (record Component {id := "legacy", role := "Historical UOR and simulation conformance", implementation := (cons "src/layer1-uor/index.js" (cons "src/layer3-storage/index.js" (cons "src/lib.rs" (nil String)))), models := (nil String), trustBoundary := false}) +} + +definition{ + name: componentNativeRouting, + parameters: [], + result: Component, + body: (record Component {id := "nativeRouting", role := "External Linux routing daemon; absent from browser", implementation := (nil String), models := (nil String), trustBoundary := true}) +} + +definition{ + name: componentPeers, + parameters: [], + result: Component, + body: (record Component {id := "peers", role := "Untrusted remote holders and compute peers", implementation := (nil String), models := (cons "Stitch.Custody" (cons "Stitch.Observation" (nil String))), trustBoundary := true}) +} + +definition{ + name: componentPointerAuthority, + parameters: [], + result: Component, + body: (record Component {id := "pointerAuthority", role := "Independently pinned single-writer key", implementation := (cons "src/layer1-uor/pointer.js" (cons "src/layer1-uor/browser-authority.js" (nil String))), models := (cons "Stitch.Authority" (cons "Stitch.Pointer" (cons "Stitch.Effects" (cons "Product.Host" (cons "Product.Experience" (nil String)))))), trustBoundary := true}) +} + +definition{ + name: componentPrismId, + parameters: [], + result: Component, + body: (record Component {id := "prismId", role := "Login-free prism identity: devices linked out of band, private boundary, substrate sync", implementation := (cons "src/prism-id.js" (cons "src/layer1-uor/generated-model.js" (nil String))), models := (cons "Stitch.PrismId" (nil String)), trustBoundary := true}) +} + +definition{ + name: componentPublicRelay, + parameters: [], + result: Component, + body: (record Component {id := "publicRelay", role := "Optional public ntfy warm cache", implementation := (cons "src/layer5-transport/relay-framing.js" (nil String)), models := (cons "Stitch.Relay" (cons "Stitch.Evidence" (nil String))), trustBoundary := true}) +} + +definition{ + name: componentRuntimeHost, + parameters: [], + result: Component, + body: (record Component {id := "runtimeHost", role := "Browser, OS, clocks, RAM, networking and permissions", implementation := (nil String), models := (cons "Product.Host" (nil String)), trustBoundary := true}) +} + +definition{ + name: componentScheduler, + parameters: [], + result: Component, + body: (record Component {id := "scheduler", role := "Experimental proposals under enforced admission", implementation := (cons "src/layer2-schedulers/index.js" (nil String)), models := (cons "Stitch.Budget" (cons "Stitch.Observation" (nil String))), trustBoundary := false}) +} + +definition{ + name: componentSignaling, + parameters: [], + result: Component, + body: (record Component {id := "signaling", role := "Public ntfy SDP/ICE signaling; BroadcastChannel on same origin", implementation := (cons "src/layer5-transport/signaling.js" (cons "src/layer5-transport/relay-framing.js" (nil String))), models := (cons "Stitch.Signaling" (cons "Stitch.Relay" (cons "Stitch.Effects" (cons "Product.Host" (nil String))))), trustBoundary := true}) +} + +definition{ + name: componentStaticHost, + parameters: [], + result: Component, + body: (record Component {id := "staticHost", role := "Same-origin publication of application and VM assets", implementation := (nil String), models := (nil String), trustBoundary := true}) +} + +definition{ + name: componentStorage, + parameters: [], + result: Component, + body: (record Component {id := "storage", role := "Ephemeral local cache and conditional peer custody", implementation := (cons "src/layer3-storage/custody.js" (cons "src/layer3-storage/index.js" (cons "src/recovery.js" (nil String)))), models := (cons "Stitch.Custody" (cons "Stitch.System" (cons "Stitch.Recovery" (nil String)))), trustBoundary := false}) +} + +definition{ + name: componentTransport, + parameters: [], + result: Component, + body: (record Component {id := "transport", role := "WebRTC channels, bounded messages and VM Ethernet bridge", implementation := (cons "src/layer5-transport/index.js" (cons "src/layer5-transport/channel-flow.js" (nil String))), models := (cons "Stitch.Observation" (cons "Stitch.ChannelFlow" (cons "Product.Host" (nil String)))), trustBoundary := true}) +} + +definition{ + name: componentVm, + parameters: [], + result: Component, + body: (record Component {id := "vm", role := "v86 x86 Linux guest and 9p filesystem bridge", implementation := (cons "src/layer4-compute/index.js" (cons "src/layer4-compute/vm-administration.js" (cons "v86/libv86.js" (cons "v86/v86.wasm" (cons "v86/seabios.bin" (cons "v86/vgabios.bin" (cons "images/buildroot-bzimage.bin" (nil String)))))))), models := (cons "Product.Host" (cons "Stitch.VmAdministration" (nil String))), trustBoundary := true}) +} + +definition{ + name: assumptionArtifactConformance, + parameters: [], + result: Assumption, + body: (record Assumption {id := "artifactConformance", statement := "Released runtime and model match their exact reviewed source and dependency bytes.", evidence := "Exact local artifact hashes plus pinned-SDK source and build acceptance.", scope := "Full product; runtime source hashing alone does not prove behavior."}) +} + +definition{ + name: assumptionBrowserSemantics, + parameters: [], + result: Assumption, + body: (record Assumption {id := "browserSemantics", statement := "The browser correctly implements DOM, typed arrays, WebAssembly, WebCrypto, WebRTC and fetch; optional saved authority and DNS publication additionally require correct IndexedDB CryptoKey structured cloning, transaction commit and Web Locks context-lifetime exclusion.", evidence := "Browser vendor assurance and independent integration testing, not a Stitch kernel theorem.", scope := "Host API behavior."}) +} + +definition{ + name: assumptionCryptographicSecurity, + parameters: [], + result: Assumption, + body: (record Assumption {id := "cryptographicSecurity", statement := "SHA-256 collision resistance and Ed25519 unforgeability hold for the selected implementations.", evidence := "Cryptographic assumptions and implementation review.", scope := "Commitments and pointer signatures only."}) +} + +definition{ + name: assumptionDisclosureConsent, + parameters: [], + result: Assumption, + body: (record Assumption {id := "disclosureConsent", statement := "External publication is authorized for the exact destination and content. Public relay and signaling are not private.", evidence := "Explicit user choice and configured destination.", scope := "Signaling, DNS writes and optional public payload relay."}) +} + +definition{ + name: assumptionFailureDomains, + parameters: [], + result: Assumption, + body: (record Assumption {id := "failureDomains", statement := "Different holder identifiers are independently failing machines only if separate evidence establishes that fact.", evidence := "Physical deployment and correlated-failure measurement.", scope := "Availability and durability claims."}) +} + +definition{ + name: assumptionNetworkAvailability, + parameters: [], + result: Assumption, + body: (record Assumption {id := "networkAvailability", statement := "DoH, DNS provider, STUN, signaling and optional relay are reachable and honor their APIs and policies.", evidence := "Live provider checks and physical multi-network trials.", scope := "No finite field observation establishes indefinite service."}) +} + +definition{ + name: assumptionObserverAnchor, + parameters: [], + result: Assumption, + body: (record Assumption {id := "observerAnchor", statement := "The pointer writer key and recent retained head are obtained independently and protected from rollback.", evidence := "Independently pinned key and retained observer head, or separately accepted exact recent digest explicitly restored into that same live scope. Both heads and anchor trust remain session-only.", scope := "Single-writer authority and freshness."}) +} + +definition{ + name: assumptionPeerAssertion, + parameters: [], + result: Assumption, + body: (record Assumption {id := "peerAssertion", statement := "A local checked acknowledgment is an assertion by the named holder, not authenticated durable custody.", evidence := "Receipt authentication, retained bytes and reachability require external evidence.", scope := "Conditional placement and lease observations."}) +} + +definition{ + name: assumptionSerializedJournal, + parameters: [], + result: Assumption, + body: (record Assumption {id := "serializedJournal", statement := "Host transitions are serialized and their budgets, action IDs, trusted head and journal are retained for the required lifetime.", evidence := "Application adapter review and crash/concurrency tests.", scope := "Pure state transitions do not provide durable atomic storage."}) +} + +definition{ + name: assumptionTimeSources, + parameters: [], + result: Assumption, + body: (record Assumption {id := "timeSources", statement := "Monotonic elapsed time does not regress; pointer wall-clock error is within a separately accepted bound.", evidence := "Clock integration tests and independent clock policy.", scope := "Freshness, budgets and leases; no global time oracle."}) +} + +definition{ + name: assumptionVmIsolation, + parameters: [], + result: Assumption, + body: (record Assumption {id := "vmIsolation", statement := "v86, BIOS, guest image and 9p/Ethernet bridge obey their reviewed isolation and resource contracts.", evidence := "Exact binary inventory, upstream provenance, security review and VM integration tests.", scope := "Arbitrary guest effects are not ring-program semantics."}) +} + +definition{ + name: capabilityDom, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "dom", owner := "browser", capability := "Dom", operation := "Render and collect explicit UI actions", source := "index.html", inputs := (cons "local UI state" (nil String)), outputs := (cons "rendered DOM" (cons "user action" (nil String))), preconditions := (cons "browser API available" (nil String)), failures := (cons "unsupported browser" (cons "handler failure" (nil String))), assumptions := (cons "browserSemantics" (nil String)), proofScope := "Presentation only; no storage or network evidence.", enabledByDefault := true}) +} + +definition{ + name: capabilityCrypto, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "crypto", owner := "cryptography", capability := "Cryptography", operation := "Hash commitments and verify pointer signatures", source := "src/layer1-uor/custody.js", inputs := (cons "canonical bytes" (cons "domain" (cons "pinned writer key" (nil String)))), outputs := (cons "full digest" (cons "signature-valid observation" (nil String))), preconditions := (cons "exact canonicalization" (cons "supported algorithm" (nil String))), failures := (cons "digest mismatch" (cons "invalid signature" (cons "crypto unavailable" (nil String)))), assumptions := (cons "browserSemantics" (cons "cryptographicSecurity" (cons "observerAnchor" (nil String)))), proofScope := "Integrity/signature observations; no authority bootstrap or retention.", enabledByDefault := true}) +} + +definition{ + name: capabilityMonotonicClock, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "monotonicClock", owner := "runtimeHost", capability := "MonotonicClock", operation := "Observe elapsed time for admission", source := "src/layer2-schedulers/policy.js", inputs := (cons "epoch and retained last time" (nil String)), outputs := (cons "nondecreasing elapsed observation" (nil String)), preconditions := (cons "same clock origin and epoch" (nil String)), failures := (cons "clock regression" (cons "epoch expired" (nil String))), assumptions := (cons "timeSources" (cons "serializedJournal" (nil String))), proofScope := "Elapsed admission only; not UTC, liveness or global order.", enabledByDefault := true}) +} + +definition{ + name: capabilityWallClock, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "wallClock", owner := "runtimeHost", capability := "WallClock", operation := "Check pointer and lease validity intervals", source := "src/layer1-uor/pointer.js", inputs := (cons "not-before and expiry" (nil String)), outputs := (cons "observer-local wall time" (nil String)), preconditions := (cons "declared clock uncertainty accepted" (nil String)), failures := (cons "outside validity interval" (cons "clock unavailable" (nil String))), assumptions := (cons "timeSources" (nil String)), proofScope := "No proof of clock accuracy or network propagation.", enabledByDefault := true}) +} + +definition{ + name: capabilitySessionStorage, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "sessionStorage", owner := "storage", capability := "SessionStorage", operation := "Retain checked bytes and local state in RAM", source := "src/layer3-storage/index.js", inputs := (cons "verified manifest and fragment bytes" (nil String)), outputs := (cons "session-local cached bytes" (nil String)), preconditions := (cons "storage reservation" (cons "bounded input" (cons "integrity checks" (nil String)))), failures := (cons "capacity exhausted" (cons "tab lost" (cons "browser eviction" (nil String)))), assumptions := (cons "browserSemantics" (cons "serializedJournal" (nil String))), proofScope := "RAM is ephemeral; no disk persistence or total-loss recovery.", enabledByDefault := true}) +} + +definition{ + name: capabilityPeerChannel, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "peerChannel", owner := "transport", capability := "PeerChannel", operation := "Open channel and exchange bounded messages", source := "src/layer5-transport/index.js", inputs := (cons "peer observation" (cons "SDP and ICE" (cons "bounded payload" (nil String)))), outputs := (cons "DataChannel event" (cons "untrusted peer response" (nil String))), preconditions := (cons "network reservation" (cons "payload limits" (cons "domain validation before acceptance" (nil String)))), failures := (cons "ICE failure" (cons "timeout" (cons "disconnect" (cons "malformed payload" (nil String))))), assumptions := (cons "browserSemantics" (cons "networkAvailability" (cons "peerAssertion" (nil String)))), proofScope := "Opened channel is not authenticated holder identity or durable placement.", enabledByDefault := false}) +} + +definition{ + name: capabilityLocalBroadcast, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "localBroadcast", owner := "signaling", capability := "LocalBroadcast", operation := "Exchange same-origin tab signals", source := "src/layer5-transport/index.js", inputs := (cons "channel topic" (cons "signal envelope" (nil String))), outputs := (cons "same-origin tab message" (nil String)), preconditions := (cons "explicit mesh join" (nil String)), failures := (cons "API unavailable" (cons "tab closes" (nil String))), assumptions := (cons "browserSemantics" (nil String)), proofScope := "Same-origin only; not remote peer discovery.", enabledByDefault := false}) +} + +definition{ + name: capabilityPublicSignaling, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "publicSignaling", owner := "signaling", capability := "PublicSignaling", operation := "Publish and receive SDP/ICE through ntfy", source := "src/layer5-transport/index.js", inputs := (cons "channel topic" (cons "SDP and ICE candidates" (nil String))), outputs := (cons "public signaling response" (nil String)), preconditions := (cons "explicit mesh join" (cons "disclosure accepted" (cons "network reservation" (nil String)))), failures := (cons "provider unavailable" (cons "untrusted signal" (cons "topic collision" (nil String)))), assumptions := (cons "disclosureConsent" (cons "networkAvailability" (nil String))), proofScope := "Ed25519 key-owned session signaling with replay rejection; public metadata disclosure. Keys are not trusted human identity or holder authorization; topics are not privacy.", enabledByDefault := false}) +} + +definition{ + name: capabilityDnsRead, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "dnsRead", owner := "discovery", capability := "DnsRead", operation := "Read full pointers and SRV records through DoH", source := "src/layer5-transport/index.js", inputs := (cons "query name" (cons "record type" (nil String))), outputs := (cons "bounded untrusted DNS answer" (nil String)), preconditions := (cons "response-byte ceiling" (cons "network reservation" (cons "pointer authority and successor admission" (nil String)))), failures := (cons "HTTP error" (cons "invalid answer" (cons "stale or conflicting pointer" (nil String)))), assumptions := (cons "networkAvailability" (cons "observerAnchor" (cons "timeSources" (nil String)))), proofScope := "DoH observation cannot inspect all recursive caches or establish consensus.", enabledByDefault := false}) +} + +definition{ + name: capabilityDnsWrite, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "dnsWrite", owner := "discovery", capability := "DnsWrite", operation := "Write full signed pointer as multipart Cloudflare TXT", source := "src/layer5-transport/index.js", inputs := (cons "zone and record reference" (cons "signed full pointer" (cons "scoped token reference" (nil String)))), outputs := (cons "provider response and record identifier" (nil String)), preconditions := (cons "explicit publish action" (cons "exact destination authorized" (cons "authority key pinned" (cons "network reservation" (nil String))))), failures := (cons "provider rejected" (cons "unknown outcome" (cons "token missing" (cons "DuckDNS full-pointer serialization refused" (nil String))))), assumptions := (cons "disclosureConsent" (cons "networkAvailability" (cons "observerAnchor" (nil String)))), proofScope := "Provider acknowledgment is not global DNS propagation; secrets are not source data.", enabledByDefault := false}) +} + +definition{ + name: capabilityPublicRelay, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "publicRelay", owner := "publicRelay", capability := "PublicRelay", operation := "Publish or retrieve explicitly public warm-cache payloads", source := "src/layer5-transport/index.js", inputs := (cons "bounded object fragments or checkpoint" (cons "topic" (nil String))), outputs := (cons "public relay response" (nil String)), preconditions := (cons "relay separately enabled" (cons "public disclosure accepted" (cons "network reservation" (cons "received domain admission" (nil String))))), failures := (cons "disabled" (cons "provider unavailable" (cons "expired payload" (cons "tampered payload" (nil String))))), assumptions := (cons "disclosureConsent" (cons "networkAvailability" (nil String))), proofScope := "Sufficient fragments disclose the object; no encryption, confidentiality or indefinite retention.", enabledByDefault := false}) +} + +definition{ + name: capabilityVm, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "vm", owner := "vm", capability := "VirtualMachine", operation := "Boot guest, mirror object files, run shell and bridge Ethernet", source := "src/layer4-compute/index.js", inputs := (cons "five local v86/BIOS/kernel assets" (cons "guest command or object bytes" (nil String))), outputs := (cons "guest output bytes" (cons "Ethernet frames" (nil String))), preconditions := (cons "explicit VM action" (cons "all assets available" (cons "runtime deadline configured before boot" (cons "guarded local 9p allocation installed before run" (nil String))))), failures := (cons "missing asset" (cons "boot failure" (cons "guest timeout or runtime expiry" (cons "filesystem or bounded-result limit" (cons "stop outcome unknown" (cons "bridge failure" (nil String))))))), assumptions := (cons "browserSemantics" (cons "vmIsolation" (nil String))), proofScope := "Source predicates govern local 9p allocation and bounded result reads. Runtime expiry and dispatched-command cancellation request whole-VM stop; prior effects remain unknown. Browser scheduling and host VM behavior are assumptions, not guest isolation or ring-work metering.", enabledByDefault := false}) +} + +definition{ + name: capabilityArtifactFetch, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "artifactFetch", owner := "staticHost", capability := "ArtifactFetch", operation := "Serve and load exact local application assets", source := "index.html", inputs := (cons "relative same-origin path" (nil String)), outputs := (cons "asset bytes" (nil String)), preconditions := (cons "published asset inventory" (cons "trusted static origin" (nil String))), failures := (cons "missing file" (cons "substituted bytes" (cons "HTTP failure" (nil String)))), assumptions := (cons "artifactConformance" (cons "browserSemantics" (nil String))), proofScope := "Inventory hashes identify checked local files; current UI does not verify every fetched asset at load time.", enabledByDefault := true}) +} + +definition{ + name: capabilityNativeRouting, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "nativeRouting", owner := "nativeRouting", capability := "NativeRouting", operation := "External BIRD/FRR or DN42 routing daemon", source := "CONTRACT.json", inputs := (nil String), outputs := (nil String), preconditions := (cons "separate Linux daemon and network authority" (nil String)), failures := (cons "unsupported in browser" (nil String)), assumptions := (cons "networkAvailability" (nil String)), proofScope := "Unsupported boundary; browser has no BGP or WireGuard implementation.", enabledByDefault := false}) +} + +definition{ + name: capabilityOriginStorage, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "originStorage", owner := "pointerAuthority", capability := "OriginStorage", operation := "Explicitly retain nonextractable signing authority and exact DNS write-ahead intent", source := "src/layer1-uor/browser-authority.js", inputs := (cons "explicit authority setup" (cons "signed scoped publication candidate" (nil String))), outputs := (cons "restored CryptoKey" (cons "committed origin-local journal" (nil String))), preconditions := (cons "IndexedDB and CryptoKey structured cloning available" (cons "successful transaction commit before provider mutation" (nil String))), failures := (cons "quota or transaction abort" (cons "private browsing loss or eviction" (cons "invalid retained authority" (nil String)))), assumptions := (cons "browserSemantics" (cons "serializedJournal" (nil String))), proofScope := "Origin-local retention only; no backup, cross-device durability, automatic key rotation or provider exactly-once guarantee.", enabledByDefault := false}) +} + +definition{ + name: capabilityWebLock, + parameters: [], + result: CapabilityContract, + body: (record CapabilityContract {id := "webLock", owner := "pointerAuthority", capability := "WebLock", operation := "Exclude same-origin concurrent DNS writers while reading, committing and settling", source := "src/layer1-uor/browser-authority.js", inputs := (cons "exact database zone name and authority scope" (nil String)), outputs := (cons "exclusive context-lifetime operation" (nil String)), preconditions := (cons "Web Locks available" (cons "same-origin lock scope" (nil String))), failures := (cons "API unavailable" (cons "owner context termination leaves journal unknown" (nil String))), assumptions := (cons "browserSemantics" (cons "serializedJournal" (nil String))), proofScope := "No timeout takeover, cross-device exclusion, provider CAS or ordering outside this application origin.", enabledByDefault := false}) +} + +definition{ + name: dependencyBrowserApis, + parameters: [], + result: Dependency, + body: (record Dependency {id := "browserApis", consumer := "runtimeHost", kind := "host", locator := "browser DOM/WebAssembly/WebCrypto/fetch/WebRTC; optional authority publication requires IndexedDB/Web Locks", versionPolicy := "Host-selected implementation; not byte-pinned", trust := "External API and OS trust boundary", required := true}) +} + +definition{ + name: dependencyCloudflareDns, + parameters: [], + result: Dependency, + body: (record Dependency {id := "cloudflareDns", consumer := "discovery", kind := "external-service", locator := "https://cloudflare-dns.com/dns-query", versionPolicy := "RFC8484 DNS-message client; optional provider JSON mode; no immutable service version", trust := "Read results untrusted until domain admission", required := false}) +} + +definition{ + name: dependencyCloudflareWriter, + parameters: [], + result: Dependency, + body: (record Dependency {id := "cloudflareWriter", consumer := "discovery", kind := "external-service", locator := "https://api.cloudflare.com/client/v4", versionPolicy := "Cloudflare API v4; scoped secret reference only", trust := "Writes need explicit destination and content approval", required := false}) +} + +definition{ + name: dependencyGoogleStun, + parameters: [], + result: Dependency, + body: (record Dependency {id := "googleStun", consumer := "transport", kind := "external-service", locator := "stun:stun.l.google.com:19302", versionPolicy := "Host ICE provider; no immutable service version", trust := "Endpoint discovery only", required := false}) +} + +definition{ + name: dependencyCloudflareStun, + parameters: [], + result: Dependency, + body: (record Dependency {id := "cloudflareStun", consumer := "transport", kind := "external-service", locator := "stun:stun.cloudflare.com:3478", versionPolicy := "Host ICE provider; no immutable service version", trust := "Endpoint discovery only", required := false}) +} + +definition{ + name: dependencyNtfySignaling, + parameters: [], + result: Dependency, + body: (record Dependency {id := "ntfySignaling", consumer := "signaling", kind := "external-service", locator := "https://ntfy.sh", versionPolicy := "Public HTTP/WebSocket API; no immutable service version", trust := "Signaling disclosure and service availability", required := false}) +} + +definition{ + name: dependencyNtfyRelay, + parameters: [], + result: Dependency, + body: (record Dependency {id := "ntfyRelay", consumer := "publicRelay", kind := "external-service", locator := "https://ntfy.sh", versionPolicy := "Optional public cache; no persistence promise", trust := "Payload disclosure requires opt-in", required := false}) +} + +definition{ + name: dependencyStaticOrigin, + parameters: [], + result: Dependency, + body: (record Dependency {id := "staticOrigin", consumer := "staticHost", kind := "hosting", locator := "same-origin relative application paths", versionPolicy := "Publication-selected HTTPS origin", trust := "No release/deployment authority inferred", required := true}) +} + +definition{ + name: dependencyVmAssets, + parameters: [], + result: Dependency, + body: (record Dependency {id := "vmAssets", consumer := "vm", kind := "vendored-binary", locator := "v86/ and images/buildroot-bzimage.bin", versionPolicy := "Exact bytes in generated product artifact register", trust := "Exact upstream origins and accompanying source/license materials recorded in vendor/distribution.json; guest source pinned in vendor/guest/SOURCE-NOTICE.md", required := false}) +} + +definition{ + name: dependencyPrismSdk, + parameters: [], + result: Dependency, + body: (record Dependency {id := "prismSdk", consumer := "identity", kind := "build-tool", locator := "prismpm.lock and standards.lock", versionPolicy := "Exact SDK OCI digest and standards lock", trust := "Only real SDK verify may report source/kernel/artifact acceptance", required := true}) +} + +definition{ + name: dependencyPrismCode, + parameters: [], + result: Dependency, + body: (record Dependency {id := "prismCode", consumer := "identity", kind := "build-tool", locator := "package-lock.json", versionPolicy := "prism-code 0.7.2 exact npm lock", trust := "Adapter and package verification, not browser host semantics", required := true}) +} + +definition{ + name: deploymentBrowserSession, + parameters: [], + result: Deployment, + body: (record Deployment {id := "browserSession", kind := "static-browser", entry := "index.html", files := (cons "index.html" (cons "src/**/*.js" (cons "v86/libv86.js" (cons "v86/v86.wasm" (cons "v86/seabios.bin" (cons "v86/vgabios.bin" (cons "images/buildroot-bzimage.bin" (nil String)))))))), requiredCapabilities := (cons "dom" (cons "crypto" (cons "monotonicClock" (cons "wallClock" (cons "sessionStorage" (cons "artifactFetch" (nil String))))))), secrets := (cons "Cloudflare scoped DNS token only when explicitly supplied; session-local, never in repository" (nil String)), readiness := "Asset load and interactive flow checks required; pure probe acceptance is insufficient.", rollback := "Retain prior complete asset set; session state may be lost on reload.", releaseGate := "Runtime tests, artifact closure, vendor license/provenance review, exact SDK model verification and browser integration checks."}) +} + +definition{ + name: deploymentPureProbe, + parameters: [], + result: Deployment, + body: (record Deployment {id := "pureProbe", kind := "prism-text-application", entry := "app/src/StitchApp.lex.tex", files := (cons "SDK-generated holo and browser closure" (nil String)), requiredCapabilities := (nil String), secrets := (nil String), readiness := "Only actual pinned-SDK verify establishes probe acceptance.", rollback := "Retain previous immutable holo and exact source lock.", releaseGate := "lexlean check, Lean and leanchecker, exact axioms, PrismPM artifact and vector verification."}) +} + +definition{ + name: assetLifecycleEffects, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer1-uor/effects.js", role := "Exact identity projections and model-derived transport, DNS and VM lifecycle admissions", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetProductExperience, + parameters: [], + result: Asset, + body: (record Asset {path := "src/product-experience.js", role := "Model-derived operator journeys, evidence and guarded DOM actions", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile0, + parameters: [], + result: Asset, + body: (record Asset {path := "index.html", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile1, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer1-uor/contracts.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile2, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer1-uor/custody.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile3, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer1-uor/generated-model.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile4, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer1-uor/index.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile5, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer1-uor/pointer.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile6, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer2-schedulers/index.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile7, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer2-schedulers/policy.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile8, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer3-storage/custody.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile9, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer3-storage/index.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile10, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer4-compute/index.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile11, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer4-compute/replay.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile12, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer5-transport/index.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile13, + parameters: [], + result: Asset, + body: (record Asset {path := "v86/libv86.js", role := "vendored VM dependency", origin := "Exact official copy.sh distribution; v86 source 1e4f43c954701db9699fa976b27cc675f9971265; JS independently reconstructed", licenseStatus := "BSD/MIT incorporated notices and source supplied in vendor/v86; include accompanying materials in distribution", redistributionCleared := true}) +} + +definition{ + name: assetFile14, + parameters: [], + result: Asset, + body: (record Asset {path := "v86/v86.wasm", role := "vendored VM dependency", origin := "Exact official copy.sh distribution; v86 source 1e4f43c954701db9699fa976b27cc675f9971265; JS independently reconstructed", licenseStatus := "BSD/MIT incorporated notices and source supplied in vendor/v86; include accompanying materials in distribution", redistributionCleared := true}) +} + +definition{ + name: assetFile15, + parameters: [], + result: Asset, + body: (record Asset {path := "v86/seabios.bin", role := "vendored VM dependency", origin := "Exact copy/v86 BIOS blobs; SeaBIOS rel-1.16.2 source ea1b7a0733906b8425d948ae94fba63c32b1d425", licenseStatus := "LGPLv3 source, config, build instructions and licenses supplied in vendor/seabios; include accompanying materials in distribution", redistributionCleared := true}) +} + +definition{ + name: assetPrismId, + parameters: [], + result: Asset, + body: (record Asset {path := "src/prism-id.js", role := "Stitch browser application", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetFile16, + parameters: [], + result: Asset, + body: (record Asset {path := "v86/vgabios.bin", role := "vendored VM dependency", origin := "Exact copy/v86 BIOS blobs; SeaBIOS rel-1.16.2 source ea1b7a0733906b8425d948ae94fba63c32b1d425", licenseStatus := "LGPLv3 source, config, build instructions and licenses supplied in vendor/seabios; include accompanying materials in distribution", redistributionCleared := true}) +} + +definition{ + name: assetFile17, + parameters: [], + result: Asset, + body: (record Asset {path := "images/buildroot-bzimage.bin", role := "vendored VM dependency", origin := "Linux 6.18.7 from Buildroot 7fdeadb3b9f12f78e5fccca914d7fef47090ab9a; image 313a6b545290a2b47856b49bfcc4c7577469749b315932ae008d39fe70fc7f07", licenseStatus := "Corresponding source, configs, patches and licenses published at immutable commit fd59fae669e9a40271fb584ca071270d8ed0b8f8; preserve vendor/guest/SOURCE-NOTICE.md and equivalent source access with image", redistributionCleared := true}) +} + +definition{ + name: assetRustConformance, + parameters: [], + result: Asset, + body: (record Asset {path := "src/lib.rs", role := "Historical Rust conformance source; not loaded by the browser", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetBrowserAuthority, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer1-uor/browser-authority.js", role := "Origin-local signing authority and transactional publication journal", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetAuthorityUi, + parameters: [], + result: Asset, + body: (record Asset {path := "src/authority-ui.js", role := "Contextual explicit signing, trust-anchor and browser-storage administration", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +structure{ + name: Model, + type_parameters: [], + parameters: [], + fields: [ + {name: productId, type: String}, + {name: owner, type: String}, + {name: version, type: String}, + {name: lifecycle, type: String}, + {name: components, type: (List Component)}, + {name: assumptions, type: (List Assumption)}, + {name: capabilityContracts, type: (List CapabilityContract)}, + {name: dependencies, type: (List Dependency)}, + {name: deployments, type: (List Deployment)}, + {name: assets, type: (List Asset)} + ] +} + +definition{ + name: assetDnsWire, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer5-transport/dns-wire.js", role := "RFC8484 application DNS-message client", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetRelayFraming, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer5-transport/relay-framing.js", role := "Bounded ntfy message framing and reassembly", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetRecovery, + parameters: [], + result: Asset, + body: (record Asset {path := "src/recovery.js", role := "Verified detached recovery bundle import/export; separate exact anchor acceptance and explicit scoped live-head restoration", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetRecoveryUi, + parameters: [], + result: Asset, + body: (record Asset {path := "src/recovery-ui.js", role := "Contextual operator recovery controls without network, VM or DNS effects", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetSignaling, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer5-transport/signaling.js", role := "Signed key-owned signaling with current-session challenge and replay rejection", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetChannelFlow, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer5-transport/channel-flow.js", role := "Negotiated DataChannel framing, bounded queues and generation-fenced delivery", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetVmAdministration, + parameters: [], + result: Asset, + body: (record Asset {path := "src/layer4-compute/vm-administration.js", role := "Explicit guest grants, bounded command admission and generation-scoped effect observation", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetSiteStyle, + parameters: [], + result: Asset, + body: (record Asset {path := "site/site.css", role := "Project-owned product site presentation", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetSiteExplorer, + parameters: [], + result: Asset, + body: (record Asset {path := "site/explorer.js", role := "Local exact-byte recovery demonstration and source-facet renderer", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetSiteFabric, + parameters: [], + result: Asset, + body: (record Asset {path := "site/stitch-fabric.svg", role := "Project-owned Stitch fabric illustration", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetSiteFacets, + parameters: [], + result: Asset, + body: (record Asset {path := "site/facets.json", role := "Generated source-facet inventory; not verification evidence", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: assetSiteCatalog, + parameters: [], + result: Asset, + body: (record Asset {path := "site/catalog.js", role := "Source-derived facet catalog presentation with explicit assurance limits", origin := "Project-owned source checkout", licenseStatus := "Project declares MIT; audit applies", redistributionCleared := true}) +} + +definition{ + name: product, + parameters: [], + result: Model, + body: (record Model {productId := "stitch", owner := "Syntra Labs; repository origin afflom/stitch", version := "0.3.0", lifecycle := "development", components := (cons (componentAdmission) (cons (componentBrowser) (cons (componentCompute) (cons (componentCryptography) (cons (componentDiscovery) (cons (componentIdentity) (cons (componentLegacy) (cons (componentNativeRouting) (cons (componentPeers) (cons (componentPointerAuthority) (cons (componentPrismId) (cons (componentPublicRelay) (cons (componentRuntimeHost) (cons (componentScheduler) (cons (componentSignaling) (cons (componentStaticHost) (cons (componentStorage) (cons (componentTransport) (cons (componentVm) (nil Component)))))))))))))))))))), assumptions := (cons (assumptionArtifactConformance) (cons (assumptionBrowserSemantics) (cons (assumptionCryptographicSecurity) (cons (assumptionDisclosureConsent) (cons (assumptionFailureDomains) (cons (assumptionNetworkAvailability) (cons (assumptionObserverAnchor) (cons (assumptionPeerAssertion) (cons (assumptionSerializedJournal) (cons (assumptionTimeSources) (cons (assumptionVmIsolation) (nil Assumption)))))))))))), capabilityContracts := (cons (capabilityDom) (cons (capabilityCrypto) (cons (capabilityMonotonicClock) (cons (capabilityWallClock) (cons (capabilitySessionStorage) (cons (capabilityPeerChannel) (cons (capabilityLocalBroadcast) (cons (capabilityPublicSignaling) (cons (capabilityDnsRead) (cons (capabilityDnsWrite) (cons (capabilityPublicRelay) (cons (capabilityVm) (cons (capabilityArtifactFetch) (cons (capabilityNativeRouting) (cons (capabilityOriginStorage) (cons (capabilityWebLock) (nil CapabilityContract))))))))))))))))), dependencies := (cons (dependencyBrowserApis) (cons (dependencyCloudflareDns) (cons (dependencyCloudflareWriter) (cons (dependencyGoogleStun) (cons (dependencyCloudflareStun) (cons (dependencyNtfySignaling) (cons (dependencyNtfyRelay) (cons (dependencyStaticOrigin) (cons (dependencyVmAssets) (cons (dependencyPrismSdk) (cons (dependencyPrismCode) (nil Dependency)))))))))))), deployments := (cons (deploymentBrowserSession) (cons (deploymentPureProbe) (nil Deployment))), assets := (cons (assetSiteCatalog) (cons (assetSiteStyle) (cons (assetSiteExplorer) (cons (assetSiteFabric) (cons (assetSiteFacets) (cons (assetRelayFraming) (cons (assetDnsWire) (cons (assetLifecycleEffects) (cons (assetProductExperience) (cons (assetFile0) (cons (assetFile1) (cons (assetFile2) (cons (assetFile3) (cons (assetFile4) (cons (assetFile5) (cons (assetFile6) (cons (assetFile7) (cons (assetFile8) (cons (assetFile9) (cons (assetFile10) (cons (assetFile11) (cons (assetFile12) (cons (assetFile13) (cons (assetFile14) (cons (assetFile15) (cons (assetFile16) (cons (assetFile17) (cons (assetRustConformance) (cons (assetRecovery) (cons (assetRecoveryUi) (cons (assetSignaling) (cons (assetChannelFlow) (cons (assetVmAdministration) (cons (assetBrowserAuthority) (cons (assetAuthorityUi) (cons (assetPrismId) (nil Asset)))))))))))))))))))))))))))))))))))))}) +} + +definition{ + name: componentIds, + parameters: [rows : (List Component)], + result: (List String), + body: (match rows + | List.nil => (nil String) + | List.cons head tail => (cons (project head id) (componentIds tail))), + recursive_argument: rows +} + +definition{ + name: assumptionIds, + parameters: [rows : (List Assumption)], + result: (List String), + body: (match rows + | List.nil => (nil String) + | List.cons head tail => (cons (project head id) (assumptionIds tail))), + recursive_argument: rows +} + +definition{ + name: capabilityContractIds, + parameters: [rows : (List CapabilityContract)], + result: (List String), + body: (match rows + | List.nil => (nil String) + | List.cons head tail => (cons (project head id) (capabilityContractIds tail))), + recursive_argument: rows +} + +definition{ + name: dependencyIds, + parameters: [rows : (List Dependency)], + result: (List String), + body: (match rows + | List.nil => (nil String) + | List.cons head tail => (cons (project head id) (dependencyIds tail))), + recursive_argument: rows +} + +definition{ + name: deploymentIds, + parameters: [rows : (List Deployment)], + result: (List String), + body: (match rows + | List.nil => (nil String) + | List.cons head tail => (cons (project head id) (deploymentIds tail))), + recursive_argument: rows +} + +definition{ + name: assetIds, + parameters: [rows : (List Asset)], + result: (List String), + body: (match rows + | List.nil => (nil String) + | List.cons head tail => (cons (project head path) (assetIds tail))), + recursive_argument: rows +} + +definition{ + name: member, + parameters: [value : String, rows : (List String)], + result: Bool, + body: (match rows + | List.nil => false + | List.cons head tail => ((prim equal value head : Bool) || (member value tail))), + recursive_argument: rows +} + +definition{ + name: members, + parameters: [values : (List String), rows : (List String)], + result: Bool, + body: (match values + | List.nil => true + | List.cons head tail => ((member head rows) && (members tail rows))), + recursive_argument: values +} + +definition{ + name: unique, + parameters: [rows : (List String)], + result: Bool, + body: (match rows + | List.nil => true + | List.cons head tail => ((not (member head tail)) && (unique tail))), + recursive_argument: rows +} + +definition{ + name: componentAssetsClosed, + parameters: [rows : (List Component), assets : (List String)], + result: Bool, + body: (match rows + | List.nil => true + | List.cons head tail => ((members (project head implementation) assets) && (componentAssetsClosed tail assets))), + recursive_argument: rows +} + +definition{ + name: contractsClosed, + parameters: [ + rows : (List CapabilityContract), + components : (List String), + assumptions : (List String) + ], + result: Bool, + body: (match rows + | List.nil => true + | List.cons head tail => ((member (project head owner) components) && ((members (project head assumptions) assumptions) && (contractsClosed tail components assumptions)))), + recursive_argument: rows +} + +definition{ + name: dependenciesClosed, + parameters: [rows : (List Dependency), components : (List String)], + result: Bool, + body: (match rows + | List.nil => true + | List.cons head tail => ((member (project head consumer) components) && (dependenciesClosed tail components))), + recursive_argument: rows +} + +definition{ + name: deploymentsClosed, + parameters: [rows : (List Deployment), capabilities : (List String)], + result: Bool, + body: (match rows + | List.nil => true + | List.cons head tail => ((members (project head requiredCapabilities) capabilities) && (deploymentsClosed tail capabilities))), + recursive_argument: rows +} + +definition{ + name: valid, + parameters: [model : Model], + result: Bool, + body: ((unique (componentIds (project model components))) && ((unique (assumptionIds (project model assumptions))) && ((unique (capabilityContractIds (project model capabilityContracts))) && ((unique (dependencyIds (project model dependencies))) && ((unique (deploymentIds (project model deployments))) && ((unique (assetIds (project model assets))) && ((componentAssetsClosed (project model components) (assetIds (project model assets))) && ((contractsClosed (project model capabilityContracts) (componentIds (project model components)) (assumptionIds (project model assumptions))) && ((dependenciesClosed (project model dependencies) (componentIds (project model components))) && (deploymentsClosed (project model deployments) (capabilityContractIds (project model capabilityContracts)))))))))))) +} + +definition{ + name: redistributionClosed, + parameters: [assets : (List Asset)], + result: Bool, + body: (match assets + | List.nil => true + | List.cons head tail => ((project head redistributionCleared) && (redistributionClosed tail))), + recursive_argument: assets +} + +definition{ + name: productAssetsRedistributable, + parameters: [model : Model], + result: Bool, + body: (redistributionClosed (project model assets)) +} + +theorem{ + name: productGraphIsClosed, + parameters: [], + statement: ((valid (product)) = true), + proof: decide{} +} + +theorem{ + name: vendorDistributionMaterialsRecorded, + parameters: [], + statement: ((productAssetsRedistributable (product)) = true), + proof: decide{} +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Persistence.lex.tex b/app/src/Product/Persistence.lex.tex new file mode 100644 index 0000000..4d55d82 --- /dev/null +++ b/app/src/Product/Persistence.lex.tex @@ -0,0 +1,149 @@ +\begin{lexlean}{Product.Persistence} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Stitch.Effects} +\title{Stitch identity persistence and safe automation} +\begin{semanticmodule} +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: sha256, type: String} + ] +} + +definition{ + name: sources, + parameters: [], + result: (List Source), + body: (cons (record Source {record := "Product.Persistence", path := "docs/browser-authority.md", firstLine := 0, lastLine := 0, sha256 := "642c15248bd22ef2de107c9ca1e1b9dcecc24bb5ac8b59b78b14b98c6995a3c9"}) (cons (record Source {record := "Product.Persistence", path := "docs/recovery.md", firstLine := 0, lastLine := 0, sha256 := "32cb3e8e5579de6e05afd3a716bf97837032ae6efba6dd12748decf9b57cd4db"}) (cons (record Source {record := "Product.Persistence", path := "src/layer1-uor/browser-authority.js", firstLine := 0, lastLine := 0, sha256 := "3b9ba8d4a23fbe056358791d4e2d5ad377faf5a9a3cc2ac3d2dc1c3906087d09"}) (cons (record Source {record := "Product.Persistence", path := "src/layer2-schedulers/policy.js", firstLine := 0, lastLine := 0, sha256 := "8f2074f8fe07a7b1fda51896d78f11a797564afb64accebc7291261e5c00639f"}) (cons (record Source {record := "Product.Persistence", path := "src/layer3-storage/custody.js", firstLine := 0, lastLine := 0, sha256 := "70ec7500e9a1aea0a2f383344bebea4acbe410c3aff76ccadd8869feaac24aee"}) (cons (record Source {record := "Product.Persistence", path := "src/layer4-compute/replay.js", firstLine := 0, lastLine := 0, sha256 := "112653100e2ea57c6b732e64dbc2086fd5237eb2129fe255cb5627498494f1d3"}) (cons (record Source {record := "Product.Persistence", path := "src/layer4-compute/vm-administration.js", firstLine := 0, lastLine := 0, sha256 := "2a307a700e38dfb7f38af4a5cfc3207e3d2b274b6c89b943e6b17add424376bc"}) (cons (record Source {record := "Product.Persistence", path := "src/recovery.js", firstLine := 0, lastLine := 0, sha256 := "89c7b3abcd713ee1c2131d6a841a94526f59c0a6118ac09834a2e6cf43c3a2c0"}) (cons (record Source {record := "Product.Persistence", path := "tests/browser-authority.test.js", firstLine := 0, lastLine := 0, sha256 := "e49b0285c9a1706e73b2e56686f6db8061c91914e2a70dd74654349b43e53c0d"}) (cons (record Source {record := "Product.Persistence", path := "tests/dns-publication.test.js", firstLine := 0, lastLine := 0, sha256 := "02fe2e5e85a715481cd11b55534dffe42b7f27305f63f1fb3bdb03815225d98c"}) (cons (record Source {record := "Product.Persistence", path := "tests/execution-identity.test.js", firstLine := 0, lastLine := 0, sha256 := "cd680245065fa6be6ed51fc77324022c29938298f3f53c76b67fc36415e55a56"}) (cons (record Source {record := "Product.Persistence", path := "tests/placement-repair.test.js", firstLine := 0, lastLine := 0, sha256 := "295ba55268bbcb3be7bd3c9b77a11b4938167ef0bebf83b85facedd536e1ad85"}) (cons (record Source {record := "Product.Persistence", path := "tests/pointer-recovery.test.js", firstLine := 0, lastLine := 0, sha256 := "57eb8bab548b1e0f5cd4ee66a3a71dda8057859f18ecf4c751fbd930b4ac0fc4"}) (cons (record Source {record := "Product.Persistence", path := "tests/recovery.test.js", firstLine := 0, lastLine := 0, sha256 := "da7f23c8411b4adc63fffa602351ad3ecd0999909717c48bf91aeb21bc5f9d11"}) (cons (record Source {record := "Product.Persistence", path := "tests/runtime-admission.test.js", firstLine := 0, lastLine := 0, sha256 := "684901ac8a287078f86958f414d3d514e910cd44fa6f6be1b80cd6435c4c3404"}) (cons (record Source {record := "Product.Persistence", path := "tests/vm-administration.test.js", firstLine := 0, lastLine := 0, sha256 := "db3a943b140e27bf10d8da74140b6359e6570f490eaafe2ddb9d4f492aa566b4"}) (nil Source))))))))))))))))) +} + +structure{ + name: Mechanism, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: storage, type: String}, + {name: restore, type: String}, + {name: automatic, type: Bool}, + {name: trust, type: String}, + {name: failure, type: String}, + {name: source, type: String}, + {name: evidence, type: String} + ] +} + +definition{ + name: mechanismSavedSigner, + parameters: [], + result: Mechanism, + body: (record Mechanism {id := "SavedSigner", storage := "Origin IndexedDB nonextractable CryptoKey", restore := "Startup restores only a valid active existing record.", automatic := true, trust := "Missing, malformed or revoked records never authorize automatic replacement.", failure := "Origin eviction or device loss can destroy the only key.", source := "src/layer1-uor/browser-authority.js", evidence := "tests/browser-authority.test.js"}) +} + +definition{ + name: mechanismTrustedHead, + parameters: [], + result: Mechanism, + body: (record Mechanism {id := "TrustedHead", storage := "Origin IndexedDB exact name/key/digest with history", restore := "Admitted successors persist by exact CAS before the live head changes; live restore is explicit.", automatic := false, trust := "Independent exact key and recent digest acceptance is not derived from a self-signature.", failure := "Storage failure preserves the previous live head; total loss requires independent recent evidence.", source := "src/layer1-uor/browser-authority.js", evidence := "tests/pointer-recovery.test.js"}) +} + +definition{ + name: mechanismUnknownPublication, + parameters: [], + result: Mechanism, + body: (record Mechanism {id := "UnknownPublication", storage := "Origin IndexedDB strict write-ahead intent", restore := "Load the exact scoped candidate and perform read-only reconciliation.", automatic := false, trust := "No timer takeover, blind retry or deletion of unresolved intent.", failure := "An absent provider read does not prove the old mutation never occurred.", source := "src/layer1-uor/browser-authority.js", evidence := "tests/dns-publication.test.js"}) +} + +definition{ + name: mechanismObjectCustody, + parameters: [], + result: Mechanism, + body: (record Mechanism {id := "ObjectCustody", storage := "Session RAM plus conditionally reachable peer fragments", restore := "Automatically verify received bytes; repair only within admitted budgets and checked receipts.", automatic := true, trust := "Different peer IDs do not prove failure-domain independence or future retention.", failure := "All-byte loss cannot be repaired; local storage persistence does not make object cache durable.", source := "src/layer3-storage/custody.js", evidence := "tests/placement-repair.test.js"}) +} + +definition{ + name: mechanismPureCheckpoint, + parameters: [], + result: Mechanism, + body: (record Mechanism {id := "PureCheckpoint", storage := "Session state or explicitly exported recovery bundle", restore := "Every received checkpoint is replayed against its exact program/input/execution identity.", automatic := true, trust := "Replay does not grant exclusive execution or prove arbitrary guest effects.", failure := "Older execution identities are refused without explicit revalidation.", source := "src/layer4-compute/replay.js", evidence := "tests/execution-identity.test.js"}) +} + +definition{ + name: mechanismRecoveryVault, + parameters: [], + result: Mechanism, + body: (record Mechanism {id := "RecoveryVault", storage := "Session-only checked vault and user-saved external file", restore := "Verify complete bundle atomically; export strips accepted-trust status.", automatic := false, trust := "Imported keys and anchors are supplied evidence, not trusted authority.", failure := "External export is not a durability certificate; stale/conflicting imports refuse.", source := "src/recovery.js", evidence := "tests/recovery.test.js"}) +} + +definition{ + name: mechanismBudgetLedger, + parameters: [], + result: Mechanism, + body: (record Mechanism {id := "BudgetLedger", storage := "Session-local epochs plus explicit history export", restore := "Unknown effects remain charged; renewal is a deliberate new allowance.", automatic := false, trust := "No automatic refund or epoch rollover.", failure := "Browser reload is not durable preservation of the budget ledger.", source := "src/layer2-schedulers/policy.js", evidence := "tests/runtime-admission.test.js"}) +} + +definition{ + name: mechanismVmCommand, + parameters: [], + result: Mechanism, + body: (record Mechanism {id := "VmCommand", storage := "Retained host command handles and observed lifecycle", restore := "Observe the selected old command result without dispatching it again.", automatic := false, trust := "A timeout is an unknown outcome, not cancellation or rollback.", failure := "Stop/destroy are pending until host confirmation; external effects are not reversible.", source := "src/layer4-compute/vm-administration.js", evidence := "tests/vm-administration.test.js"}) +} + +definition{ + name: mechanisms, + parameters: [], + result: (List Mechanism), + body: (cons (mechanismSavedSigner) (cons (mechanismTrustedHead) (cons (mechanismUnknownPublication) (cons (mechanismObjectCustody) (cons (mechanismPureCheckpoint) (cons (mechanismRecoveryVault) (cons (mechanismBudgetLedger) (cons (mechanismVmCommand) (nil Mechanism))))))))) +} + +definition{ + name: restoreExistingSignerAllowed, + parameters: [present : Bool, valid : Bool, revoked : Bool, storageAvailable : Bool], + result: Bool, + body: (present && (valid && ((not revoked) && storageAvailable))) +} + +theorem{ + name: absentSignerIsNeverRestored, + parameters: [], + statement: (forall (valid : Bool), (forall (revoked : Bool), (forall (available : Bool), ((restoreExistingSignerAllowed false valid revoked available) = false)))), + proof: decide{} +} + +theorem{ + name: revokedSignerIsNeverRestored, + parameters: [], + statement: (forall (present : Bool), (forall (valid : Bool), (forall (available : Bool), ((restoreExistingSignerAllowed present valid true available) = false)))), + proof: decide{} +} + +theorem{ + name: unknownPublicationRetainsReadOnlyBoundary, + parameters: [], + statement: ((not (Stitch.Effects::dnsMayWritePhase (ctor Stitch.Effects::DnsPhase.Unknown))) = true), + proof: decide{} +} + +theorem{ + name: unknownPublicationOffersReconciliation, + parameters: [], + statement: ((Stitch.Effects::dnsMayReconcile (ctor Stitch.Effects::DnsPhase.Unknown)) = true), + proof: decide{} +} + +definition{ + name: identitySeparation, + parameters: [], + result: String, + body: "Object commitments, peer transport keys, saved Ed25519 name authority and human account identity are distinct. No new account issuer, passkey registry, cross-device trust synchronization or private-key backup is implemented by these facets." +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Quality.lex.tex b/app/src/Product/Quality.lex.tex new file mode 100644 index 0000000..40419f0 --- /dev/null +++ b/app/src/Product/Quality.lex.tex @@ -0,0 +1,359 @@ +\begin{lexlean}{Product.Quality} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\useglossary{prism.qual@1.0.0} +\importmodule{Foundation.Qual} +\title{Stitch quality requirements and open measurements} +\begin{semanticmodule} +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: sha256, type: String} + ] +} + +definition{ + name: sources, + parameters: [], + result: (List Source), + body: (cons (record Source {record := "Product.Quality", path := "app/src/Product/Architecture.lex.tex", firstLine := 0, lastLine := 0, sha256 := "198c55dae057fff7e5530027fd2449f86260cc58056ba4fc00c7b99734ececdc"}) (cons (record Source {record := "Product.Quality", path := "app/src/Product/Experience.lex.tex", firstLine := 0, lastLine := 0, sha256 := "6f2625fdce3d3d51899cabc17ce3d57ec0a9381dd3bf3e6477da6ae3ccfb84bd"}) (cons (record Source {record := "Product.Quality", path := "docs/browser-authority.md", firstLine := 0, lastLine := 0, sha256 := "642c15248bd22ef2de107c9ca1e1b9dcecc24bb5ac8b59b78b14b98c6995a3c9"}) (cons (record Source {record := "Product.Quality", path := "docs/prism-model.md", firstLine := 0, lastLine := 0, sha256 := "ece338421a27de9e0f588e66badf477eebe3012d194103f14a722db02cec24c7"}) (cons (record Source {record := "Product.Quality", path := "scripts/check-facets.mjs", firstLine := 0, lastLine := 0, sha256 := "4ccdee319cf9cec4066570e2bae311dfd0828a29891e88bc2ea2e6bc445bee51"}) (cons (record Source {record := "Product.Quality", path := "src/layer4-compute/replay.js", firstLine := 0, lastLine := 0, sha256 := "112653100e2ea57c6b732e64dbc2086fd5237eb2129fe255cb5627498494f1d3"}) (cons (record Source {record := "Product.Quality", path := "tests/browser-authority-lifecycle.test.js", firstLine := 0, lastLine := 0, sha256 := "6d8f3f41ddf18e5c42615e39e72f2965a39dddc5136f8d6388af5fe396d785b9"}) (cons (record Source {record := "Product.Quality", path := "tests/dns-publication.test.js", firstLine := 0, lastLine := 0, sha256 := "02fe2e5e85a715481cd11b55534dffe42b7f27305f63f1fb3bdb03815225d98c"}) (cons (record Source {record := "Product.Quality", path := "tests/execution-identity.test.js", firstLine := 0, lastLine := 0, sha256 := "cd680245065fa6be6ed51fc77324022c29938298f3f53c76b67fc36415e55a56"}) (cons (record Source {record := "Product.Quality", path := "tests/primitive-operations.test.js", firstLine := 0, lastLine := 0, sha256 := "e3c00e18d47db0de4dd19bffeba1edcb58f82b106f8f66d429a725248ec14a98"}) (cons (record Source {record := "Product.Quality", path := "tests/product-experience.test.js", firstLine := 0, lastLine := 0, sha256 := "a519f9b5c014eada46bd6c016be966c7fbe6f84971ac9408185c89422f68439b"}) (cons (record Source {record := "Product.Quality", path := "tests/product-facets.test.js", firstLine := 0, lastLine := 0, sha256 := "0219469047bd8cf22e6b71b6a6797606eaa9ff065a61ad078de36a9f662a1629"}) (cons (record Source {record := "Product.Quality", path := "tests/runtime-admission.test.js", firstLine := 0, lastLine := 0, sha256 := "684901ac8a287078f86958f414d3d514e910cd44fa6f6be1b80cd6435c4c3404"}) (nil Source)))))))))))))) +} + +definition{ + name: characteristicFunctionalSuitability, + parameters: [], + result: Foundation.Qual::ProductQualityCharacteristic, + body: (record Foundation.Qual::ProductQualityCharacteristic {index := 0}) +} + +definition{ + name: characteristicInteractionCapability, + parameters: [], + result: Foundation.Qual::ProductQualityCharacteristic, + body: (record Foundation.Qual::ProductQualityCharacteristic {index := 1}) +} + +definition{ + name: characteristicMaintainability, + parameters: [], + result: Foundation.Qual::ProductQualityCharacteristic, + body: (record Foundation.Qual::ProductQualityCharacteristic {index := 2}) +} + +definition{ + name: characteristicPerformanceEfficiency, + parameters: [], + result: Foundation.Qual::ProductQualityCharacteristic, + body: (record Foundation.Qual::ProductQualityCharacteristic {index := 3}) +} + +definition{ + name: characteristicReliability, + parameters: [], + result: Foundation.Qual::ProductQualityCharacteristic, + body: (record Foundation.Qual::ProductQualityCharacteristic {index := 4}) +} + +definition{ + name: characteristicSecurity, + parameters: [], + result: Foundation.Qual::ProductQualityCharacteristic, + body: (record Foundation.Qual::ProductQualityCharacteristic {index := 5}) +} + +definition{ + name: subcharacteristicAuthenticity, + parameters: [], + result: Foundation.Qual::QualitySubcharacteristic, + body: (record Foundation.Qual::QualitySubcharacteristic {index := 0, characteristicIndex := 5}) +} + +definition{ + name: subcharacteristicCapacity, + parameters: [], + result: Foundation.Qual::QualitySubcharacteristic, + body: (record Foundation.Qual::QualitySubcharacteristic {index := 1, characteristicIndex := 3}) +} + +definition{ + name: subcharacteristicFunctionalCompleteness, + parameters: [], + result: Foundation.Qual::QualitySubcharacteristic, + body: (record Foundation.Qual::QualitySubcharacteristic {index := 2, characteristicIndex := 0}) +} + +definition{ + name: subcharacteristicIntegrity, + parameters: [], + result: Foundation.Qual::QualitySubcharacteristic, + body: (record Foundation.Qual::QualitySubcharacteristic {index := 3, characteristicIndex := 5}) +} + +definition{ + name: subcharacteristicModularity, + parameters: [], + result: Foundation.Qual::QualitySubcharacteristic, + body: (record Foundation.Qual::QualitySubcharacteristic {index := 4, characteristicIndex := 2}) +} + +definition{ + name: subcharacteristicRecoverability, + parameters: [], + result: Foundation.Qual::QualitySubcharacteristic, + body: (record Foundation.Qual::QualitySubcharacteristic {index := 5, characteristicIndex := 4}) +} + +definition{ + name: subcharacteristicSelfDescriptiveness, + parameters: [], + result: Foundation.Qual::QualitySubcharacteristic, + body: (record Foundation.Qual::QualitySubcharacteristic {index := 6, characteristicIndex := 1}) +} + +definition{ + name: subcharacteristicTestability, + parameters: [], + result: Foundation.Qual::QualitySubcharacteristic, + body: (record Foundation.Qual::QualitySubcharacteristic {index := 7, characteristicIndex := 2}) +} + +structure{ + name: MeasureContract, + type_parameters: [], + parameters: [], + fields: [ + {name: requirement, type: String}, + {name: unit, type: String}, + {name: method, type: String}, + {name: source, type: String}, + {name: evidence, type: String}, + {name: kind, type: String}, + {name: observed, type: Bool} + ] +} + +definition{ + name: requirementActionCoverage, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 0, subcharacteristicIndex := 2}) +} + +definition{ + name: measureActionCoverage, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 0, requirementIndex := 0, threshold := 31}) +} + +definition{ + name: contractActionCoverage, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementActionCoverage", unit := "modeled actions", method := "Count Product.Experience Action definitions, require one official Feature per action.", source := "app/src/Product/Experience.lex.tex", evidence := "tests/product-facets.test.js", kind := "derived", observed := false}) +} + +definition{ + name: requirementAuthorityRollback, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 1, subcharacteristicIndex := 0}) +} + +definition{ + name: measureAuthorityRollback, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 1, requirementIndex := 1, threshold := 0}) +} + +definition{ + name: contractAuthorityRollback, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementAuthorityRollback", unit := "accepted stale or foreign trust transitions", method := "Exact saved head comparison and independent writer/digest acceptance.", source := "docs/browser-authority.md", evidence := "tests/browser-authority-lifecycle.test.js", kind := "requirement", observed := false}) +} + +definition{ + name: requirementComponentCoverage, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 2, subcharacteristicIndex := 4}) +} + +definition{ + name: measureComponentCoverage, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 2, requirementIndex := 2, threshold := 19}) +} + +definition{ + name: contractComponentCoverage, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementComponentCoverage", unit := "components", method := "Every actual architecture component is represented in the design view.", source := "app/src/Product/Architecture.lex.tex", evidence := "tests/product-facets.test.js", kind := "derived", observed := false}) +} + +definition{ + name: requirementForgedCheckpoints, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 3, subcharacteristicIndex := 3}) +} + +definition{ + name: measureForgedCheckpoints, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 3, requirementIndex := 3, threshold := 0}) +} + +definition{ + name: contractForgedCheckpoints, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementForgedCheckpoints", unit := "accepted impossible checkpoints", method := "Zero-defect requirement exercised by adversarial replay tests.", source := "docs/prism-model.md", evidence := "tests/execution-identity.test.js", kind := "requirement", observed := false}) +} + +definition{ + name: requirementProgramInstructions, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 4, subcharacteristicIndex := 1}) +} + +definition{ + name: measureProgramInstructions, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 4, requirementIndex := 4, threshold := 1024}) +} + +definition{ + name: contractProgramInstructions, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementProgramInstructions", unit := "instructions", method := "Configured acceptance ceiling, not observed capacity or performance.", source := "src/layer4-compute/replay.js", evidence := "tests/primitive-operations.test.js", kind := "configured", observed := false}) +} + +definition{ + name: requirementProgramWork, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 5, subcharacteristicIndex := 1}) +} + +definition{ + name: measureProgramWork, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 5, requirementIndex := 5, threshold := 1000000}) +} + +definition{ + name: contractProgramWork, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementProgramWork", unit := "abstract work units", method := "Model-derived work charged before replay; does not meter VM/browser/TLS overhead.", source := "src/layer4-compute/replay.js", evidence := "tests/runtime-admission.test.js", kind := "configured", observed := false}) +} + +definition{ + name: requirementSilentEvidencePromotion, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 6, subcharacteristicIndex := 6}) +} + +definition{ + name: measureSilentEvidencePromotion, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 6, requirementIndex := 6, threshold := 0}) +} + +definition{ + name: contractSilentEvidencePromotion, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementSilentEvidencePromotion", unit := "unknown host outcomes displayed as verified", method := "Persistent evidence labels distinguish digest, replay, unknown effects and unqualified hosts.", source := "app/src/Product/Experience.lex.tex", evidence := "tests/product-experience.test.js", kind := "requirement", observed := false}) +} + +definition{ + name: requirementSourceDrift, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 7, subcharacteristicIndex := 7}) +} + +definition{ + name: measureSourceDrift, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 7, requirementIndex := 7, threshold := 0}) +} + +definition{ + name: contractSourceDrift, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementSourceDrift", unit := "unregenerated model or facet outputs", method := "Regeneration must reproduce committed output bytes.", source := "scripts/check-facets.mjs", evidence := "tests/product-facets.test.js", kind := "requirement", observed := false}) +} + +definition{ + name: requirementTermWidth, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 8, subcharacteristicIndex := 1}) +} + +definition{ + name: measureTermWidth, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 8, requirementIndex := 8, threshold := 32768}) +} + +definition{ + name: contractTermWidth, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementTermWidth", unit := "bits", method := "Explicit parsing/memory envelope, not an upstream ring semantic limit.", source := "src/layer4-compute/replay.js", evidence := "tests/primitive-operations.test.js", kind := "configured", observed := false}) +} + +definition{ + name: requirementUnknownWriteReplay, + parameters: [], + result: Foundation.Qual::QualityRequirement, + body: (record Foundation.Qual::QualityRequirement {index := 9, subcharacteristicIndex := 5}) +} + +definition{ + name: measureUnknownWriteReplay, + parameters: [], + result: Foundation.Qual::QualityMeasure, + body: (record Foundation.Qual::QualityMeasure {index := 9, requirementIndex := 9, threshold := 0}) +} + +definition{ + name: contractUnknownWriteReplay, + parameters: [], + result: MeasureContract, + body: (record MeasureContract {requirement := "Product.Quality::requirementUnknownWriteReplay", unit := "blind retries of unknown DNS writes", method := "Unknown publication permits read-only reconciliation, never another mutation.", source := "docs/browser-authority.md", evidence := "tests/dns-publication.test.js", kind := "requirement", observed := false}) +} + +definition{ + name: openQualities, + parameters: [], + result: (List String), + body: (cons "Physical NAT topology coverage and independent failure domains" (cons "Eviction/device-loss durability" (cons "Accessibility across supported assistive technologies" (cons "User comprehension, task completion time and satisfaction" (cons "Whole-host refinement and native artifact acceptance on the exact release revision" (nil String)))))) +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Release.lex.tex b/app/src/Product/Release.lex.tex new file mode 100644 index 0000000..b264643 --- /dev/null +++ b/app/src/Product/Release.lex.tex @@ -0,0 +1,333 @@ +\begin{lexlean}{Product.Release} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch release and deployment contract} +\begin{semanticmodule} +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: sha256, type: String} + ] +} + +definition{ + name: sources, + parameters: [], + result: (List Source), + body: (cons (record Source {record := "Product.Release", path := ".github/workflows/prism.yml", firstLine := 0, lastLine := 0, sha256 := "4fe595efda75eabd6d81db25b87a44d0d3fa186deb37b1c50b040095f488d093"}) (cons (record Source {record := "Product.Release", path := "app/src/Product/Model.lex.tex", firstLine := 0, lastLine := 0, sha256 := "3017e652d02156eca68bc00cbb3cdfb54cebcfe290a3b9463493d9326da399f8"}) (cons (record Source {record := "Product.Release", path := "docs/product-projection.md", firstLine := 0, lastLine := 0, sha256 := "446c2fcefd1519aa8a60f78115fb3f594ac3329018da3ef432381ea428c2faa1"}) (cons (record Source {record := "Product.Release", path := "docs/vendor-provenance.md", firstLine := 0, lastLine := 0, sha256 := "fe73438c181889157487931d6d2501175bf9becdbad5f6977b2edc6751fb986b"}) (cons (record Source {record := "Product.Release", path := "package.json", firstLine := 0, lastLine := 0, sha256 := "4cca578575a541919497c9ed1c517e970b7d820d464c7d594b8f0cb7bd23a3f4"}) (cons (record Source {record := "Product.Release", path := "vendor/distribution.json", firstLine := 0, lastLine := 0, sha256 := "02263c2d4bf1a1913a673466554c19593b5a6c39b22a2da32ce4375675868347"}) (nil Source))))))) +} + +structure{ + name: Artifact, + type_parameters: [], + parameters: [], + fields: [ + {name: path, type: String}, + {name: licenseStatus, type: String}, + {name: materialsRecorded, type: Bool} + ] +} + +structure{ + name: Deployment, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: entry, type: String}, + {name: capabilities, type: (List String)} + ] +} + +definition{name: version, parameters: [], result: String, body: "0.2.0"} + +definition{ + name: artifact000, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer1-uor/effects.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact001, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/product-experience.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact002, + parameters: [], + result: Artifact, + body: (record Artifact {path := "index.html", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact003, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer1-uor/contracts.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact004, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer1-uor/custody.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact005, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer1-uor/generated-model.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact006, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer1-uor/index.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact007, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer1-uor/pointer.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact008, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer2-schedulers/index.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact009, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer2-schedulers/policy.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact010, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer3-storage/custody.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact011, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer3-storage/index.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact012, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer4-compute/index.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact013, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer4-compute/replay.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact014, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer5-transport/index.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact015, + parameters: [], + result: Artifact, + body: (record Artifact {path := "v86/libv86.js", licenseStatus := "BSD/MIT incorporated notices and source supplied in vendor/v86; include accompanying materials in distribution", materialsRecorded := true}) +} + +definition{ + name: artifact016, + parameters: [], + result: Artifact, + body: (record Artifact {path := "v86/v86.wasm", licenseStatus := "BSD/MIT incorporated notices and source supplied in vendor/v86; include accompanying materials in distribution", materialsRecorded := true}) +} + +definition{ + name: artifact017, + parameters: [], + result: Artifact, + body: (record Artifact {path := "v86/seabios.bin", licenseStatus := "LGPLv3 source, config, build instructions and licenses supplied in vendor/seabios; include accompanying materials in distribution", materialsRecorded := true}) +} + +definition{ + name: artifact018, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/prism-id.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact019, + parameters: [], + result: Artifact, + body: (record Artifact {path := "v86/vgabios.bin", licenseStatus := "LGPLv3 source, config, build instructions and licenses supplied in vendor/seabios; include accompanying materials in distribution", materialsRecorded := true}) +} + +definition{ + name: artifact020, + parameters: [], + result: Artifact, + body: (record Artifact {path := "images/buildroot-bzimage.bin", licenseStatus := "Corresponding source, configs, patches and licenses published at immutable commit fd59fae669e9a40271fb584ca071270d8ed0b8f8; preserve vendor/guest/SOURCE-NOTICE.md and equivalent source access with image", materialsRecorded := true}) +} + +definition{ + name: artifact021, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/lib.rs", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact022, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer1-uor/browser-authority.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact023, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/authority-ui.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact024, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer5-transport/dns-wire.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact025, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer5-transport/relay-framing.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact026, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/recovery.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact027, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/recovery-ui.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact028, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer5-transport/signaling.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact029, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer5-transport/channel-flow.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact030, + parameters: [], + result: Artifact, + body: (record Artifact {path := "src/layer4-compute/vm-administration.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact031, + parameters: [], + result: Artifact, + body: (record Artifact {path := "site/site.css", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact032, + parameters: [], + result: Artifact, + body: (record Artifact {path := "site/explorer.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact033, + parameters: [], + result: Artifact, + body: (record Artifact {path := "site/stitch-fabric.svg", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact034, + parameters: [], + result: Artifact, + body: (record Artifact {path := "site/facets.json", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: artifact035, + parameters: [], + result: Artifact, + body: (record Artifact {path := "site/catalog.js", licenseStatus := "Project declares MIT; audit applies", materialsRecorded := true}) +} + +definition{ + name: deploymentBrowserSession, + parameters: [], + result: Deployment, + body: (record Deployment {id := "browserSession", entry := "index.html", capabilities := (cons "dom" (cons "crypto" (cons "monotonicClock" (cons "wallClock" (cons "sessionStorage" (cons "artifactFetch" (nil String)))))))}) +} + +definition{ + name: deploymentPureProbe, + parameters: [], + result: Deployment, + body: (record Deployment {id := "pureProbe", entry := "app/src/StitchApp.lex.tex", capabilities := (nil String)}) +} + +definition{name: gate, parameters: [], result: String, body: ".github/workflows/prism.yml"} + +definition{ + name: releaseBoundary, + parameters: [], + result: String, + body: "Static publication, source verification, native artifact acceptance and browser qualification are distinct. This inventory reports no current pass result." +} + +definition{ + name: releaseRequirements, + parameters: [], + result: (List String), + body: (cons "Regenerate source bindings, every product facet and the exact product artifact inventory before qualification." (cons "Run exact pinned LexLean source/lock checks, Lean and leanchecker with observed axiom policy; retain original verifier records." (cons "Run full pinned PrismPM native artifact and acceptance-vector gates; source-only acceptance does not replace them." (cons "Run runtime, independent custody vectors, Rust conformance and actual Chromium workflows on the submitted revision." (cons "Publish the complete same-origin UI and dependency set with source/license materials; do not replace the product with its pure probe." (cons "Rollback uses a complete prior asset set and retains unknown-effect journals. Browser/provider/NAT assumptions and unsupported platforms remain explicit." (nil String))))))) +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Security.lex.tex b/app/src/Product/Security.lex.tex new file mode 100644 index 0000000..02655d7 --- /dev/null +++ b/app/src/Product/Security.lex.tex @@ -0,0 +1,1802 @@ +\begin{lexlean}{Product.Security} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\useglossary{prism.sec@1.0.0} +\importmodule{Foundation.Sec} +\importmodule{Production.ThreatModel} +\importmodule{Product.Architecture} +\title{Stitch security and threat model} +\begin{semanticmodule} +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: sha256, type: String} + ] +} + +definition{ + name: sources, + parameters: [], + result: (List Source), + body: (cons (record Source {record := "Product.Security", path := "app/src/Product/Architecture.lex.tex", firstLine := 0, lastLine := 0, sha256 := "198c55dae057fff7e5530027fd2449f86260cc58056ba4fc00c7b99734ececdc"}) (cons (record Source {record := "Product.Security", path := "app/src/Product/Model.lex.tex", firstLine := 0, lastLine := 0, sha256 := "3017e652d02156eca68bc00cbb3cdfb54cebcfe290a3b9463493d9326da399f8"}) (cons (record Source {record := "Product.Security", path := "docs/authenticated-signaling.md", firstLine := 0, lastLine := 0, sha256 := "fe052f6e80d800c60bedfce5ed7eecaa7cf8cf03feff4bdc995ccb26ec108e2c"}) (cons (record Source {record := "Product.Security", path := "docs/browser-authority.md", firstLine := 0, lastLine := 0, sha256 := "642c15248bd22ef2de107c9ca1e1b9dcecc24bb5ac8b59b78b14b98c6995a3c9"}) (cons (record Source {record := "Product.Security", path := "docs/lifecycle-effects.md", firstLine := 0, lastLine := 0, sha256 := "7205e561aaf22ce66cb06af54a8d82a11c85c0ad6b55bc0821a91004d0750a80"}) (cons (record Source {record := "Product.Security", path := "docs/prism-id-threat-model.md", firstLine := 0, lastLine := 0, sha256 := "1e57d29089fc844874ad01b758bd379e9d5b9bbfe2d2461cfe2b740697031d94"}) (cons (record Source {record := "Product.Security", path := "docs/prism-model.md", firstLine := 0, lastLine := 0, sha256 := "ece338421a27de9e0f588e66badf477eebe3012d194103f14a722db02cec24c7"}) (cons (record Source {record := "Product.Security", path := "docs/recovery.md", firstLine := 0, lastLine := 0, sha256 := "32cb3e8e5579de6e05afd3a716bf97837032ae6efba6dd12748decf9b57cd4db"}) (cons (record Source {record := "Product.Security", path := "docs/relay-framing.md", firstLine := 0, lastLine := 0, sha256 := "eddf3c94dd9eb249aff1a6a5becdcb907ac8d3689a7eae5421f88c1a4f6111db"}) (cons (record Source {record := "Product.Security", path := "docs/uor-primitives.md", firstLine := 0, lastLine := 0, sha256 := "cd7a1b556424b4c5c8a555fcc741dea1ad859d2232fbf6f80308d9bbdb8d7544"}) (cons (record Source {record := "Product.Security", path := "docs/vendor-provenance.md", firstLine := 0, lastLine := 0, sha256 := "fe73438c181889157487931d6d2501175bf9becdbad5f6977b2edc6751fb986b"}) (cons (record Source {record := "Product.Security", path := "docs/vm-administration.md", firstLine := 0, lastLine := 0, sha256 := "8990baed1a08871cca032f6696646690831dd900abe506d19ad00327e4feb529"}) (cons (record Source {record := "Product.Security", path := "package.json", firstLine := 0, lastLine := 0, sha256 := "4cca578575a541919497c9ed1c517e970b7d820d464c7d594b8f0cb7bd23a3f4"}) (cons (record Source {record := "Product.Security", path := "tests/authenticated-signaling.test.js", firstLine := 0, lastLine := 0, sha256 := "58263f698373030cd4c20007b1c0b0e9dc8b781558a7366f1acd32decdfe6d5f"}) (cons (record Source {record := "Product.Security", path := "tests/browser-authority-lifecycle.test.js", firstLine := 0, lastLine := 0, sha256 := "6d8f3f41ddf18e5c42615e39e72f2965a39dddc5136f8d6388af5fe396d785b9"}) (cons (record Source {record := "Product.Security", path := "tests/custody.test.js", firstLine := 0, lastLine := 0, sha256 := "7d688bec8a34729197bae605daacd4b3efeedb0e901b8af31322925bd0717329"}) (cons (record Source {record := "Product.Security", path := "tests/dns-publication.test.js", firstLine := 0, lastLine := 0, sha256 := "02fe2e5e85a715481cd11b55534dffe42b7f27305f63f1fb3bdb03815225d98c"}) (cons (record Source {record := "Product.Security", path := "tests/execution-identity.test.js", firstLine := 0, lastLine := 0, sha256 := "cd680245065fa6be6ed51fc77324022c29938298f3f53c76b67fc36415e55a56"}) (cons (record Source {record := "Product.Security", path := "tests/guest-qualification.test.js", firstLine := 0, lastLine := 0, sha256 := "47bfb6d3a8c050f8dae63c33d5ad65e7b32e9a6195e197d0a2b3af2d963b0f0b"}) (cons (record Source {record := "Product.Security", path := "tests/prism-id.test.js", firstLine := 0, lastLine := 0, sha256 := "ade2eb4cfca393f21034c974a315c560e4bc7b2f87e4cafa9c37dc0280556aa9"}) (cons (record Source {record := "Product.Security", path := "tests/recovery.test.js", firstLine := 0, lastLine := 0, sha256 := "da7f23c8411b4adc63fffa602351ad3ecd0999909717c48bf91aeb21bc5f9d11"}) (cons (record Source {record := "Product.Security", path := "tests/relay-framing.test.js", firstLine := 0, lastLine := 0, sha256 := "566cf74aef84b7da5702ad20ce6f71796359db78d898dfef529f130a64deaecc"}) (cons (record Source {record := "Product.Security", path := "tests/runtime-admission.test.js", firstLine := 0, lastLine := 0, sha256 := "684901ac8a287078f86958f414d3d514e910cd44fa6f6be1b80cd6435c4c3404"}) (cons (record Source {record := "Product.Security", path := "tests/source-evidence.test.js", firstLine := 0, lastLine := 0, sha256 := "5e6f783768f076e1fc037803d87595eb78c34a358fc5d6119a48c5f5e6107a49"}) (cons (record Source {record := "Product.Security", path := "tests/vm-administration.test.js", firstLine := 0, lastLine := 0, sha256 := "db3a943b140e27bf10d8da74140b6359e6570f490eaafe2ddb9d4f492aa566b4"}) (nil Source)))))))))))))))))))))))))) +} + +definition{ + name: assessmentPolicy, + parameters: [], + result: String, + body: "Likelihood and impact are explicit conservative qualitative engineering assessments, not observed probabilities, numeric risk scores or certification. Named gates are evidence procedures, not assertions that a run passed. Residual host/crypto/storage assumptions remain open." +} + +definition{ + name: assetAdmission, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 0, componentIndex := 0}) +} + +definition{ + name: modeledAssetAdmission, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetAdmission", name := "admission", text := "Four-dimensional reservation ledger. Implementation: src/layer2-schedulers/policy.js. Domain contracts: Stitch.Budget."}) +} + +definition{ + name: assetBrowser, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 1, componentIndex := 1}) +} + +definition{ + name: modeledAssetBrowser, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetBrowser", name := "browser", text := "Interactive five-layer Stitch product. Implementation: index.html. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: assetCompute, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 2, componentIndex := 2}) +} + +definition{ + name: modeledAssetCompute, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetCompute", name := "compute", text := "Deterministic program and checkpoint replay. Implementation: src/layer4-compute/index.js, src/layer4-compute/replay.js. Domain contracts: Stitch.Compute."}) +} + +definition{ + name: assetDiscovery, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 3, componentIndex := 4}) +} + +definition{ + name: modeledAssetDiscovery, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetDiscovery", name := "discovery", text := "DNS-over-HTTPS resolver and scoped DNS writer. Implementation: src/layer5-transport/index.js. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: assetPointerAuthority, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 4, componentIndex := 9}) +} + +definition{ + name: modeledAssetPointerAuthority, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetPointerAuthority", name := "pointerAuthority", text := "Independently pinned single-writer key. Implementation: src/layer1-uor/pointer.js. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: assetPrismId, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 5, componentIndex := 10}) +} + +definition{ + name: modeledAssetPrismId, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetPrismId", name := "prismId", text := "Login-free prism identity: devices linked out of band, private boundary, substrate sync. Implementation: src/prism-id.js. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: assetPublicRelay, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 6, componentIndex := 11}) +} + +definition{ + name: modeledAssetPublicRelay, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetPublicRelay", name := "publicRelay", text := "Optional public ntfy warm cache. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: assetStorage, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 7, componentIndex := 16}) +} + +definition{ + name: modeledAssetStorage, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetStorage", name := "storage", text := "Ephemeral local cache and conditional peer custody. Implementation: src/layer3-storage/custody.js, src/layer3-storage/index.js. Domain contracts: Stitch.Custody, Stitch.System."}) +} + +definition{ + name: assetTransport, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 8, componentIndex := 17}) +} + +definition{ + name: modeledAssetTransport, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetTransport", name := "transport", text := "WebRTC channels, bounded messages and VM Ethernet bridge. Implementation: src/layer5-transport/index.js. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: assetVm, + parameters: [], + result: Foundation.Sec::Asset, + body: (record Foundation.Sec::Asset {index := 9, componentIndex := 18}) +} + +definition{ + name: modeledAssetVm, + parameters: [], + result: Production.ThreatModel::ModeledAsset, + body: (record Production.ThreatModel::ModeledAsset {asset := "Product.Security::assetVm", name := "vm", text := "v86 x86 Linux guest and 9p filesystem bridge. Implementation: src/layer4-compute/index.js, v86/libv86.js, v86/v86.wasm, v86/seabios.bin, v86/vgabios.bin, images/buildroot-bzimage.bin. Host or external boundary; semantics require independent evidence."}) +} + +definition{ + name: threatAuthoritySpoofing, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 0}) +} + +definition{ + name: riskAuthoritySpoofing, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 0, assetIndex := 4, threatIndex := 0, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlAuthoritySpoofing, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 0, riskIndex := 0}) +} + +definition{ + name: activityAuthoritySpoofing, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 0, controlIndex := 0}) +} + +definition{ + name: modeledThreatAuthoritySpoofing, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatAuthoritySpoofing", name := "AuthoritySpoofing", text := "An arbitrary valid self-signature is mistaken for an independently pinned writer.", category := (ctor Production.ThreatModel::Stride.spoofing)}) +} + +definition{ + name: modeledControlAuthoritySpoofing, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlAuthoritySpoofing", name := "AuthoritySpoofing", text := "Exact independently accepted key/name/head; strict successor CAS and revocation gates.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/browser-authority-lifecycle.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/browser-authority.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingAuthoritySpoofing, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatAuthoritySpoofing", controls := (cons "Product.Security::controlAuthoritySpoofing" (nil String))}) +} + +definition{ + name: threatCheckpointForgery, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 1}) +} + +definition{ + name: riskCheckpointForgery, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 1, assetIndex := 2, threatIndex := 1, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlCheckpointForgery, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 1, riskIndex := 1}) +} + +definition{ + name: activityCheckpointForgery, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 1, controlIndex := 1}) +} + +definition{ + name: modeledThreatCheckpointForgery, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatCheckpointForgery", name := "CheckpointForgery", text := "A hashed but impossible state is accepted as computation.", category := (ctor Production.ThreatModel::Stride.tampering)}) +} + +definition{ + name: modeledControlCheckpointForgery, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlCheckpointForgery", name := "CheckpointForgery", text := "Replay exact program/input/execution identity before accepting or resuming.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/execution-identity.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/uor-primitives.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingCheckpointForgery, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatCheckpointForgery", controls := (cons "Product.Security::controlCheckpointForgery" (nil String))}) +} + +definition{ + name: threatDisclosure, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 2}) +} + +definition{ + name: riskDisclosure, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 2, assetIndex := 6, threatIndex := 2, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlDisclosure, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 2, riskIndex := 2}) +} + +definition{ + name: activityDisclosure, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 2, controlIndex := 2}) +} + +definition{ + name: modeledThreatDisclosure, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatDisclosure", name := "Disclosure", text := "A mesh topic or relay is mistaken for private storage.", category := (ctor Production.ThreatModel::Stride.informationDisclosure)}) +} + +definition{ + name: modeledControlDisclosure, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlDisclosure", name := "Disclosure", text := "Separate public signaling and payload-relay consent; explicit disclosure and no privacy claim.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/relay-framing.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/relay-framing.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingDisclosure, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatDisclosure", controls := (cons "Product.Security::controlDisclosure" (nil String))}) +} + +definition{ + name: threatEffectReplay, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 3}) +} + +definition{ + name: riskEffectReplay, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 3, assetIndex := 3, threatIndex := 3, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlEffectReplay, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 3, riskIndex := 3}) +} + +definition{ + name: activityEffectReplay, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 3, controlIndex := 3}) +} + +definition{ + name: modeledThreatEffectReplay, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatEffectReplay", name := "EffectReplay", text := "An unknown DNS write is repeated after restart or key rotation.", category := (ctor Production.ThreatModel::Stride.repudiation)}) +} + +definition{ + name: modeledControlEffectReplay, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlEffectReplay", name := "EffectReplay", text := "Strict write-ahead intent and exact read-only reconciliation; unknown journal retention.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/dns-publication.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/lifecycle-effects.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingEffectReplay, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatEffectReplay", controls := (cons "Product.Security::controlEffectReplay" (nil String))}) +} + +definition{ + name: threatFragmentTampering, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 4}) +} + +definition{ + name: riskFragmentTampering, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 4, assetIndex := 7, threatIndex := 4, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlFragmentTampering, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 4, riskIndex := 4}) +} + +definition{ + name: activityFragmentTampering, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 4, controlIndex := 4}) +} + +definition{ + name: modeledThreatFragmentTampering, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatFragmentTampering", name := "FragmentTampering", text := "A holder supplies modified, duplicate-index or wrong-manifest bytes.", category := (ctor Production.ThreatModel::Stride.tampering)}) +} + +definition{ + name: modeledControlFragmentTampering, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlFragmentTampering", name := "FragmentTampering", text := "Full domain-separated commitments and exact compatible indexed recovery.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/custody.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-model.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingFragmentTampering, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatFragmentTampering", controls := (cons "Product.Security::controlFragmentTampering" (nil String))}) +} + +definition{ + name: threatGuestPrivilege, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 5}) +} + +definition{ + name: riskGuestPrivilege, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 5, assetIndex := 9, threatIndex := 5, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlGuestPrivilege, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 5, riskIndex := 5}) +} + +definition{ + name: activityGuestPrivilege, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 5, controlIndex := 5}) +} + +definition{ + name: modeledThreatGuestPrivilege, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatGuestPrivilege", name := "GuestPrivilege", text := "Guest output is mistaken for trusted execution or broad host authority.", category := (ctor Production.ThreatModel::Stride.elevationOfPrivilege)}) +} + +definition{ + name: modeledControlGuestPrivilege, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlGuestPrivilege", name := "GuestPrivilege", text := "Separate VM effects, bounded mounts and explicit lifecycle/command reconciliation.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/vm-administration.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/vm-administration.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingGuestPrivilege, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatGuestPrivilege", controls := (cons "Product.Security::controlGuestPrivilege" (nil String))}) +} + +definition{ + name: threatOriginCompromise, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 6}) +} + +definition{ + name: riskOriginCompromise, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 6, assetIndex := 1, threatIndex := 6, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlOriginCompromise, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 6, riskIndex := 6}) +} + +definition{ + name: activityOriginCompromise, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 6, controlIndex := 6}) +} + +definition{ + name: modeledThreatOriginCompromise, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatOriginCompromise", name := "OriginCompromise", text := "Malicious same-origin code can use retained key handles and read local data.", category := (ctor Production.ThreatModel::Stride.elevationOfPrivilege)}) +} + +definition{ + name: modeledControlOriginCompromise, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlOriginCompromise", name := "OriginCompromise", text := "Source/asset inventory and origin boundary; nonextractability is not protection from active same-origin code.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/source-evidence.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/browser-authority.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingOriginCompromise, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatOriginCompromise", controls := (cons "Product.Security::controlOriginCompromise" (nil String))}) +} + +definition{ + name: threatPrismActionReplay, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 7}) +} + +definition{ + name: riskPrismActionReplay, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 7, assetIndex := 5, threatIndex := 7, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismActionReplay, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 7, riskIndex := 7}) +} + +definition{ + name: activityPrismActionReplay, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 7, controlIndex := 7}) +} + +definition{ + name: modeledThreatPrismActionReplay, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismActionReplay", name := "PrismActionReplay", text := "A captured signed action is replayed at the same host or presented to another host.", category := (ctor Production.ThreatModel::Stride.spoofing)}) +} + +definition{ + name: modeledControlPrismActionReplay, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismActionReplay", name := "PrismActionReplay", text := "Every action names its audience and carries a nonce; the host refuses a different audience, a seen nonce, or a time outside its window.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::replayedActionRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::wrongAudienceActionRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::staleActionRefused"}) (nil Production.ThreatModel::Evidence))))))}) +} + +definition{ + name: mappingPrismActionReplay, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismActionReplay", controls := (cons "Product.Security::controlPrismActionReplay" (nil String))}) +} + +definition{ + name: threatPrismCanonicalDivergence, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 8}) +} + +definition{ + name: riskPrismCanonicalDivergence, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 8, assetIndex := 5, threatIndex := 8, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismCanonicalDivergence, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 8, riskIndex := 8}) +} + +definition{ + name: activityPrismCanonicalDivergence, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 8, controlIndex := 8}) +} + +definition{ + name: modeledThreatPrismCanonicalDivergence, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismCanonicalDivergence", name := "PrismCanonicalDivergence", text := "Browser, native, mobile and embedded runtimes canonicalize differently, so kappa labels or signatures disagree and one runtime accepts what another refuses.", category := (ctor Production.ThreatModel::Stride.tampering)}) +} + +definition{ + name: modeledControlPrismCanonicalDivergence, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismCanonicalDivergence", name := "PrismCanonicalDivergence", text := "uor-addr canonical form with explicit refusals (non-NFC, non-integer, ill-formed), published vectors and an independent Python implementation.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingPrismCanonicalDivergence, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismCanonicalDivergence", controls := (cons "Product.Security::controlPrismCanonicalDivergence" (nil String))}) +} + +definition{ + name: threatPrismDelegateOverreach, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 9}) +} + +definition{ + name: riskPrismDelegateOverreach, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 9, assetIndex := 5, threatIndex := 9, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismDelegateOverreach, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 9, riskIndex := 9}) +} + +definition{ + name: activityPrismDelegateOverreach, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 9, controlIndex := 9}) +} + +definition{ + name: modeledThreatPrismDelegateOverreach, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismDelegateOverreach", name := "PrismDelegateOverreach", text := "A delegate device (often embedded and physically exposed) acts outside its scope, reads private content, or administers the prism.", category := (ctor Production.ThreatModel::Stride.elevationOfPrivilege)}) +} + +definition{ + name: modeledControlPrismDelegateOverreach, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismDelegateOverreach", name := "PrismDelegateOverreach", text := "Scope checked on every action; a delegate never receives the private boundary and cannot bind or revoke.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::delegateOutsideScopeRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::delegateNeverReceivesPrivateBoundary"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::delegateCannotBind"}) (nil Production.ThreatModel::Evidence))))))}) +} + +definition{ + name: mappingPrismDelegateOverreach, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismDelegateOverreach", controls := (cons "Product.Security::controlPrismDelegateOverreach" (nil String))}) +} + +definition{ + name: threatPrismGenesisConfusion, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 10}) +} + +definition{ + name: riskPrismGenesisConfusion, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 10, assetIndex := 5, threatIndex := 10, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismGenesisConfusion, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 10, riskIndex := 10}) +} + +definition{ + name: activityPrismGenesisConfusion, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 10, controlIndex := 10}) +} + +definition{ + name: modeledThreatPrismGenesisConfusion, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismGenesisConfusion", name := "PrismGenesisConfusion", text := "A forged log presents a different genesis, so a new device or host adopts the wrong prism.", category := (ctor Production.ThreatModel::Stride.spoofing)}) +} + +definition{ + name: modeledControlPrismGenesisConfusion, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismGenesisConfusion", name := "PrismGenesisConfusion", text := "prism id is the kappa of exactly one self-signed genesis; the prism id travels out of band in the link offer and every record names it.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::foreignPrismBindRefused"}) (nil Production.ThreatModel::Evidence))))}) +} + +definition{ + name: mappingPrismGenesisConfusion, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismGenesisConfusion", controls := (cons "Product.Security::controlPrismGenesisConfusion" (nil String))}) +} + +definition{ + name: threatPrismGuardianCollusion, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 11}) +} + +definition{ + name: riskPrismGuardianCollusion, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 11, assetIndex := 5, threatIndex := 11, likelihood := (ctor Foundation.Sec::Likelihood.low), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismGuardianCollusion, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 11, riskIndex := 11}) +} + +definition{ + name: activityPrismGuardianCollusion, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 11, controlIndex := 11}) +} + +definition{ + name: modeledThreatPrismGuardianCollusion, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismGuardianCollusion", name := "PrismGuardianCollusion", text := "Guardians pool their shares to take over the prism.", category := (ctor Production.ThreatModel::Stride.elevationOfPrivilege)}) +} + +definition{ + name: modeledControlPrismGuardianCollusion, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismGuardianCollusion", name := "PrismGuardianCollusion", text := "Shares meet only at the threshold; guardians are other prisms or devices the person chose; a successful recovery is visible to every remaining device as revocations.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::belowThresholdRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::zeroThresholdRefused"}) (nil Production.ThreatModel::Evidence)))))}) +} + +definition{ + name: mappingPrismGuardianCollusion, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismGuardianCollusion", controls := (cons "Product.Security::controlPrismGuardianCollusion" (nil String))}) +} + +definition{ + name: threatPrismGuardianDeception, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 12}) +} + +definition{ + name: riskPrismGuardianDeception, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 12, assetIndex := 5, threatIndex := 12, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismGuardianDeception, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 12, riskIndex := 12}) +} + +definition{ + name: activityPrismGuardianDeception, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 12, controlIndex := 12}) +} + +definition{ + name: modeledThreatPrismGuardianDeception, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismGuardianDeception", name := "PrismGuardianDeception", text := "An impostor asks guardians to release shares to the impostor device.", category := (ctor Production.ThreatModel::Stride.spoofing)}) +} + +definition{ + name: modeledControlPrismGuardianDeception, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismGuardianDeception", name := "PrismGuardianDeception", text := "A guardian releases a share only re-wrapped to the requesting device after confirming the person out of band and comparing a code bound to that device; one deceived guardian is below the threshold.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::belowThresholdRefused"}) (nil Production.ThreatModel::Evidence))))}) +} + +definition{ + name: mappingPrismGuardianDeception, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismGuardianDeception", controls := (cons "Product.Security::controlPrismGuardianDeception" (nil String))}) +} + +definition{ + name: threatPrismKeyClaimForgery, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 13}) +} + +definition{ + name: riskPrismKeyClaimForgery, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 13, assetIndex := 5, threatIndex := 13, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismKeyClaimForgery, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 13, riskIndex := 13}) +} + +definition{ + name: activityPrismKeyClaimForgery, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 13, controlIndex := 13}) +} + +definition{ + name: modeledThreatPrismKeyClaimForgery, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismKeyClaimForgery", name := "PrismKeyClaimForgery", text := "A device claims hardware-held keys it does not have to obtain permissions a host reserves for such devices.", category := (ctor Production.ThreatModel::Stride.spoofing)}) +} + +definition{ + name: modeledControlPrismKeyClaimForgery, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismKeyClaimForgery", name := "PrismKeyClaimForgery", text := "The protection field is a claim only; admitDevice accepts a hardware-requiring device only when a host-pinned verifier attests hardware protection of exactly that device signing key.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::unattestedDeviceRefusedWhenRequired"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::attestationForOtherKeyRefused"}) (nil Production.ThreatModel::Evidence)))))}) +} + +definition{ + name: mappingPrismKeyClaimForgery, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismKeyClaimForgery", controls := (cons "Product.Security::controlPrismKeyClaimForgery" (nil String))}) +} + +definition{ + name: threatPrismLinkHijack, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 14}) +} + +definition{ + name: riskPrismLinkHijack, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 14, assetIndex := 5, threatIndex := 14, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismLinkHijack, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 14, riskIndex := 14}) +} + +definition{ + name: activityPrismLinkHijack, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 14, controlIndex := 14}) +} + +definition{ + name: modeledThreatPrismLinkHijack, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismLinkHijack", name := "PrismLinkHijack", text := "Someone who sees, photographs or relays the link QR code answers first and binds their own device to the prism.", category := (ctor Production.ThreatModel::Stride.spoofing)}) +} + +definition{ + name: modeledControlPrismLinkHijack, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismLinkHijack", name := "PrismLinkHijack", text := "One-time secret, expiry, single use, and a six-digit code bound to the joining device that the person confirms on both screens.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::unconfirmedLinkRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::usedOfferRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::wrongSecretRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::expiredOfferRefused"}) (nil Production.ThreatModel::Evidence)))))))}) +} + +definition{ + name: mappingPrismLinkHijack, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismLinkHijack", controls := (cons "Product.Security::controlPrismLinkHijack" (nil String))}) +} + +definition{ + name: threatPrismLinkability, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 15}) +} + +definition{ + name: riskPrismLinkability, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 15, assetIndex := 5, threatIndex := 15, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismLinkability, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 15, riskIndex := 15}) +} + +definition{ + name: activityPrismLinkability, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 15, controlIndex := 15}) +} + +definition{ + name: modeledThreatPrismLinkability, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismLinkability", name := "PrismLinkability", text := "Hosts or relays correlate one person across services because the same prism id and device keys appear everywhere.", category := (ctor Production.ThreatModel::Stride.informationDisclosure)}) +} + +definition{ + name: modeledControlPrismLinkability, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismLinkability", name := "PrismLinkability", text := "Each host sees only its own persona: a separate prism with per-device persona keys; the main prism log travels sealed between members and is never given to a host.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::nonMemberSeesOnlyPublished"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::singleIdentityBoundaryPrivate"}) (nil Production.ThreatModel::Evidence)))))}) +} + +definition{ + name: mappingPrismLinkability, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismLinkability", controls := (cons "Product.Security::controlPrismLinkability" (nil String))}) +} + +definition{ + name: threatPrismLogFlooding, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 16}) +} + +definition{ + name: riskPrismLogFlooding, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 16, assetIndex := 5, threatIndex := 16, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismLogFlooding, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 16, riskIndex := 16}) +} + +definition{ + name: activityPrismLogFlooding, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 16, controlIndex := 16}) +} + +definition{ + name: modeledThreatPrismLogFlooding, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismLogFlooding", name := "PrismLogFlooding", text := "A peer or relay sends oversized sync messages or very large logs to exhaust memory and signature checks.", category := (ctor Production.ThreatModel::Stride.denialOfService)}) +} + +definition{ + name: modeledControlPrismLogFlooding, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismLogFlooding", name := "PrismLogFlooding", text := "Byte and record bounds are checked before parsing and signature work; unknown records never become authority.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingPrismLogFlooding, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismLogFlooding", controls := (cons "Product.Security::controlPrismLogFlooding" (nil String))}) +} + +definition{ + name: threatPrismLogTampering, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 17}) +} + +definition{ + name: riskPrismLogTampering, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 17, assetIndex := 5, threatIndex := 17, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismLogTampering, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 17, riskIndex := 17}) +} + +definition{ + name: activityPrismLogTampering, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 17, controlIndex := 17}) +} + +definition{ + name: modeledThreatPrismLogTampering, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismLogTampering", name := "PrismLogTampering", text := "A relay or peer alters, reorders or injects prism log records.", category := (ctor Production.ThreatModel::Stride.tampering)}) +} + +definition{ + name: modeledControlPrismLogTampering, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismLogTampering", name := "PrismLogTampering", text := "Each record is signed and addressed by the kappa of its envelope; merge is order-independent set union; invalid or foreign records are ignored.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::invalidBindSignatureRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::unlinkedSignerCannotBind"}) (nil Production.ThreatModel::Evidence)))))}) +} + +definition{ + name: mappingPrismLogTampering, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismLogTampering", controls := (cons "Product.Security::controlPrismLogTampering" (nil String))}) +} + +definition{ + name: threatPrismMutualRevocation, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 18}) +} + +definition{ + name: riskPrismMutualRevocation, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 18, assetIndex := 5, threatIndex := 18, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismMutualRevocation, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 18, riskIndex := 18}) +} + +definition{ + name: activityPrismMutualRevocation, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 18, controlIndex := 18}) +} + +definition{ + name: modeledThreatPrismMutualRevocation, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismMutualRevocation", name := "PrismMutualRevocation", text := "A thief holding one member device revokes every other device, or replaces the recovery device.", category := (ctor Production.ThreatModel::Stride.denialOfService)}) +} + +definition{ + name: modeledControlPrismMutualRevocation, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismMutualRevocation", name := "PrismMutualRevocation", text := "Recovery revocations take precedence: a device recovery revoked has no revocations that count, members cannot revoke or replace the recovery device, and recovery revokes every other device ever linked.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::revokedByRecoveryCannotRevoke"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::memberCannotRevokeRecovery"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::memberCannotReplaceRecovery"}) (nil Production.ThreatModel::Evidence))))))}) +} + +definition{ + name: mappingPrismMutualRevocation, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismMutualRevocation", controls := (cons "Product.Security::controlPrismMutualRevocation" (nil String))}) +} + +definition{ + name: threatPrismOriginScript, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 19}) +} + +definition{ + name: riskPrismOriginScript, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 19, assetIndex := 5, threatIndex := 19, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismOriginScript, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 19, riskIndex := 19}) +} + +definition{ + name: activityPrismOriginScript, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 19, controlIndex := 19}) +} + +definition{ + name: modeledThreatPrismOriginScript, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismOriginScript", name := "PrismOriginScript", text := "Script running in the prism origin (XSS, compromised dependency or static host) uses device key handles and reads the boundary keyring.", category := (ctor Production.ThreatModel::Stride.elevationOfPrivilege)}) +} + +definition{ + name: modeledControlPrismOriginScript, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismOriginScript", name := "PrismOriginScript", text := "Device keys are non-extractable; a hardened device keeps only non-extractable derived boundary keys and cannot link members or set up recovery, so script can copy no key out; actions a host marks need a user-verified WebAuthn assertion over exactly that action body, which script cannot make without the person.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::hardenedDeviceCannotShare"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::unverifiedApprovalRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::approvalOfOtherActionRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::forgedApprovalRefused"}) (nil Production.ThreatModel::Evidence)))))))}) +} + +definition{ + name: mappingPrismOriginScript, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismOriginScript", controls := (cons "Product.Security::controlPrismOriginScript" (nil String))}) +} + +definition{ + name: threatPrismPersonaHijack, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 20}) +} + +definition{ + name: riskPrismPersonaHijack, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 20, assetIndex := 5, threatIndex := 20, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismPersonaHijack, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 20, riskIndex := 20}) +} + +definition{ + name: activityPrismPersonaHijack, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 20, controlIndex := 20}) +} + +definition{ + name: modeledThreatPrismPersonaHijack, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismPersonaHijack", name := "PrismPersonaHijack", text := "A revoked member keeps acting at a host through its persona key, or uses persona recovery keys it once saw.", category := (ctor Production.ThreatModel::Stride.elevationOfPrivilege)}) +} + +definition{ + name: modeledControlPrismPersonaHijack, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismPersonaHijack", name := "PrismPersonaHijack", text := "Revoking a device revokes its persona keys at every host on the next sync; persona recovery keys are wrapped to the main recovery device and kept by no member.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::revokedDeviceActionRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::revokedDeviceCannotSign"}) (nil Production.ThreatModel::Evidence)))))}) +} + +definition{ + name: mappingPrismPersonaHijack, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismPersonaHijack", controls := (cons "Product.Security::controlPrismPersonaHijack" (nil String))}) +} + +definition{ + name: threatPrismQuantumForgery, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 21}) +} + +definition{ + name: riskPrismQuantumForgery, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 21, assetIndex := 5, threatIndex := 21, likelihood := (ctor Foundation.Sec::Likelihood.low), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismQuantumForgery, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 21, riskIndex := 21}) +} + +definition{ + name: activityPrismQuantumForgery, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 21, controlIndex := 21}) +} + +definition{ + name: modeledThreatPrismQuantumForgery, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismQuantumForgery", name := "PrismQuantumForgery", text := "A future quantum adversary forges P-256 signatures to bind a device or sign actions.", category := (ctor Production.ThreatModel::Stride.spoofing)}) +} + +definition{ + name: modeledControlPrismQuantumForgery, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismQuantumForgery", name := "PrismQuantumForgery", text := "Every record and action from a device with an ML-DSA-65 key also carries an ML-DSA signature; verifiers with ML-DSA refuse a missing or invalid one, and hosts can refuse verifiers without it.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::postQuantumSignatureStripRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::classicalSignatureAlwaysRequired"}) (nil Production.ThreatModel::Evidence)))))}) +} + +definition{ + name: mappingPrismQuantumForgery, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismQuantumForgery", controls := (cons "Product.Security::controlPrismQuantumForgery" (nil String))}) +} + +definition{ + name: threatPrismQuantumHarvest, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 22}) +} + +definition{ + name: riskPrismQuantumHarvest, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 22, assetIndex := 5, threatIndex := 22, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismQuantumHarvest, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 22, riskIndex := 22}) +} + +definition{ + name: activityPrismQuantumHarvest, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 22, controlIndex := 22}) +} + +definition{ + name: modeledThreatPrismQuantumHarvest, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismQuantumHarvest", name := "PrismQuantumHarvest", text := "Wraps recorded today are decrypted later by a quantum adversary.", category := (ctor Production.ThreatModel::Stride.informationDisclosure)}) +} + +definition{ + name: modeledControlPrismQuantumHarvest, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismQuantumHarvest", name := "PrismQuantumHarvest", text := "Every wrap to a device that advertises ML-KEM-768 is hybrid ECDH plus ML-KEM; a classical wrap to such a device is refused; content keys are AES-256.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::postQuantumDowngradeRefused"}) (nil Production.ThreatModel::Evidence))))}) +} + +definition{ + name: mappingPrismQuantumHarvest, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismQuantumHarvest", controls := (cons "Product.Security::controlPrismQuantumHarvest" (nil String))}) +} + +definition{ + name: threatPrismRecoveryLoss, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 23}) +} + +definition{ + name: riskPrismRecoveryLoss, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 23, assetIndex := 5, threatIndex := 23, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismRecoveryLoss, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 23, riskIndex := 23}) +} + +definition{ + name: activityPrismRecoveryLoss, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 23, controlIndex := 23}) +} + +definition{ + name: modeledThreatPrismRecoveryLoss, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismRecoveryLoss", name := "PrismRecoveryLoss", text := "Every member device is lost, so the prism is lost.", category := (ctor Production.ThreatModel::Stride.denialOfService)}) +} + +definition{ + name: modeledControlPrismRecoveryLoss, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismRecoveryLoss", name := "PrismRecoveryLoss", text := "Threshold recovery: the recovery key exists only as shares sealed to guardians; with no surviving copy of the log, recovery rebuilds it from sealed sync the substrate retained by following the rotations wrapped to the recovery device; it binds a new device, revokes the rest, carries personas and rotates itself.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::belowThresholdRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::memberCannotRevokeRecovery"}) (nil Production.ThreatModel::Evidence)))))}) +} + +definition{ + name: mappingPrismRecoveryLoss, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismRecoveryLoss", controls := (cons "Product.Security::controlPrismRecoveryLoss" (nil String))}) +} + +definition{ + name: threatPrismRekeyWithholding, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 24}) +} + +definition{ + name: riskPrismRekeyWithholding, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 24, assetIndex := 5, threatIndex := 24, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.minor)}) +} + +definition{ + name: controlPrismRekeyWithholding, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 24, riskIndex := 24}) +} + +definition{ + name: activityPrismRekeyWithholding, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 24, controlIndex := 24}) +} + +definition{ + name: modeledThreatPrismRekeyWithholding, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismRekeyWithholding", name := "PrismRekeyWithholding", text := "A rotation never reaches an offline member, so it cannot seal new content.", category := (ctor Production.ThreatModel::Stride.denialOfService)}) +} + +definition{ + name: modeledControlPrismRekeyWithholding, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismRekeyWithholding", name := "PrismRekeyWithholding", text := "A device without the current key refuses to seal instead of sealing to the old key; a publish under the previous key delivers the rotation.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::staleBoundaryKeyRefused"}) (nil Production.ThreatModel::Evidence))))}) +} + +definition{ + name: mappingPrismRekeyWithholding, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismRekeyWithholding", controls := (cons "Product.Security::controlPrismRekeyWithholding" (nil String))}) +} + +definition{ + name: threatPrismRepudiation, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 25}) +} + +definition{ + name: riskPrismRepudiation, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 25, assetIndex := 5, threatIndex := 25, likelihood := (ctor Foundation.Sec::Likelihood.low), impact := (ctor Foundation.Sec::Impact.minor)}) +} + +definition{ + name: controlPrismRepudiation, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 25, riskIndex := 25}) +} + +definition{ + name: activityPrismRepudiation, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 25, controlIndex := 25}) +} + +definition{ + name: modeledThreatPrismRepudiation, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismRepudiation", name := "PrismRepudiation", text := "A person denies that one of their devices took an action.", category := (ctor Production.ThreatModel::Stride.repudiation)}) +} + +definition{ + name: modeledControlPrismRepudiation, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismRepudiation", name := "PrismRepudiation", text := "Every action and administrative record is signed by a device bound in the prism log; software keys reachable by origin script remain a residual.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingPrismRepudiation, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismRepudiation", controls := (cons "Product.Security::controlPrismRepudiation" (nil String))}) +} + +definition{ + name: threatPrismRogueBind, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 26}) +} + +definition{ + name: riskPrismRogueBind, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 26, assetIndex := 5, threatIndex := 26, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismRogueBind, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 26, riskIndex := 26}) +} + +definition{ + name: activityPrismRogueBind, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 26, controlIndex := 26}) +} + +definition{ + name: modeledThreatPrismRogueBind, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismRogueBind", name := "PrismRogueBind", text := "A non-member, a delegate, or a revoked device signs a bind to add a device under its control.", category := (ctor Production.ThreatModel::Stride.elevationOfPrivilege)}) +} + +definition{ + name: modeledControlPrismRogueBind, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismRogueBind", name := "PrismRogueBind", text := "A bind counts only from a linked, unrevoked member with a valid signature for this prism; revocation wins over a concurrent bind.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::unlinkedSignerCannotBind"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::delegateCannotBind"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::invalidBindSignatureRefused"}) (nil Production.ThreatModel::Evidence))))))}) +} + +definition{ + name: mappingPrismRogueBind, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismRogueBind", controls := (cons "Product.Security::controlPrismRogueBind" (nil String))}) +} + +definition{ + name: threatPrismStolenDevice, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 27}) +} + +definition{ + name: riskPrismStolenDevice, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 27, assetIndex := 5, threatIndex := 27, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlPrismStolenDevice, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 27, riskIndex := 27}) +} + +definition{ + name: activityPrismStolenDevice, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 27, controlIndex := 27}) +} + +definition{ + name: modeledThreatPrismStolenDevice, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismStolenDevice", name := "PrismStolenDevice", text := "A lost or stolen member device keeps reading new private content and following sync.", category := (ctor Production.ThreatModel::Stride.informationDisclosure)}) +} + +definition{ + name: modeledControlPrismStolenDevice, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismStolenDevice", name := "PrismStolenDevice", text := "Revocation rotates the private boundary key, wraps it only to remaining members and moves the sync topic; stale keys are refused.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::revokedDeviceCannotSign"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::revokedDeviceActionRefused"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "Stitch.PrismId::staleBoundaryKeyRefused"}) (nil Production.ThreatModel::Evidence))))))}) +} + +definition{ + name: mappingPrismStolenDevice, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismStolenDevice", controls := (cons "Product.Security::controlPrismStolenDevice" (nil String))}) +} + +definition{ + name: threatPrismSyncObservation, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 28}) +} + +definition{ + name: riskPrismSyncObservation, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 28, assetIndex := 5, threatIndex := 28, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlPrismSyncObservation, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 28, riskIndex := 28}) +} + +definition{ + name: activityPrismSyncObservation, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 28, controlIndex := 28}) +} + +definition{ + name: modeledThreatPrismSyncObservation, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatPrismSyncObservation", name := "PrismSyncObservation", text := "Bus relays and federation nodes read sync content or infer it from message sizes.", category := (ctor Production.ThreatModel::Stride.informationDisclosure)}) +} + +definition{ + name: modeledControlPrismSyncObservation, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlPrismSyncObservation", name := "PrismSyncObservation", text := "Sync topic is an HMAC under a derived boundary key; every message is AES-GCM sealed, bound to the prism id and padded to a power-of-two bucket; constant-cadence sync sends one message of one size per interval, real or cover; network addresses remain observable.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/prism-id.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-id-threat-model.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingPrismSyncObservation, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatPrismSyncObservation", controls := (cons "Product.Security::controlPrismSyncObservation" (nil String))}) +} + +definition{ + name: threatResourceExhaustion, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 29}) +} + +definition{ + name: riskResourceExhaustion, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 29, assetIndex := 0, threatIndex := 29, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlResourceExhaustion, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 29, riskIndex := 29}) +} + +definition{ + name: activityResourceExhaustion, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 29, controlIndex := 29}) +} + +definition{ + name: modeledThreatResourceExhaustion, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatResourceExhaustion", name := "ResourceExhaustion", text := "Untrusted messages, replay or unknown effects exhaust application allowances.", category := (ctor Production.ThreatModel::Stride.denialOfService)}) +} + +definition{ + name: modeledControlResourceExhaustion, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlResourceExhaustion", name := "ResourceExhaustion", text := "Reserve each independent resource before effects; unknown outcomes stay charged.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/runtime-admission.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/prism-model.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingResourceExhaustion, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatResourceExhaustion", controls := (cons "Product.Security::controlResourceExhaustion" (nil String))}) +} + +definition{ + name: threatSignalingSpoofing, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 30}) +} + +definition{ + name: riskSignalingSpoofing, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 30, assetIndex := 8, threatIndex := 30, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlSignalingSpoofing, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 30, riskIndex := 30}) +} + +definition{ + name: activitySignalingSpoofing, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 30, controlIndex := 30}) +} + +definition{ + name: modeledThreatSignalingSpoofing, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatSignalingSpoofing", name := "SignalingSpoofing", text := "A relay replays or substitutes SDP/ICE and stale session callbacks.", category := (ctor Production.ThreatModel::Stride.spoofing)}) +} + +definition{ + name: modeledControlSignalingSpoofing, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlSignalingSpoofing", name := "SignalingSpoofing", text := "Signed exact signaling, session/generation fencing and bounded channel flow.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/authenticated-signaling.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/authenticated-signaling.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingSignalingSpoofing, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatSignalingSpoofing", controls := (cons "Product.Security::controlSignalingSpoofing" (nil String))}) +} + +definition{ + name: threatStorageLoss, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 31}) +} + +definition{ + name: riskStorageLoss, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 31, assetIndex := 7, threatIndex := 31, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.major)}) +} + +definition{ + name: controlStorageLoss, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 31, riskIndex := 31}) +} + +definition{ + name: activityStorageLoss, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 31, controlIndex := 31}) +} + +definition{ + name: modeledThreatStorageLoss, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatStorageLoss", name := "StorageLoss", text := "Tab loss or eviction removes the only object fragments or recent trust anchor.", category := (ctor Production.ThreatModel::Stride.denialOfService)}) +} + +definition{ + name: modeledControlStorageLoss, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlStorageLoss", name := "StorageLoss", text := "Explicit recovery export and origin-storage evidence; no guarantee after total information loss.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/recovery.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/recovery.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingStorageLoss, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatStorageLoss", controls := (cons "Product.Security::controlStorageLoss" (nil String))}) +} + +definition{ + name: threatVendorSubstitution, + parameters: [], + result: Foundation.Sec::Threat, + body: (record Foundation.Sec::Threat {index := 32}) +} + +definition{ + name: riskVendorSubstitution, + parameters: [], + result: Foundation.Sec::Risk, + body: (record Foundation.Sec::Risk {index := 32, assetIndex := 9, threatIndex := 32, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)}) +} + +definition{ + name: controlVendorSubstitution, + parameters: [], + result: Foundation.Sec::ApplicationSecurityControl, + body: (record Foundation.Sec::ApplicationSecurityControl {index := 32, riskIndex := 32}) +} + +definition{ + name: activityVendorSubstitution, + parameters: [], + result: Foundation.Sec::SecurityActivity, + body: (record Foundation.Sec::SecurityActivity {index := 32, controlIndex := 32}) +} + +definition{ + name: modeledThreatVendorSubstitution, + parameters: [], + result: Production.ThreatModel::ModeledThreat, + body: (record Production.ThreatModel::ModeledThreat {threat := "Product.Security::threatVendorSubstitution", name := "VendorSubstitution", text := "Loaded emulator, BIOS or guest differs from reviewed inventory.", category := (ctor Production.ThreatModel::Stride.tampering)}) +} + +definition{ + name: modeledControlVendorSubstitution, + parameters: [], + result: Production.ThreatModel::ModeledControl, + body: (record Production.ThreatModel::ModeledControl {control := "Product.Security::controlVendorSubstitution", name := "VendorSubstitution", text := "Retained corresponding-source materials and exact local asset digests; live load-time remote integrity remains an assumption.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "tests/guest-qualification.test.js"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "docs/vendor-provenance.md"}) (nil Production.ThreatModel::Evidence)))}) +} + +definition{ + name: mappingVendorSubstitution, + parameters: [], + result: Production.ThreatModel::ThreatMapping, + body: (record Production.ThreatModel::ThreatMapping {threat := "Product.Security::threatVendorSubstitution", controls := (cons "Product.Security::controlVendorSubstitution" (nil String))}) +} + +definition{ + name: controlSet, + parameters: [], + result: Production.ThreatModel::ControlSet, + body: (record Production.ThreatModel::ControlSet {title := "Stitch scoped adversarial boundaries", text := "Traceable prevention, refusal and recovery procedures; residual assumptions are retained in Product.Model.", version := "0.2.0", lastModified := "2026-11-13T00:00:00Z"}) +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Product/Users.lex.tex b/app/src/Product/Users.lex.tex new file mode 100644 index 0000000..ac19f36 --- /dev/null +++ b/app/src/Product/Users.lex.tex @@ -0,0 +1,138 @@ +\begin{lexlean}{Product.Users} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Foundation.Arch} +\importmodule{Foundation.Experience.V1.Model} +\importmodule{Product.Architecture} +\importmodule{Product.Features} +\title{Stitch context of use and usability} +\begin{semanticmodule} +structure{ + name: Source, + type_parameters: [], + parameters: [], + fields: [ + {name: record, type: String}, + {name: path, type: String}, + {name: firstLine, type: Nat}, + {name: lastLine, type: Nat}, + {name: sha256, type: String} + ] +} + +definition{ + name: sources, + parameters: [], + result: (List Source), + body: (cons (record Source {record := "Product.Users", path := "app/src/Product/Architecture.lex.tex", firstLine := 0, lastLine := 0, sha256 := "198c55dae057fff7e5530027fd2449f86260cc58056ba4fc00c7b99734ececdc"}) (cons (record Source {record := "Product.Users", path := "app/src/Product/Experience.lex.tex", firstLine := 0, lastLine := 0, sha256 := "6f2625fdce3d3d51899cabc17ce3d57ec0a9381dd3bf3e6477da6ae3ccfb84bd"}) (cons (record Source {record := "Product.Users", path := "docs/operator-experience.md", firstLine := 0, lastLine := 0, sha256 := "6385da9f6040a7103cf14d57bf5b109890ca6df0f31e621f57faf0ff8b35ac3f"}) (nil Source)))) +} + +definition{ + name: authority, + parameters: [], + result: Foundation.Experience.V1.Model::Authority, + body: (record Foundation.Experience.V1.Model::Authority {framework := "ISO 9241-11 context of use and ISO 9241-210 human-centred design", repository := "https://github.com/Syntra-Labs/stitch", commit := "the exact revision of the cited sources"}) +} + +definition{ + name: groups, + parameters: [], + result: (List Foundation.Experience.V1.Model::UserGroup), + body: (cons (record Foundation.Experience.V1.Model::UserGroup {stakeholder := (Product.Architecture::operator), characteristics := "Chooses mesh participation, public disclosure, trusted pointer authority, DNS writes and VM actions."}) (cons (record Foundation.Experience.V1.Model::UserGroup {stakeholder := (Product.Architecture::reader), characteristics := "Learns the object, fragment, custody, replay and authority protocol before taking part."}) (cons (record Foundation.Experience.V1.Model::UserGroup {stakeholder := (Product.Architecture::reviewer), characteristics := "Reviews exact-source evidence, host assumptions, vendor provenance and qualification gaps."}) (cons (record Foundation.Experience.V1.Model::UserGroup {stakeholder := (Product.Architecture::systemIntegrator), characteristics := "Embeds or extends the protocol without bypassing resource, trust or effect admission."}) (nil Foundation.Experience.V1.Model::UserGroup))))) +} + +definition{ + name: goals, + parameters: [], + result: (List Foundation.Experience.V1.Model::Goal), + body: (cons (record Foundation.Experience.V1.Model::Goal {user := 0, journey := (Product.Features::journeyMesh), outcome := "Review public signaling disclosure, join explicitly, then inspect reachable peers."}) (cons (record Foundation.Experience.V1.Model::Goal {user := 0, journey := (Product.Features::journeyObjects), outcome := "Separate local integrity from conditional peer custody and actual recovery."}) (cons (record Foundation.Experience.V1.Model::Goal {user := 0, journey := (Product.Features::journeyCompute), outcome := "Replay deterministic checkpoints before continuation; VM effects have a separate contract."}) (cons (record Foundation.Experience.V1.Model::Goal {user := 0, journey := (Product.Features::journeyVm), outcome := "Boot and execute only through the observed VM lifecycle. Output integrity does not certify execution."}) (cons (record Foundation.Experience.V1.Model::Goal {user := 0, journey := (Product.Features::journeyPointers), outcome := "Pin authority independently, retain the local head, and reconcile uncertain provider writes."}) (cons (record Foundation.Experience.V1.Model::Goal {user := 0, journey := (Product.Features::journeyResources), outcome := "Inspect bounded application charges, export them, and explicitly grant a new epoch."}) (cons (record Foundation.Experience.V1.Model::Goal {user := 1, journey := (Product.Features::journeyReader), outcome := "Understand the Stitch protocol. Each operation retains its source-owned consent and evidence boundary."}) (cons (record Foundation.Experience.V1.Model::Goal {user := 2, journey := (Product.Features::journeyReviewer), outcome := "Audit evidence and assumptions. Each operation retains its source-owned consent and evidence boundary."}) (cons (record Foundation.Experience.V1.Model::Goal {user := 3, journey := (Product.Features::journeyIntegrator), outcome := "Extend the protocol safely. Each operation retains its source-owned consent and evidence boundary."}) (cons (record Foundation.Experience.V1.Model::Goal {user := 0, journey := (Product.Features::journeyAuthority), outcome := "Care for saved identity and trust. Each operation retains its source-owned consent and evidence boundary."}) (nil Foundation.Experience.V1.Model::Goal))))))))))) +} + +definition{ + name: tasks, + parameters: [], + result: (List Foundation.Experience.V1.Model::Task), + body: (cons (record Foundation.Experience.V1.Model::Task {goal := 0, order := 0, feature := (Product.Features::featureJoin)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 1, order := 0, feature := (Product.Features::featureStore)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 1, order := 1, feature := (Product.Features::featurePlacementRepair)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 1, order := 2, feature := (Product.Features::featureRecoveryExport)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 1, order := 3, feature := (Product.Features::featureRecoveryImport)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 1, order := 4, feature := (Product.Features::featureRecoveryDownload)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 2, order := 0, feature := (Product.Features::featureStart)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 2, order := 1, feature := (Product.Features::featureResume)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 3, order := 0, feature := (Product.Features::featureBoot)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 3, order := 1, feature := (Product.Features::featureExecute)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 3, order := 2, feature := (Product.Features::featureVmReconcile)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 3, order := 3, feature := (Product.Features::featureVmStop)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 3, order := 4, feature := (Product.Features::featureVmDestroy)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 4, order := 0, feature := (Product.Features::featureSaveAuthority)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 4, order := 1, feature := (Product.Features::featurePin)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 4, order := 2, feature := (Product.Features::featureTxt)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 4, order := 3, feature := (Product.Features::featureAdmit)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 4, order := 4, feature := (Product.Features::featurePublish)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 4, order := 5, feature := (Product.Features::featureLoadPublication)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 4, order := 6, feature := (Product.Features::featureReconcile)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 5, order := 0, feature := (Product.Features::featureExport)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 5, order := 1, feature := (Product.Features::featureRenew)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 6, order := 0, feature := (Product.Features::featureLearnProtocol)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 6, order := 1, feature := (Product.Features::featureInspectFacetSources)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 7, order := 0, feature := (Product.Features::featureInspectFacetSources)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 7, order := 1, feature := (Product.Features::featureReviewHostBoundaries)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 8, order := 0, feature := (Product.Features::featureLearnProtocol)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 8, order := 1, feature := (Product.Features::featureReviewHostBoundaries)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 8, order := 2, feature := (Product.Features::featureExtendProtocol)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 9, order := 0, feature := (Product.Features::featureInspectAuthorityStorage)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 9, order := 1, feature := (Product.Features::featureSaveTrustedAnchor)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 9, order := 2, feature := (Product.Features::featureRestoreTrustedAnchor)}) (cons (record Foundation.Experience.V1.Model::Task {goal := 9, order := 3, feature := (Product.Features::featureExportAuthorityJournal)}) (nil Foundation.Experience.V1.Model::Task)))))))))))))))))))))))))))))))))) +} + +definition{ + name: environments, + parameters: [], + result: (List Foundation.Experience.V1.Model::Environment), + body: (cons (record Foundation.Experience.V1.Model::Environment {kind := (ctor Foundation.Experience.V1.Model::EnvironmentKind.technical), component := (Product.Architecture::browser)}) (cons (record Foundation.Experience.V1.Model::Environment {kind := (ctor Foundation.Experience.V1.Model::EnvironmentKind.technical), component := (Product.Architecture::runtimeHost)}) (cons (record Foundation.Experience.V1.Model::Environment {kind := (ctor Foundation.Experience.V1.Model::EnvironmentKind.technical), component := (Product.Architecture::peers)}) (cons (record Foundation.Experience.V1.Model::Environment {kind := (ctor Foundation.Experience.V1.Model::EnvironmentKind.technical), component := (Product.Architecture::staticHost)}) (nil Foundation.Experience.V1.Model::Environment))))) +} + +definition{ + name: measures, + parameters: [], + result: (List Foundation.Experience.V1.Model::UsabilityMeasure), + body: (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 0, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 0, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 0, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 1, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 1, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 1, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 2, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 2, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 2, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 3, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 3, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 3, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 4, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 4, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 4, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 5, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 5, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 5, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 6, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 6, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 6, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 7, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 7, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 7, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 8, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 8, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 8, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 9, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.effectiveness), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 9, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.efficiency), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (cons (record Foundation.Experience.V1.Model::UsabilityMeasure {goal := 9, outcome := (ctor Foundation.Experience.V1.Model::UsabilityOutcome.satisfaction), observed := (ctor Option.none [Nat]), method := "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations"}) (nil Foundation.Experience.V1.Model::UsabilityMeasure))))))))))))))))))))))))))))))) +} + +definition{ + name: contextNotes, + parameters: [], + result: (List String), + body: (cons "Reader: explain object identity, fragment reconstruction, custody conditions and pure replay before mesh participation; no user comprehension result is asserted." (cons "Reviewer: inspect source-bound facet catalog, exact verification artifacts and residual assumptions; a source inventory is not a proof result." (cons "System integrator: locate five-layer contracts, action guards, host effects and extension boundaries without inferring durable storage or consensus." (nil String)))) +} + +definition{ + name: goalsHaveUsers, + parameters: [items : (List Foundation.Experience.V1.Model::Goal), users : Nat], + result: Bool, + body: (match items + | List.nil => true + | List.cons head rest => (((project head user) true + | List.cons head rest => (((project head goal) false | List.cons head rest => true) +} + +definition{ + name: tasksHaveAcceptance, + parameters: [items : (List Foundation.Experience.V1.Model::Task)], + result: Bool, + body: (match items + | List.nil => true + | List.cons head rest => ((nonemptyAcceptance (project (project head feature) acceptance)) && (tasksHaveAcceptance rest))), + recursive_argument: items +} + +theorem{ + name: everyGoalNamesAUser, + parameters: [], + statement: ((goalsHaveUsers (goals) 4) = true), + proof: decide{} +} + +theorem{ + name: everyTaskNamesAGoal, + parameters: [], + statement: ((tasksHaveGoals (tasks) 10) = true), + proof: decide{} +} + +theorem{ + name: everyTaskNamesAcceptanceEvidence, + parameters: [], + statement: ((tasksHaveAcceptance (tasks)) = true), + proof: decide{} +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Production/ThreatModel.lex.tex b/app/src/Production/ThreatModel.lex.tex new file mode 100644 index 0000000..5c52e4c --- /dev/null +++ b/app/src/Production/ThreatModel.lex.tex @@ -0,0 +1,105 @@ +\begin{lexlean}{Production.ThreatModel} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\importmodule{Foundation.Sec} +\title{Boolean} +\begin{semanticmodule} +inductive{ + name: Stride, + type_parameters: [], + parameters: [], + constructors: [ + {name: spoofing, fields: []}, + {name: tampering, fields: []}, + {name: repudiation, fields: []}, + {name: informationDisclosure, fields: []}, + {name: denialOfService, fields: []}, + {name: elevationOfPrivilege, fields: []} + ] +} + +inductive{ + name: EvidenceKind, + type_parameters: [], + parameters: [], + constructors: [{name: gate, fields: []}, {name: proof, fields: []}, {name: review, fields: []}] +} + +structure{ + name: Evidence, + type_parameters: [], + parameters: [], + fields: [{name: kind, type: EvidenceKind}, {name: reference, type: String}] +} + +structure{ + name: ControlSet, + type_parameters: [], + parameters: [], + fields: [ + {name: title, type: String}, + {name: text, type: String}, + {name: version, type: String}, + {name: lastModified, type: String} + ] +} + +structure{ + name: ModeledAsset, + type_parameters: [], + parameters: [], + fields: [{name: asset, type: String}, {name: name, type: String}, {name: text, type: String}] +} + +structure{ + name: ModeledThreat, + type_parameters: [], + parameters: [], + fields: [ + {name: threat, type: String}, + {name: name, type: String}, + {name: text, type: String}, + {name: category, type: Stride} + ] +} + +structure{ + name: ModeledControl, + type_parameters: [], + parameters: [], + fields: [ + {name: control, type: String}, + {name: name, type: String}, + {name: text, type: String}, + {name: evidence, type: (List Evidence)} + ] +} + +structure{ + name: ThreatMapping, + type_parameters: [], + parameters: [], + fields: [{name: threat, type: String}, {name: controls, type: (List String)}] +} + +structure{ + name: AcceptedRisk, + type_parameters: [], + parameters: [], + fields: [{name: threat, type: String}, {name: rationale, type: String}] +} + +structure{ + name: NormalizedThreatModel, + type_parameters: [], + parameters: [], + fields: [ + {name: threatCount, type: Nat}, + {name: categoryCounts, type: (List Nat)}, + {name: mitigationCounts, type: (List Nat)}, + {name: acceptanceCounts, type: (List Nat)}, + {name: evidenceCounts, type: (List Nat)} + ] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Authority.lex.tex b/app/src/Stitch/Authority.lex.tex new file mode 100644 index 0000000..e97309e --- /dev/null +++ b/app/src/Stitch/Authority.lex.tex @@ -0,0 +1,187 @@ +\begin{lexlean}{Stitch.Authority} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch recoverable service model} +\begin{semanticmodule} +structure{ + name: State, + type_parameters: [], + parameters: [], + fields: [{name: generation, type: Nat}, {name: present, type: Bool}, {name: revoked, type: Bool}] +} + +definition{ + name: signingAllowed, + parameters: [active : Bool, expectedKey : Bool, bodyKey : Bool], + result: Bool, + body: (active && (expectedKey && bodyKey)) +} + +definition{ + name: rotationAllowed, + parameters: [confirmed : Bool, exists : Bool, sameKey : Bool, historyCapacity : Bool], + result: Bool, + body: (confirmed && (exists && (sameKey && historyCapacity))) +} + +definition{ + name: revocationAllowed, + parameters: [confirmed : Bool, exists : Bool, sameScope : Bool], + result: Bool, + body: (confirmed && (exists && sameScope)) +} + +definition{ + name: anchorSaveAllowed, + parameters: [confirmed : Bool, scopeCurrent : Bool, absent : Bool, identical : Bool], + result: Bool, + body: (confirmed && (scopeCurrent && (absent || identical))) +} + +definition{ + name: migrationAllowed, + parameters: [ + confirmed : Bool, + scopeCurrent : Bool, + exists : Bool, + samePrior : Bool, + historyCapacity : Bool + ], + result: Bool, + body: (confirmed && (scopeCurrent && (exists && (samePrior && historyCapacity)))) +} + +definition{ + name: anchorChronologyAllowed, + parameters: [ + sameKey : Bool, + older : Bool, + sameRevision : Bool, + sameDigest : Bool, + adjacent : Bool, + predecessor : Bool + ], + result: Bool, + body: ((not sameKey) || ((not older) && (((not sameRevision) || sameDigest) && ((not adjacent) || predecessor)))) +} + +definition{ + name: publicationAllowed, + parameters: [retiredKey : Bool, trustMatches : Bool], + result: Bool, + body: ((not retiredKey) && trustMatches) +} + +definition{ + name: journalRemovalAllowed, + parameters: [confirmed : Bool, definitelyRefused : Bool, noProviderIdentity : Bool], + result: Bool, + body: (confirmed && (definitelyRefused && noProviderIdentity)) +} + +definition{ + name: controlAllowed, + parameters: [ + action : Nat, + busy : Bool, + saved : Bool, + active : Bool, + hasHead : Bool, + hasTrust : Bool + ], + result: Bool, + body: ((not busy) && (if (action =? 1) then saved else (if (action =? 2) then (saved && active) else (if (action =? 3) then hasHead else (if (action =? 4) then hasTrust else (if (action =? 5) then hasTrust else (if (action =? 6) then hasTrust else true))))))) +} + +definition{ + name: rotate, + parameters: [state : State, confirmed : Bool, sameKey : Bool, historyCapacity : Bool], + result: State, + body: (if (rotationAllowed confirmed (project state present) sameKey historyCapacity) then (record State {generation := ((project state generation) + 1), present := true, revoked := false}) else state) +} + +definition{ + name: revoke, + parameters: [state : State, confirmed : Bool, sameScope : Bool], + result: State, + body: (if (revocationAllowed confirmed (project state present) sameScope) then (record State {generation := (project state generation), present := true, revoked := true}) else state) +} + +definition{ + name: migrate, + parameters: [ + state : State, + confirmed : Bool, + scopeCurrent : Bool, + samePrior : Bool, + historyCapacity : Bool + ], + result: State, + body: (if (migrationAllowed confirmed scopeCurrent (project state present) samePrior historyCapacity) then (record State {generation := ((project state generation) + 1), present := true, revoked := false}) else state) +} + +definition{ + name: maySign, + parameters: [state : State, expectedKey : Bool, bodyKey : Bool], + result: Bool, + body: (signingAllowed ((project state present) && (not (project state revoked))) expectedKey bodyKey) +} + +theorem{ + name: unconfirmedRotationRefused, + parameters: [], + statement: (forall (exists : Bool), (forall (sameKey : Bool), (forall (historyCapacity : Bool), ((rotationAllowed false exists sameKey historyCapacity) = false)))), + proof: decide{} +} + +theorem{ + name: changedAnchorCannotMigrate, + parameters: [], + statement: (forall (confirmed : Bool), (forall (scopeCurrent : Bool), (forall (exists : Bool), (forall (historyCapacity : Bool), ((migrationAllowed confirmed scopeCurrent exists false historyCapacity) = false))))), + proof: decide{} +} + +theorem{ + name: retiredAuthorityCannotPublish, + parameters: [], + statement: (forall (trustMatches : Bool), ((publicationAllowed true trustMatches) = false)), + proof: decide{} +} + +theorem{ + name: uncertainJournalCannotBeRemoved, + parameters: [], + statement: (forall (confirmed : Bool), (forall (noProviderIdentity : Bool), ((journalRemovalAllowed confirmed false noProviderIdentity) = false))), + proof: decide{} +} + +theorem{ + name: revocationBlocksSigning, + parameters: [], + statement: (forall (expectedKey : Bool), (forall (bodyKey : Bool), ((maySign (record State {generation := 0, present := true, revoked := true}) expectedKey bodyKey) = false))), + proof: decide{} +} + +theorem{ + name: rotateCreatesNextGeneration, + parameters: [generation : Nat], + statement: ((rotate (record State {generation := generation, present := true, revoked := false}) true true true) = (record State {generation := (generation + 1), present := true, revoked := false})), + proof: reflexivity{} +} + +theorem{ + name: staleMigrationPreservesState, + parameters: [generation : Nat, revoked : Bool], + statement: ((migrate (record State {generation := generation, present := true, revoked := revoked}) true true false true) = (record State {generation := generation, present := true, revoked := revoked})), + proof: reflexivity{} +} + +theorem{ + name: sameKeyRollbackRefused, + parameters: [], + statement: (forall (sameRevision : Bool), (forall (sameDigest : Bool), (forall (adjacent : Bool), (forall (predecessor : Bool), ((anchorChronologyAllowed true true sameRevision sameDigest adjacent predecessor) = false))))), + proof: decide{} +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Budget.lex.tex b/app/src/Stitch/Budget.lex.tex new file mode 100644 index 0000000..f8ba012 --- /dev/null +++ b/app/src/Stitch/Budget.lex.tex @@ -0,0 +1,1861 @@ +\begin{lexlean}{Stitch.Budget} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Stitch.Identity} +\title{Stitch recoverable service model} +\begin{semanticmodule} +structure{ + name: Resources, + type_parameters: [], + parameters: [], + fields: [ + {name: transferBytes, type: Nat}, + {name: storageBytes, type: Nat}, + {name: computeWork, type: Nat}, + {name: refreshRequests, type: Nat} + ] +} + +structure{ + name: Budget, + type_parameters: [], + parameters: [], + fields: [ + {name: epoch, type: Nat}, + {name: start, type: Nat}, + {name: end, type: Nat}, + {name: last, type: Nat}, + {name: limit, type: Resources}, + {name: spent, type: Resources}, + {name: reserved, type: Resources} + ] +} + +definition{ + name: chooseBool, + parameters: [condition : Bool, whenTrue : Bool, whenFalse : Bool], + result: Bool, + body: (if condition then whenTrue else whenFalse) +} + +definition{ + name: chooseNat, + parameters: [condition : Bool, whenTrue : Nat, whenFalse : Nat], + result: Nat, + body: (if condition then whenTrue else whenFalse) +} + +theorem{ + name: boolAndFalse, + parameters: [], + statement: (forall (value : Bool), ((value && false) = false)), + proof: decide{} +} + +theorem{ + name: boolFalseAnd, + parameters: [], + statement: (forall (value : Bool), ((false && value) = false)), + proof: decide{} +} + +theorem{name: boolNotTrue, parameters: [], statement: ((not true) = false), proof: decide{}} + +theorem{ + name: chooseBoolTrue, + parameters: [], + statement: (forall (whenTrue : Bool), (forall (whenFalse : Bool), ((chooseBool true whenTrue whenFalse) = whenTrue))), + proof: decide{} +} + +theorem{ + name: chooseBoolFalse, + parameters: [], + statement: (forall (whenTrue : Bool), (forall (whenFalse : Bool), ((chooseBool false whenTrue whenFalse) = whenFalse))), + proof: decide{} +} + +theorem{ + name: chooseNatFalse, + parameters: [whenTrue : Nat, whenFalse : Nat], + statement: ((chooseNat false whenTrue whenFalse) = whenFalse), + proof: reflexivity{} +} + +theorem{ + name: chooseNatTrue, + parameters: [whenTrue : Nat, whenFalse : Nat], + statement: ((chooseNat true whenTrue whenFalse) = whenTrue), + proof: reflexivity{} +} + +definition{ + name: reserveAllowed, + parameters: [ + spent : Nat, + reserved : Nat, + cost : Nat, + limit : Nat, + now : Nat, + last : Nat, + end : Nat + ], + result: Bool, + body: ((last <=? now) && ((now ((spent + (reserveAmount spent reserved cost limit now last end)) <= limit)), + proof: linear_arithmetic{definitions: [reserveAllowed, reserveAmount]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: unknownSettlementRetainsReservation, + parameters: [reserved : Nat, ceiling : Nat, actual : Nat], + statement: ((settleReserved reserved ceiling actual false) = reserved), + proof: reflexivity{} +} + +theorem{ + name: settlementDoesNotIncreaseCharge, + parameters: [spent : Nat, reserved : Nat, ceiling : Nat, actual : Nat, known : Bool], + statement: (((settleSpent spent reserved ceiling actual known) + (settleReserved reserved ceiling actual known)) <= (spent + reserved)), + proof: linear_arithmetic{definitions: [settleReserved, settleSpent, settlementAllowed]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: clockRollbackRefused, + parameters: [ + spent : Nat, + reserved : Nat, + cost : Nat, + limit : Nat, + now : Nat, + last : Nat, + end : Nat + ], + statement: ((now < last) -> ((reserveAllowed spent reserved cost limit now last end) = false)), + proof: linear_arithmetic{definitions: [reserveAllowed]}, + axioms: [Quot.sound, propext] +} + +definition{ + name: budgetValid, + parameters: [budget : Budget], + result: Bool, + body: (resourcesWithin (project budget spent) (project budget reserved) (record Resources {transferBytes := 0, storageBytes := 0, computeWork := 0, refreshRequests := 0}) (project budget limit)) +} + +theorem{ + name: vectorReservationPreservesBudget, + parameters: [budget : Budget, cost : Resources, now : Nat], + statement: (((budgetValid budget) = true) -> ((budgetValid (reserveAction budget cost now)) = true)), + proof: linear_arithmetic{definitions: [admitAction, budgetValid, reserveAction, resourcesWithin]}, + axioms: [Classical.choice, Quot.sound, propext] +} + +definition{ + name: zeroResources, + parameters: [], + result: Resources, + body: (record Resources {transferBytes := 0, storageBytes := 0, computeWork := 0, refreshRequests := 0}) +} + +definition{ + name: addResources, + parameters: [left : Resources, right : Resources], + result: Resources, + body: (record Resources {transferBytes := ((project left transferBytes) + (project right transferBytes)), storageBytes := ((project left storageBytes) + (project right storageBytes)), computeWork := ((project left computeWork) + (project right computeWork)), refreshRequests := ((project left refreshRequests) + (project right refreshRequests))}) +} + +definition{ + name: sameResources, + parameters: [left : Resources, right : Resources], + result: Bool, + body: (((project left transferBytes) =? (project right transferBytes)) && (((project left storageBytes) =? (project right storageBytes)) && (((project left computeWork) =? (project right computeWork)) && ((project left refreshRequests) =? (project right refreshRequests))))) +} + +definition{ + name: resourcesAtMost, + parameters: [actual : Resources, ceiling : Resources], + result: Bool, + body: (((project actual transferBytes) <=? (project ceiling transferBytes)) && (((project actual storageBytes) <=? (project ceiling storageBytes)) && (((project actual computeWork) <=? (project ceiling computeWork)) && ((project actual refreshRequests) <=? (project ceiling refreshRequests))))) +} + +structure{ + name: Reservation, + type_parameters: [], + parameters: [], + fields: [ + {name: actionId, type: Stitch.Identity::Digest}, + {name: epoch, type: Nat}, + {name: ceiling, type: Resources}, + {name: actual, type: Resources}, + {name: settled, type: Bool} + ] +} + +structure{ + name: Ledger, + type_parameters: [], + parameters: [], + fields: [{name: budget, type: Budget}, {name: reservations, type: (List Reservation)}] +} + +inductive{ + name: SettlementOutcome, + type_parameters: [], + parameters: [], + constructors: [{name: Unknown, fields: []}, {name: Known, fields: []}] +} + +structure{ + name: SettlementObservation, + type_parameters: [], + parameters: [], + fields: [ + {name: actionId, type: Stitch.Identity::Digest}, + {name: epoch, type: Nat}, + {name: actual, type: Resources}, + {name: outcome, type: SettlementOutcome} + ] +} + +inductive{ + name: Selection, + type_parameters: [], + parameters: [], + constructors: [{name: Reject, fields: []}, {name: Accept, fields: []}] +} + +definition{ + name: selectionFromBool, + parameters: [condition : Bool], + result: Selection, + body: (if condition then (ctor Selection.Accept) else (ctor Selection.Reject)) +} + +definition{ + name: selectionValue, + parameters: [selection : Selection], + result: Bool, + body: (match selection | Selection.Reject => false | Selection.Accept => true) +} + +definition{ + name: selectBoth, + parameters: [pending : Selection, matching : Selection], + result: Selection, + body: (match pending | Selection.Reject => (ctor Selection.Reject) | Selection.Accept => matching) +} + +definition{ + name: selectRemaining, + parameters: [pending : Selection, matching : Selection], + result: Selection, + body: (match pending + | Selection.Reject => (ctor Selection.Reject) + | Selection.Accept => (match matching + | Selection.Reject => (ctor Selection.Accept) + | Selection.Accept => (ctor Selection.Reject))) +} + +definition{ + name: selectBool, + parameters: [selection : Selection, whenTrue : Bool, whenFalse : Bool], + result: Bool, + body: (match selection | Selection.Reject => whenFalse | Selection.Accept => whenTrue) +} + +definition{ + name: selectNat, + parameters: [selection : Selection, whenTrue : Nat, whenFalse : Nat], + result: Nat, + body: (match selection | Selection.Reject => whenFalse | Selection.Accept => whenTrue) +} + +definition{ + name: selectLedger, + parameters: [selection : Selection, whenTrue : Ledger, whenFalse : Ledger], + result: Ledger, + body: (match selection | Selection.Reject => whenFalse | Selection.Accept => whenTrue) +} + +theorem{ + name: boolImpliesTruth, + parameters: [], + statement: (forall (value : Bool), (((value = true) -> (0 = 0)) <-> (0 = 0))), + proof: decide{} +} + +theorem{ + name: selectedAdmissionSafety, + parameters: [], + statement: (forall (before : Bool), (forall (guard : Bool), (forall (candidate : Bool), (((before = true) -> ((selectBool (selectionFromBool guard) candidate before) = true)) <-> ((before = true) -> ((guard = true) -> (candidate = true))))))), + proof: decide{} +} + +theorem{ + name: selectionValueFromBool, + parameters: [], + statement: (forall (value : Bool), ((selectionValue (selectionFromBool value)) = value)), + proof: decide{} +} + +theorem{ + name: selectBoolFromValue, + parameters: [selection : Selection, whenTrue : Bool, whenFalse : Bool], + statement: ((selectBool selection whenTrue whenFalse) = (chooseBool (selectionValue selection) whenTrue whenFalse)), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +definition{ + name: outcomeKnown, + parameters: [outcome : SettlementOutcome], + result: Bool, + body: (match outcome | SettlementOutcome.Unknown => false | SettlementOutcome.Known => true) +} + +definition{ + name: reservationUnused, + parameters: [reservations : (List Reservation), actionId : Stitch.Identity::Digest], + result: Bool, + body: (match reservations + | List.nil => true + | List.cons head tail => ((not (Stitch.Identity::sameDigest (project head actionId) actionId)) && (reservationUnused tail actionId))), + recursive_argument: reservations +} + +definition{ + name: resourceAt, + parameters: [resources : Resources, index : Nat], + result: Nat, + body: (if (index =? 0) then (project resources transferBytes) else (if (index =? 1) then (project resources storageBytes) else (if (index =? 2) then (project resources computeWork) else (project resources refreshRequests)))) +} + +definition{ + name: spentAt, + parameters: [reservations : (List Reservation), index : Nat], + result: Nat, + body: (match reservations + | List.nil => 0 + | List.cons head tail => ((selectNat (selectionFromBool (project head settled)) (resourceAt (project head actual) index) 0) + (spentAt tail index))), + recursive_argument: reservations +} + +definition{ + name: reservedAt, + parameters: [reservations : (List Reservation), index : Nat], + result: Nat, + body: (match reservations + | List.nil => 0 + | List.cons head tail => ((selectNat (selectionFromBool (project head settled)) 0 (resourceAt (project head ceiling) index)) + (reservedAt tail index))), + recursive_argument: reservations +} + +definition{ + name: headChargedAt, + parameters: [reservation : Reservation, index : Nat], + result: Nat, + body: (selectNat (selectionFromBool (project reservation settled)) (resourceAt (project reservation actual) index) (resourceAt (project reservation ceiling) index)) +} + +definition{ + name: chargedAt, + parameters: [reservations : (List Reservation), index : Nat], + result: Nat, + body: (match reservations + | List.nil => 0 + | List.cons head tail => ((headChargedAt head index) + (chargedAt tail index))), + recursive_argument: reservations +} + +definition{ + name: reservedTotal, + parameters: [reservations : (List Reservation)], + result: Resources, + body: (record Resources {transferBytes := (reservedAt reservations 0), storageBytes := (reservedAt reservations 1), computeWork := (reservedAt reservations 2), refreshRequests := (reservedAt reservations 3)}) +} + +definition{ + name: spentTotal, + parameters: [reservations : (List Reservation)], + result: Resources, + body: (record Resources {transferBytes := (spentAt reservations 0), storageBytes := (spentAt reservations 1), computeWork := (spentAt reservations 2), refreshRequests := (spentAt reservations 3)}) +} + +definition{ + name: reservationCostValid, + parameters: [reservation : Reservation], + result: Bool, + body: (if (project reservation settled) then (resourcesAtMost (project reservation actual) (project reservation ceiling)) else (sameResources (project reservation actual) (zeroResources))) +} + +definition{ + name: reservationsValid, + parameters: [reservations : (List Reservation), epoch : Nat], + result: Bool, + body: (match reservations + | List.nil => true + | List.cons head tail => ((Stitch.Identity::digestWellFormed (project head actionId)) && (((project head epoch) =? epoch) && ((reservationUnused tail (project head actionId)) && ((reservationCostValid head) && (reservationsValid tail epoch)))))), + recursive_argument: reservations +} + +definition{ + name: ledgerValid, + parameters: [ledger : Ledger], + result: Bool, + body: ((budgetValid (project ledger budget)) && (((project (project ledger budget) start) <=? (project (project ledger budget) last)) && (((project (project ledger budget) last) false + | List.cons head tail => (selectBool (selectionFromBool (Stitch.Identity::sameDigest (project head actionId) (project observation actionId))) ((not (selectionValue (selectionFromBool (project head settled)))) && (((project head epoch) =? (project observation epoch)) && (resourcesAtMost (project observation actual) (project head ceiling)))) (settlementRecorded tail observation))), + recursive_argument: reservations +} + +definition{ + name: settleLedgerAllowed, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + result: Bool, + body: ((outcomeKnown (project observation outcome)) && ((ledgerValid ledger) && (((project observation epoch) =? (project (project ledger budget) epoch)) && (((project (project ledger budget) last) <=? now) && ((now reservation + | Selection.Accept => (record Reservation {actionId := (project reservation actionId), epoch := (project reservation epoch), ceiling := (project reservation ceiling), actual := (project observation actual), settled := true})) +} + +definition{ + name: updateSettlementRecord, + parameters: [reservation : Reservation, observation : SettlementObservation, pending : Selection], + result: Reservation, + body: (selectedSettlementRecord (selectBoth pending (selectionFromBool (Stitch.Identity::sameDigest (project reservation actionId) (project observation actionId)))) reservation observation) +} + +definition{ + name: recordSettlementFrom, + parameters: [ + reservations : (List Reservation), + observation : SettlementObservation, + pending : Selection + ], + result: (List Reservation), + body: (match reservations + | List.nil => (nil Reservation) + | List.cons head tail => (cons (updateSettlementRecord head observation pending) (recordSettlementFrom tail observation (selectRemaining pending (selectionFromBool (Stitch.Identity::sameDigest (project head actionId) (project observation actionId))))))), + recursive_argument: reservations +} + +definition{ + name: recordSettlement, + parameters: [reservations : (List Reservation), observation : SettlementObservation], + result: (List Reservation), + body: (recordSettlementFrom reservations observation (ctor Selection.Accept)) +} + +definition{ + name: settlementCandidate, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + result: Ledger, + body: (let reservations : (List Reservation) := (recordSettlement (project ledger reservations) observation); (record Ledger {budget := (ledgerBudget (project ledger budget) reservations now), reservations := reservations})) +} + +definition{ + name: settleLedger, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + result: Ledger, + body: (selectLedger (selectionFromBool (settleLedgerAllowed ledger observation now)) (settlementCandidate ledger observation now) ledger) +} + +theorem{ + name: unknownOutcomeRetainsLedger, + parameters: [ + ledger : Ledger, + actionId : Stitch.Identity::Digest, + epoch : Nat, + actual : Resources, + now : Nat + ], + statement: ((settleLedger ledger (record SettlementObservation {actionId := actionId, epoch := epoch, actual := actual, outcome := (ctor SettlementOutcome.Unknown)}) now) = ledger), + proof: reflexivity{} +} + +theorem{ + name: staleEpochCannotSettle, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: (((project observation epoch) < (project (project ledger budget) epoch)) -> ((settleLedgerAllowed ledger observation now) = false)), + proof: linear_arithmetic{definitions: [settleLedgerAllowed]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: settlementClockRollbackRefused, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((now < (project (project ledger budget) last)) -> ((settleLedgerAllowed ledger observation now) = false)), + proof: linear_arithmetic{definitions: [settleLedgerAllowed]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: recordedIdCannotBeReservedAgain, + parameters: [ + budget : Budget, + head : Reservation, + tail : (List Reservation), + cost : Resources, + now : Nat + ], + statement: ((reserveLedgerAllowed (record Ledger {budget := budget, reservations := (cons head tail)}) (project head actionId) cost now) = false), + proof: simplify{ + definitions: [ + boolFalseAnd, + boolNotTrue, + reservationUnused, + reserveLedgerAllowed, + Stitch.Identity::fullDigestReflexive + ] + }, + axioms: [propext] +} + +theorem{ + name: settledHeadCannotBeChargedAgain, + parameters: [ + actionId : Stitch.Identity::Digest, + epoch : Nat, + ceiling : Resources, + priorActual : Resources, + tail : (List Reservation), + actual : Resources + ], + statement: ((settlementRecorded (cons (record Reservation {actionId := actionId, epoch := epoch, ceiling := ceiling, actual := priorActual, settled := true}) tail) (record SettlementObservation {actionId := actionId, epoch := epoch, actual := actual, outcome := (ctor SettlementOutcome.Known)})) = false), + proof: simplify{ + definitions: [ + boolFalseAnd, + boolNotTrue, + chooseBoolTrue, + selectBoolFromValue, + selectionValueFromBool, + settlementRecorded, + Stitch.Identity::fullDigestReflexive + ] + }, + axioms: [propext] +} + +theorem{ + name: ledgerValiditySelect, + parameters: [selection : Selection, whenTrue : Ledger, whenFalse : Ledger], + statement: ((ledgerValid (selectLedger selection whenTrue whenFalse)) = (selectBool selection (ledgerValid whenTrue) (ledgerValid whenFalse))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +definition{ + name: reservationNumericValidity, + parameters: [ledger : Ledger], + result: Bool, + body: ((budgetValid (project ledger budget)) && (((project (project ledger budget) start) <=? (project (project ledger budget) last)) && (((project (project ledger budget) last) (a = true)) -> (((g = true) -> (b = true)) -> (((g = true) -> ((a && b) = true)) <-> (0 = 0))))))), + proof: decide{} +} + +theorem{ + name: reservationTrueAnd, + parameters: [], + statement: (forall (v : Bool), ((true && v) = v)), + proof: decide{} +} + +theorem{ + name: reservationEpochReflexive, + parameters: [epoch : Nat], + statement: ((epoch =? epoch) = true), + proof: linear_arithmetic{}, + axioms: [propext] +} + +theorem{ + name: reservationFreshCostValidity, + parameters: [actionId : Stitch.Identity::Digest, epoch : Nat, ceiling : Resources], + statement: ((reservationCostValid (record Reservation {actionId := actionId, epoch := epoch, ceiling := ceiling, actual := (zeroResources), settled := false})) = true), + proof: reflexivity{} +} + +theorem{ + name: reservationListAdmissionFact, + parameters: [], + statement: (forall (unused : Bool), (forall (b : Bool), (forall (start : Bool), (forall (end : Bool), (forall (valid : Bool), (forall (spent : Bool), (forall (reserved : Bool), (forall (digest : Bool), (forall (admitted : Bool), ((((unused && ((b && (start && (end && (valid && (spent && reserved))))) && (digest && admitted))) = true) -> ((digest && (unused && valid)) = true)) <-> (0 = 0))))))))))), + proof: decide{} +} + +theorem{ + name: reservationCandidateListGuarantee, + parameters: [ledger : Ledger, actionId : Stitch.Identity::Digest, cost : Resources, now : Nat], + statement: ((((reserveLedgerAllowed ledger actionId cost now) = true) -> ((reservationsValid (project (reservationCandidate ledger actionId cost now) reservations) (project (project (reservationCandidate ledger actionId cost now) budget) epoch)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + ledgerBudget, + ledgerValid, + reservationCandidate, + reservationEpochReflexive, + reservationFreshCostValidity, + reservationListAdmissionFact, + reservationTrueAnd, + reservationsValid, + reserveLedgerAllowed + ] + }, + axioms: [propext] +} + +theorem{ + name: reservationCandidateNumericGuarantee, + parameters: [ledger : Ledger, actionId : Stitch.Identity::Digest, cost : Resources, now : Nat], + statement: ((((reserveLedgerAllowed ledger actionId cost now) = true) -> ((reservationNumericValidity (reservationCandidate ledger actionId cost now)) = true)) <-> (0 = 0)), + proof: constructor{ + branches: [ + linear_arithmetic{}, + linear_arithmetic{ + definitions: [ + admitAction, + budgetValid, + ledgerBudget, + ledgerValid, + reservationCandidate, + reservationNumericValidity, + reserveLedgerAllowed, + reservedAt, + reservedTotal, + resourceAt, + resourcesWithin, + sameResources, + selectNat, + selectionFromBool, + spentAt, + spentTotal, + zeroResources + ] + } + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: reservationCandidateGuarantee, + parameters: [ledger : Ledger, actionId : Stitch.Identity::Digest, cost : Resources, now : Nat], + statement: ((((reserveLedgerAllowed ledger actionId cost now) = true) -> ((ledgerValid (reservationCandidate ledger actionId cost now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + reservationCandidateListGuarantee, + reservationCandidateNumericGuarantee, + reservationConjunctionClosure, + reservationLedgerParts + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: reservationSelectedSafety, + parameters: [], + statement: (forall (before : Bool), (forall (guard : Bool), (forall (candidate : Bool), (((guard = true) -> (candidate = true)) -> (((before = true) -> ((selectBool (selectionFromBool guard) candidate before) = true)) <-> (0 = 0)))))), + proof: decide{} +} + +theorem{ + name: reserveLedgerPreservesValidity, + parameters: [ledger : Ledger, actionId : Stitch.Identity::Digest, cost : Resources, now : Nat], + statement: (((ledgerValid ledger) = true) -> ((ledgerValid (reserveLedger ledger actionId cost now)) = true)), + proof: simplify{ + definitions: [ + ledgerValiditySelect, + reservationCandidateGuarantee, + reservationSelectedSafety, + reserveLedger + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: reserveLedgerPreservesValidityFact, + parameters: [ledger : Ledger, actionId : Stitch.Identity::Digest, cost : Resources, now : Nat], + statement: ((((ledgerValid ledger) = true) -> ((ledgerValid (reserveLedger ledger actionId cost now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + ledgerValiditySelect, + reservationCandidateGuarantee, + reservationSelectedSafety, + reserveLedger + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +definition{ + name: reservationSelectNat, + parameters: [selection : Selection, whenTrue : Nat, whenFalse : Nat], + result: Nat, + body: (match selection | Selection.Reject => whenFalse | Selection.Accept => whenTrue) +} + +theorem{ + name: reservationLedgerClockSelect, + parameters: [selection : Selection, whenTrue : Ledger, whenFalse : Ledger], + statement: ((project (project (selectLedger selection whenTrue whenFalse) budget) last) = (reservationSelectNat selection (project (project whenTrue budget) last) (project (project whenFalse budget) last))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: reservationSelectedClockFact, + parameters: [condition : Bool, whenTrue : Nat, whenFalse : Nat], + statement: (((condition = true) -> ((reservationSelectNat (selectionFromBool condition) whenTrue whenFalse) = whenTrue)) <-> (0 = 0)), + proof: constructor{ + branches: [ + linear_arithmetic{}, + linear_arithmetic{definitions: [reservationSelectNat, selectionFromBool]} + ] + }, + axioms: [propext] +} + +theorem{ + name: reservationCandidateClock, + parameters: [ledger : Ledger, actionId : Stitch.Identity::Digest, cost : Resources, now : Nat], + statement: ((project (project (reservationCandidate ledger actionId cost now) budget) last) = now), + proof: reflexivity{} +} + +theorem{ + name: reserveLedgerClockFact, + parameters: [ledger : Ledger, actionId : Stitch.Identity::Digest, cost : Resources, now : Nat], + statement: ((((reserveLedgerAllowed ledger actionId cost now) = true) -> ((project (project (reserveLedger ledger actionId cost now) budget) last) = now)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + reservationCandidateClock, + reservationLedgerClockSelect, + reservationSelectedClockFact, + reserveLedger + ] + }, + axioms: [propext] +} + +theorem{ + name: selectedRecordId, + parameters: [ + selection : Selection, + reservation : Reservation, + observation : SettlementObservation + ], + statement: ((project (selectedSettlementRecord selection reservation observation) actionId) = (project reservation actionId)), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: selectedRecordEpoch, + parameters: [ + selection : Selection, + reservation : Reservation, + observation : SettlementObservation + ], + statement: ((project (selectedSettlementRecord selection reservation observation) epoch) = (project reservation epoch)), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: selectedRecordCeiling, + parameters: [ + selection : Selection, + reservation : Reservation, + observation : SettlementObservation + ], + statement: ((project (selectedSettlementRecord selection reservation observation) ceiling) = (project reservation ceiling)), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: selectedRecordCostValidity, + parameters: [ + selection : Selection, + reservation : Reservation, + observation : SettlementObservation + ], + statement: ((reservationCostValid (selectedSettlementRecord selection reservation observation)) = (selectBool selection (resourcesAtMost (project observation actual) (project reservation ceiling)) (reservationCostValid reservation))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: selectBoolFromBool, + parameters: [], + statement: (forall (condition : Bool), (forall (whenTrue : Bool), (forall (whenFalse : Bool), ((selectBool (selectionFromBool condition) whenTrue whenFalse) = (chooseBool condition whenTrue whenFalse))))), + proof: decide{} +} + +theorem{ + name: settlementFromPreservesUnusedIds, + parameters: [ + reservations : (List Reservation), + observation : SettlementObservation, + actionId : Stitch.Identity::Digest, + pending : Selection + ], + statement: ((reservationUnused (recordSettlementFrom reservations observation pending) actionId) = (reservationUnused reservations actionId)), + proof: induction{ + branches: [ + { + proof: simplify{definitions: [recordSettlementFrom, reservationUnused]}, + binders: [], + constructor: nil + }, + { + proof: simplify{ + definitions: [ + hypothesis, + recordSettlementFrom, + reservationUnused, + selectedRecordId, + updateSettlementRecord + ] + }, + binders: [head, tail, hypothesis], + constructor: cons + } + ], + generalizing: [actionId, observation, pending], + scrutinee: reservations + }, + axioms: [propext] +} + +theorem{ + name: settlementPreservesUnusedIds, + parameters: [ + reservations : (List Reservation), + observation : SettlementObservation, + actionId : Stitch.Identity::Digest + ], + statement: ((reservationUnused (recordSettlement reservations observation) actionId) = (reservationUnused reservations actionId)), + proof: simplify{definitions: [recordSettlement, settlementFromPreservesUnusedIds]}, + axioms: [propext] +} + +theorem{ + name: selectNatFromBool, + parameters: [selection : Selection, whenTrue : Nat, whenFalse : Nat], + statement: ((selectNat selection whenTrue whenFalse) = (chooseNat (selectionValue selection) whenTrue whenFalse)), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: selectedRecordCharge, + parameters: [ + selection : Selection, + reservation : Reservation, + observation : SettlementObservation, + index : Nat + ], + statement: ((headChargedAt (selectedSettlementRecord selection reservation observation) index) = (selectNat selection (resourceAt (project observation actual) index) (headChargedAt reservation index))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: scalarAccountingStep, + parameters: [ + selection : Selection, + actual : Nat, + ceiling : Nat, + spent : Nat, + reserved : Nat, + charged : Nat + ], + statement: (((((selectNat selection actual 0) + spent) + ((selectNat selection 0 ceiling) + reserved)) = ((selectNat selection actual ceiling) + charged)) <-> ((spent + reserved) = charged)), + proof: cases{ + branches: [ + {proof: linear_arithmetic{definitions: [selectNat]}, binders: [], constructor: Reject}, + {proof: linear_arithmetic{definitions: [selectNat]}, binders: [], constructor: Accept} + ], + scrutinee: selection + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: scalarAccounting, + parameters: [reservations : (List Reservation), index : Nat], + statement: (((spentAt reservations index) + (reservedAt reservations index)) = (chargedAt reservations index)), + proof: induction{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: nil}, + { + proof: simplify{ + definitions: [ + chargedAt, + headChargedAt, + hypothesis, + reservedAt, + scalarAccountingStep, + spentAt + ] + }, + binders: [head, tail, hypothesis], + constructor: cons + } + ], + generalizing: [index], + scrutinee: reservations + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: settlementValidityStep, + parameters: [pending : Selection, matching : Selection], + statement: (forall (identity : Bool), (forall (epoch : Bool), (forall (unused : Bool), (forall (headCost : Bool), (forall (tailValid : Bool), (forall (settled : Bool), (forall (epochMatches : Bool), (forall (actualWithin : Bool), (forall (tailRecorded : Bool), (forall (nextValid : Bool), ((((tailValid = true) -> (((chooseBool (selectionValue (selectRemaining pending matching)) tailRecorded true) = true) -> (nextValid = true))) <-> (0 = 0)) -> ((((identity && (epoch && (unused && (headCost && tailValid)))) = true) -> (((chooseBool (selectionValue pending) (selectBool matching ((not settled) && (epochMatches && actualWithin)) tailRecorded) true) = true) -> ((identity && (epoch && (unused && ((selectBool (selectBoth pending matching) actualWithin headCost) && nextValid)))) = true))) <-> (0 = 0))))))))))))), + proof: cases{ + branches: [ + { + proof: cases{ + branches: [ + {proof: decide{}, binders: [], constructor: Reject}, + {proof: decide{}, binders: [], constructor: Accept} + ], + scrutinee: matching + }, + binders: [], + constructor: Reject + }, + { + proof: cases{ + branches: [ + {proof: decide{}, binders: [], constructor: Reject}, + {proof: decide{}, binders: [], constructor: Accept} + ], + scrutinee: matching + }, + binders: [], + constructor: Accept + } + ], + scrutinee: pending + } +} + +theorem{ + name: settlementFromPreservesReservationValidity, + parameters: [ + reservations : (List Reservation), + observation : SettlementObservation, + epoch : Nat, + pending : Selection + ], + statement: ((((reservationsValid reservations epoch) = true) -> (((chooseBool (selectionValue pending) (settlementRecorded reservations observation) true) = true) -> ((reservationsValid (recordSettlementFrom reservations observation pending) epoch) = true))) <-> (0 = 0)), + proof: induction{ + branches: [ + { + proof: constructor{ + branches: [ + linear_arithmetic{}, + linear_arithmetic{ + definitions: [chooseBool, recordSettlementFrom, reservationsValid, settlementRecorded] + } + ] + }, + binders: [], + constructor: nil + }, + { + proof: simplify{ + definitions: [ + hypothesis, + recordSettlementFrom, + reservationsValid, + selectedRecordCostValidity, + selectedRecordEpoch, + selectedRecordId, + settlementFromPreservesUnusedIds, + settlementRecorded, + settlementValidityStep, + updateSettlementRecord + ] + }, + binders: [head, tail, hypothesis], + constructor: cons + } + ], + generalizing: [epoch, observation, pending], + scrutinee: reservations + }, + axioms: [propext] +} + +theorem{ + name: settlementReservationValidityFact, + parameters: [reservations : (List Reservation), observation : SettlementObservation, epoch : Nat], + statement: ((((reservationsValid reservations epoch) = true) -> (((settlementRecorded reservations observation) = true) -> ((reservationsValid (recordSettlement reservations observation) epoch) = true))) <-> (0 = 0)), + proof: apply{ + arguments: [reservations, observation, epoch, (ctor Selection.Accept)], + theorem: settlementFromPreservesReservationValidity + }, + axioms: [propext] +} + +theorem{ + name: settlementPreservesReservationValidity, + parameters: [reservations : (List Reservation), observation : SettlementObservation, epoch : Nat], + statement: (((reservationsValid reservations epoch) = true) -> (((settlementRecorded reservations observation) = true) -> ((reservationsValid (recordSettlement reservations observation) epoch) = true))), + proof: simplify{definitions: [settlementReservationValidityFact]}, + axioms: [propext] +} + +theorem{ + name: scalarBoundToBool, + parameters: [left : Nat, right : Nat], + statement: ((left <= right) <-> ((left <=? right) = true)), + proof: linear_arithmetic{}, + axioms: [propext] +} + +theorem{ + name: scalarBoolToBound, + parameters: [left : Nat, right : Nat], + statement: (((left <=? right) = true) <-> (left <= right)), + proof: linear_arithmetic{}, + axioms: [propext] +} + +theorem{ + name: settledSelectionChargeStep, + parameters: [], + statement: (forall (tailRecorded : Bool), (forall (epochMatches : Bool), (forall (actualWithin : Bool), (forall (tailBound : Bool), (forall (wholeBound : Bool), ((((((chooseBool (selectionValue (selectRemaining (ctor Selection.Accept) (ctor Selection.Accept))) tailRecorded true) = true) -> (tailBound = true)) <-> (0 = 0)) -> (((chooseBool (selectionValue (ctor Selection.Accept)) (selectBool (ctor Selection.Accept) ((not (selectionValue (ctor Selection.Accept))) && (epochMatches && actualWithin)) tailRecorded) true) = true) -> (wholeBound = true))) <-> (0 = 0))))))), + proof: decide{} +} + +definition{ + name: scalarChargeSafe, + parameters: [pending : Selection, recorded : Bool, bound : Bool], + result: Bool, + body: (selectBool pending ((not recorded) || bound) bound) +} + +theorem{ + name: scalarChargeRejected, + parameters: [recorded : Bool, bound : Bool], + statement: ((scalarChargeSafe (ctor Selection.Reject) recorded bound) = bound), + proof: reflexivity{} +} + +definition{ + name: scalarFreshChargeCheck, + parameters: [ + epochMatches : Bool, + actualWithin : Bool, + actualBound : Bool, + tailBound : Bool, + resultBound : Bool + ], + result: Bool, + body: ((not (epochMatches && actualWithin)) || resultBound) +} + +theorem{ + name: scalarAdditionMonotone, + parameters: [actual : Nat, ceiling : Nat, before : Nat, after : Nat], + statement: (((not (actual <=? ceiling)) || ((not (after <=? before)) || ((actual + after) <=? (ceiling + before)))) = true), + proof: linear_arithmetic{}, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: scalarFreshChargeGate, + parameters: [], + statement: (forall (epochMatches : Bool), (forall (actualWithin : Bool), (forall (actualBound : Bool), (forall (tailBound : Bool), (forall (resultBound : Bool), ((((not actualBound) || ((not tailBound) || resultBound)) = true) -> (((((not actualWithin) || actualBound) = true) -> ((tailBound = true) -> ((scalarFreshChargeCheck epochMatches actualWithin actualBound tailBound resultBound) = true))) <-> (0 = 0)))))))), + proof: decide{} +} + +theorem{ + name: scalarSameConsequent, + parameters: [constraint : Bool, observed : Bool], + statement: ((constraint = true) -> ((observed = true) -> (observed = true))), + proof: linear_arithmetic{} +} + +theorem{ + name: scalarTrueConsequentObserved, + parameters: [constraint : Bool, observed : Bool], + statement: ((constraint = true) -> ((observed = true) -> (true = true))), + proof: linear_arithmetic{}, + axioms: [propext] +} + +theorem{ + name: scalarAdditionCancellation, + parameters: [head : Nat, after : Nat, before : Nat], + statement: ((((head + after) <=? (head + before)) = true) <-> ((after <=? before) = true)), + proof: constructor{branches: [linear_arithmetic{}, linear_arithmetic{}]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: scalarCheckComparisonCongruence, + parameters: [pending : Selection], + statement: (forall (recorded : Bool), (forall (left : Bool), (forall (right : Bool), (((left = true) <-> (right = true)) -> (((scalarChargeSafe pending recorded left) = true) <-> ((scalarChargeSafe pending recorded right) = true)))))), + proof: cases{ + branches: [ + {proof: decide{}, binders: [], constructor: Reject}, + {proof: decide{}, binders: [], constructor: Accept} + ], + scrutinee: pending + } +} + +theorem{ + name: scalarCheckReflected, + parameters: [], + statement: (forall (recorded : Bool), (forall (bound : Bool), (((scalarChargeSafe (ctor Selection.Accept) recorded bound) = true) <-> ((recorded = true) -> (bound = true))))), + proof: decide{} +} + +theorem{ + name: scalarCheckAdditionCancellation, + parameters: [recorded : Bool, head : Nat, after : Nat, before : Nat], + statement: (((scalarChargeSafe (ctor Selection.Accept) recorded ((head + after) <=? (head + before))) = true) <-> ((scalarChargeSafe (ctor Selection.Accept) recorded (after <=? before)) = true)), + proof: simplify{definitions: [scalarAdditionCancellation, scalarCheckReflected]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: resourceAtChargeConstraint, + parameters: [actual : Resources, ceiling : Resources, index : Nat], + statement: (((not (resourcesAtMost actual ceiling)) || ((resourceAt actual index) <=? (resourceAt ceiling index))) = true), + proof: linear_arithmetic{definitions: [resourceAt, resourcesAtMost]}, + axioms: [Classical.choice, Quot.sound, propext] +} + +definition{ + name: scalarStepChargeSafe, + parameters: [ + pending : Selection, + matching : Selection, + settled : Selection, + epochMatches : Bool, + actualWithin : Bool, + tailRecorded : Bool, + actual : Nat, + ceiling : Nat, + oldActual : Nat, + before : Nat, + after : Nat + ], + result: Bool, + body: (match pending + | Selection.Reject => (after <=? before) + | Selection.Accept => (match matching + | Selection.Reject => (scalarChargeSafe (ctor Selection.Accept) tailRecorded (after <=? before)) + | Selection.Accept => (match settled + | Selection.Reject => (scalarFreshChargeCheck epochMatches actualWithin (actual <=? ceiling) (after <=? before) ((actual + after) <=? (ceiling + before))) + | Selection.Accept => true))) +} + +theorem{ + name: resourceAtBound, + parameters: [actual : Resources, ceiling : Resources, index : Nat], + statement: (((resourcesAtMost actual ceiling) = true) -> ((resourceAt actual index) <= (resourceAt ceiling index))), + proof: linear_arithmetic{definitions: [resourceAt, resourcesAtMost]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: scalarTrueConsequent, + parameters: [condition : Bool, actual : Nat, ceiling : Nat, tail : Bool], + statement: (((condition = true) -> (actual <= ceiling)) -> ((tail = true) -> (true = true))), + proof: linear_arithmetic{}, + axioms: [propext] +} + +theorem{ + name: scalarStepChargeGuarantee, + parameters: [ + pending : Selection, + matching : Selection, + settled : Selection, + epochMatches : Bool, + actualWithin : Bool, + tailRecorded : Bool, + actual : Nat, + ceiling : Nat, + oldActual : Nat, + before : Nat, + after : Nat + ], + statement: ((((not actualWithin) || (actual <=? ceiling)) = true) -> (((scalarChargeSafe (selectRemaining pending matching) tailRecorded (after <=? before)) = true) -> ((scalarStepChargeSafe pending matching settled epochMatches actualWithin tailRecorded actual ceiling oldActual before after) = true))), + proof: cases{ + branches: [ + { + proof: apply{ + arguments: [((not actualWithin) || (actual <=? ceiling)), (after <=? before)], + theorem: scalarSameConsequent + }, + binders: [], + constructor: Reject + }, + { + proof: cases{ + branches: [ + { + proof: apply{ + arguments: [ + ((not actualWithin) || (actual <=? ceiling)), + (scalarChargeSafe (ctor Selection.Accept) tailRecorded (after <=? before)) + ], + theorem: scalarSameConsequent + }, + binders: [], + constructor: Reject + }, + { + proof: cases{ + branches: [ + { + proof: simplify{ + definitions: [ + scalarAdditionMonotone, + scalarChargeRejected, + scalarFreshChargeGate, + scalarStepChargeSafe, + selectRemaining + ] + }, + binders: [], + constructor: Reject + }, + { + proof: apply{ + arguments: [((not actualWithin) || (actual <=? ceiling)), (after <=? before)], + theorem: scalarTrueConsequentObserved + }, + binders: [], + constructor: Accept + } + ], + scrutinee: settled + }, + binders: [], + constructor: Accept + } + ], + scrutinee: matching + }, + binders: [], + constructor: Accept + } + ], + scrutinee: pending + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: scalarConsChargeCheck, + parameters: [ + pending : Selection, + matching : Selection, + settled : Selection, + epochMatches : Bool, + actualWithin : Bool, + tailRecorded : Bool, + actual : Nat, + ceiling : Nat, + oldActual : Nat, + before : Nat, + after : Nat + ], + statement: (((scalarChargeSafe pending (selectBool matching ((not (selectionValue settled)) && (epochMatches && actualWithin)) tailRecorded) (((selectNat (selectBoth pending matching) actual (selectNat settled oldActual ceiling)) + after) <=? ((selectNat settled oldActual ceiling) + before))) = true) <-> ((scalarStepChargeSafe pending matching settled epochMatches actualWithin tailRecorded actual ceiling oldActual before after) = true)), + proof: cases{ + branches: [ + { + proof: apply{ + arguments: [(selectNat settled oldActual ceiling), after, before], + theorem: scalarAdditionCancellation + }, + binders: [], + constructor: Reject + }, + { + proof: cases{ + branches: [ + { + proof: apply{ + arguments: [tailRecorded, (selectNat settled oldActual ceiling), after, before], + theorem: scalarCheckAdditionCancellation + }, + binders: [], + constructor: Reject + }, + { + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: settled + }, + binders: [], + constructor: Accept + } + ], + scrutinee: matching + }, + binders: [], + constructor: Accept + } + ], + scrutinee: pending + }, + axioms: [Quot.sound, propext] +} + +theorem{ + name: selectedRecordChargeExpanded, + parameters: [ + selection : Selection, + reservation : Reservation, + observation : SettlementObservation, + index : Nat + ], + statement: ((selectNat (selectionFromBool (project (selectedSettlementRecord selection reservation observation) settled)) (resourceAt (project (selectedSettlementRecord selection reservation observation) actual) index) (resourceAt (project (selectedSettlementRecord selection reservation observation) ceiling) index)) = (selectNat selection (resourceAt (project observation actual) index) (selectNat (selectionFromBool (project reservation settled)) (resourceAt (project reservation actual) index) (resourceAt (project reservation ceiling) index)))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: scalarSettlementSafety, + parameters: [ + reservations : (List Reservation), + observation : SettlementObservation, + index : Nat, + pending : Selection + ], + statement: ((scalarChargeSafe pending (settlementRecorded reservations observation) ((chargedAt (recordSettlementFrom reservations observation pending) index) <=? (chargedAt reservations index))) = true), + proof: induction{ + branches: [ + { + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: pending + }, + binders: [], + constructor: nil + }, + { + proof: simplify{ + definitions: [ + chargedAt, + headChargedAt, + hypothesis, + recordSettlementFrom, + resourceAtChargeConstraint, + scalarConsChargeCheck, + scalarStepChargeGuarantee, + selectedRecordChargeExpanded, + settlementRecorded, + updateSettlementRecord + ] + }, + binders: [head, tail, hypothesis], + constructor: cons + } + ], + generalizing: [index, observation, pending], + scrutinee: reservations + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: scalarChargeObservation, + parameters: [], + statement: (forall (recorded : Bool), (forall (bound : Bool), (((recorded = true) -> (bound = true)) <-> ((scalarChargeSafe (ctor Selection.Accept) recorded bound) = true)))), + proof: decide{} +} + +theorem{ + name: scalarSettlementFact, + parameters: [reservations : (List Reservation), observation : SettlementObservation, index : Nat], + statement: ((((settlementRecorded reservations observation) = true) -> ((chargedAt (recordSettlement reservations observation) index) <= (chargedAt reservations index))) <-> (0 = 0)), + proof: simplify{ + definitions: [ + recordSettlement, + scalarBoundToBool, + scalarChargeObservation, + scalarSettlementSafety + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: chargeComparisonObserved, + parameters: [left : Nat, right : Nat], + statement: (((left <=? right) = true) <-> (left <= right)), + proof: linear_arithmetic{}, + axioms: [propext] +} + +theorem{ + name: chargeFourConjunctionFact, + parameters: [], + statement: (forall (guard : Bool), (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), (forall (d : Bool), (((guard = true) -> (a = true)) -> (((guard = true) -> (b = true)) -> (((guard = true) -> (c = true)) -> (((guard = true) -> (d = true)) -> (((guard = true) -> ((a && (b && (c && d))) = true)) <-> (0 = 0))))))))))), + proof: decide{} +} + +theorem{ + name: settlementCannotIncreaseLedgerCharge, + parameters: [reservations : (List Reservation), observation : SettlementObservation], + statement: (((settlementRecorded reservations observation) = true) -> ((resourcesAtMost (addResources (spentTotal (recordSettlement reservations observation)) (reservedTotal (recordSettlement reservations observation))) (addResources (spentTotal reservations) (reservedTotal reservations))) = true)), + proof: simplify{ + definitions: [ + addResources, + chargeComparisonObserved, + chargeFourConjunctionFact, + reservedTotal, + resourcesAtMost, + scalarAccounting, + scalarSettlementFact, + spentTotal + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: settlementCannotIncreaseLedgerChargeFact, + parameters: [reservations : (List Reservation), observation : SettlementObservation], + statement: ((((settlementRecorded reservations observation) = true) -> ((resourcesAtMost (addResources (spentTotal (recordSettlement reservations observation)) (reservedTotal (recordSettlement reservations observation))) (addResources (spentTotal reservations) (reservedTotal reservations))) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + addResources, + chargeComparisonObserved, + chargeFourConjunctionFact, + reservedTotal, + resourcesAtMost, + scalarAccounting, + scalarSettlementFact, + spentTotal + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: settlementValidityProjection, + parameters: [], + statement: (forall (numeric : Bool), (forall (valid : Bool), ((((numeric && valid) = true) -> (valid = true)) <-> (0 = 0)))), + proof: decide{} +} + +theorem{ + name: settlementOldReservationsFact, + parameters: [ledger : Ledger], + statement: ((((ledgerValid ledger) = true) -> ((reservationsValid (project ledger reservations) (project (project ledger budget) epoch)) = true)) <-> (0 = 0)), + proof: simplify{definitions: [reservationLedgerParts, settlementValidityProjection]}, + axioms: [propext] +} + +theorem{ + name: settlementListGateFact, + parameters: [], + statement: (forall (known : Bool), (forall (valid : Bool), (forall (epochMatches : Bool), (forall (lowerBound : Bool), (forall (upperBound : Bool), (forall (recorded : Bool), (forall (beforeList : Bool), (forall (afterList : Bool), (((valid = true) -> (beforeList = true)) -> (((beforeList = true) -> ((recorded = true) -> (afterList = true))) -> ((((known && (valid && (epochMatches && (lowerBound && (upperBound && recorded))))) = true) -> (afterList = true)) <-> (0 = 0)))))))))))), + proof: decide{} +} + +theorem{ + name: settlementNumericGateFact, + parameters: [], + statement: (forall (known : Bool), (forall (valid : Bool), (forall (epochMatches : Bool), (forall (lowerBound : Bool), (forall (upperBound : Bool), (forall (recorded : Bool), (forall (within : Bool), (forall (candidate : Bool), (((recorded = true) -> (within = true)) -> (((valid = true) -> ((lowerBound = true) -> ((upperBound = true) -> ((within = true) -> (candidate = true))))) -> ((((known && (valid && (epochMatches && (lowerBound && (upperBound && recorded))))) = true) -> (candidate = true)) <-> (0 = 0)))))))))))), + proof: decide{} +} + +theorem{ + name: settlementCandidateNumericTransferFact, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((((ledgerValid ledger) = true) -> ((((project (project ledger budget) last) <=? now) = true) -> (((now (((resourcesAtMost (addResources (spentTotal (recordSettlement (project ledger reservations) observation)) (reservedTotal (recordSettlement (project ledger reservations) observation))) (addResources (spentTotal (project ledger reservations)) (reservedTotal (project ledger reservations)))) = true) -> ((reservationNumericValidity (settlementCandidate ledger observation now)) = true))))) <-> (0 = 0)), + proof: constructor{ + branches: [ + linear_arithmetic{}, + linear_arithmetic{ + definitions: [ + addResources, + budgetValid, + ledgerBudget, + ledgerValid, + reservationNumericValidity, + resourcesAtMost, + resourcesWithin, + sameResources, + settlementCandidate, + zeroResources + ] + } + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: settlementCandidateClock, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((project (project (settlementCandidate ledger observation now) budget) last) = now), + proof: reflexivity{} +} + +theorem{ + name: settleLedgerClockFact, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((((settleLedgerAllowed ledger observation now) = true) -> ((project (project (settleLedger ledger observation now) budget) last) = now)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + reservationLedgerClockSelect, + reservationSelectedClockFact, + settleLedger, + settlementCandidateClock + ] + }, + axioms: [propext] +} + +definition{ + name: settlementImplies, + parameters: [guard : Bool, candidate : Bool], + result: Bool, + body: ((not guard) || candidate) +} + +theorem{ + name: settlementImplicationObserved, + parameters: [], + statement: (forall (guard : Bool), (forall (candidate : Bool), (((guard = true) -> (candidate = true)) <-> ((settlementImplies guard candidate) = true)))), + proof: decide{} +} + +theorem{ + name: settlementListGateBooleanFact, + parameters: [], + statement: (forall (known : Bool), (forall (valid : Bool), (forall (epochMatches : Bool), (forall (lowerBound : Bool), (forall (upperBound : Bool), (forall (recorded : Bool), (forall (beforeList : Bool), (forall (afterList : Bool), ((((valid = true) -> (beforeList = true)) -> (((beforeList = true) -> ((recorded = true) -> (afterList = true))) -> ((settlementImplies (known && (valid && (epochMatches && (lowerBound && (upperBound && recorded))))) afterList) = true))) <-> (0 = 0)))))))))), + proof: decide{} +} + +theorem{ + name: settlementNumericGateBooleanFact, + parameters: [], + statement: (forall (known : Bool), (forall (valid : Bool), (forall (epochMatches : Bool), (forall (lowerBound : Bool), (forall (upperBound : Bool), (forall (recorded : Bool), (forall (within : Bool), (forall (candidate : Bool), ((((recorded = true) -> (within = true)) -> (((valid = true) -> ((lowerBound = true) -> ((upperBound = true) -> ((within = true) -> (candidate = true))))) -> ((settlementImplies (known && (valid && (epochMatches && (lowerBound && (upperBound && recorded))))) candidate) = true))) <-> (0 = 0)))))))))), + proof: decide{} +} + +theorem{ + name: settlementListDomainGate, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((((ledgerValid ledger) = true) -> ((reservationsValid (project ledger reservations) (project (project ledger budget) epoch)) = true)) -> ((((reservationsValid (project ledger reservations) (project (project ledger budget) epoch)) = true) -> (((settlementRecorded (project ledger reservations) observation) = true) -> ((reservationsValid (recordSettlement (project ledger reservations) observation) (project (project ledger budget) epoch)) = true))) -> ((settlementImplies (settleLedgerAllowed ledger observation now) (reservationsValid (project (settlementCandidate ledger observation now) reservations) (project (project (settlementCandidate ledger observation now) budget) epoch))) = true))), + proof: simplify{ + definitions: [ + ledgerBudget, + settleLedgerAllowed, + settlementCandidate, + settlementListGateBooleanFact + ] + }, + axioms: [propext] +} + +theorem{ + name: settlementNumericDomainGate, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((((settlementRecorded (project ledger reservations) observation) = true) -> ((resourcesAtMost (addResources (spentTotal (recordSettlement (project ledger reservations) observation)) (reservedTotal (recordSettlement (project ledger reservations) observation))) (addResources (spentTotal (project ledger reservations)) (reservedTotal (project ledger reservations)))) = true)) -> ((((ledgerValid ledger) = true) -> ((((project (project ledger budget) last) <=? now) = true) -> (((now (((resourcesAtMost (addResources (spentTotal (recordSettlement (project ledger reservations) observation)) (reservedTotal (recordSettlement (project ledger reservations) observation))) (addResources (spentTotal (project ledger reservations)) (reservedTotal (project ledger reservations)))) = true) -> ((reservationNumericValidity (settlementCandidate ledger observation now)) = true))))) -> ((settlementImplies (settleLedgerAllowed ledger observation now) (reservationNumericValidity (settlementCandidate ledger observation now))) = true))), + proof: simplify{definitions: [settleLedgerAllowed, settlementNumericGateBooleanFact]}, + axioms: [propext] +} + +theorem{ + name: settlementCandidateListBoolean, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((settlementImplies (settleLedgerAllowed ledger observation now) (reservationsValid (project (settlementCandidate ledger observation now) reservations) (project (project (settlementCandidate ledger observation now) budget) epoch))) = true), + proof: simplify{ + definitions: [ + settlementListDomainGate, + settlementOldReservationsFact, + settlementReservationValidityFact + ] + }, + axioms: [propext] +} + +theorem{ + name: settlementCandidateNumericBoolean, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((settlementImplies (settleLedgerAllowed ledger observation now) (reservationNumericValidity (settlementCandidate ledger observation now))) = true), + proof: simplify{ + definitions: [ + settlementCandidateNumericTransferFact, + settlementCannotIncreaseLedgerChargeFact, + settlementNumericDomainGate + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: settlementCandidateListGuarantee, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((((settleLedgerAllowed ledger observation now) = true) -> ((reservationsValid (project (settlementCandidate ledger observation now) reservations) (project (project (settlementCandidate ledger observation now) budget) epoch)) = true)) <-> (0 = 0)), + proof: simplify{definitions: [settlementCandidateListBoolean, settlementImplicationObserved]}, + axioms: [propext] +} + +theorem{ + name: settlementCandidateNumericGuarantee, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((((settleLedgerAllowed ledger observation now) = true) -> ((reservationNumericValidity (settlementCandidate ledger observation now)) = true)) <-> (0 = 0)), + proof: simplify{definitions: [settlementCandidateNumericBoolean, settlementImplicationObserved]}, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: settlementCandidateGuarantee, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((((settleLedgerAllowed ledger observation now) = true) -> ((ledgerValid (settlementCandidate ledger observation now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + reservationConjunctionClosure, + reservationLedgerParts, + settlementCandidateListGuarantee, + settlementCandidateNumericGuarantee + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: settleLedgerPreservesValidity, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: (((ledgerValid ledger) = true) -> ((ledgerValid (settleLedger ledger observation now)) = true)), + proof: simplify{ + definitions: [ + ledgerValiditySelect, + reservationSelectedSafety, + settleLedger, + settlementCandidateGuarantee + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: settleLedgerPreservesValidityFact, + parameters: [ledger : Ledger, observation : SettlementObservation, now : Nat], + statement: ((((ledgerValid ledger) = true) -> ((ledgerValid (settleLedger ledger observation now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + ledgerValiditySelect, + reservationSelectedSafety, + settleLedger, + settlementCandidateGuarantee + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/ChannelFlow.lex.tex b/app/src/Stitch/ChannelFlow.lex.tex new file mode 100644 index 0000000..3eef613 --- /dev/null +++ b/app/src/Stitch/ChannelFlow.lex.tex @@ -0,0 +1,42 @@ +\begin{lexlean}{Stitch.ChannelFlow} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch recoverable service model} +\begin{semanticmodule} +definition{ + name: queueAllowed, + parameters: [entries : Nat, retained : Nat, bytes : Nat], + result: Bool, + body: ((entries accumulated + | Nat.succ rest => (if (exponent =? 0) then accumulated else (naturalPower rest (prim multiply base base : Nat) (prim quotient exponent 2 0 : Nat) (if ((prim remainder exponent 2 0 : Nat) =? 1) then (prim multiply accumulated base : Nat) else accumulated)))), + recursive_argument: fuel +} + +definition{ + name: ringModulus, + parameters: [bits : Nat], + result: Nat, + body: (naturalPower bits 2 bits 1) +} + +definition{ + name: normalize, + parameters: [value : Nat, modulus : Nat], + result: Nat, + body: (prim remainder value modulus 0 : Nat) +} + +definition{ + name: bitwiseAcc, + parameters: [fuel : Nat, opcode : Nat, left : Nat, right : Nat, place : Nat, accumulated : Nat], + result: Nat, + body: (match fuel + | Nat.zero => accumulated + | Nat.succ rest => (if ((left =? 0) && (right =? 0)) then accumulated else (let lowLeft : Nat := (prim remainder left 2 0 : Nat); (let lowRight : Nat := (prim remainder right 2 0 : Nat); (let low : Nat := (if (opcode =? 7) then (if (lowLeft =? lowRight) then 0 else 1) else (if (opcode =? 8) then (prim multiply lowLeft lowRight : Nat) else (if ((lowLeft + lowRight) =? 0) then 0 else 1))); (bitwiseAcc rest opcode (prim quotient left 2 0 : Nat) (prim quotient right 2 0 : Nat) (prim multiply place 2 : Nat) (accumulated + (prim multiply low place : Nat)))))))), + recursive_argument: fuel +} + +definition{ + name: natBitwise, + parameters: [fuel : Nat, opcode : Nat, left : Nat, right : Nat], + result: Nat, + body: (bitwiseAcc fuel opcode left right 1 0) +} + +definition{ + name: binaryLengthAcc, + parameters: [fuel : Nat, value : Nat, accumulated : Nat], + result: Nat, + body: (match fuel + | Nat.zero => accumulated + | Nat.succ rest => (if (value =? 0) then accumulated else (binaryLengthAcc rest (prim quotient value 2 0 : Nat) (accumulated + 1)))), + recursive_argument: fuel +} + +definition{ + name: binaryLength, + parameters: [fuel : Nat, value : Nat], + result: Nat, + body: (binaryLengthAcc fuel value 0) +} + +definition{ + name: ringPow, + parameters: [fuel : Nat, base : Nat, exponent : Nat, modulus : Nat, accumulated : Nat], + result: Nat, + body: (match fuel + | Nat.zero => (normalize accumulated modulus) + | Nat.succ rest => (if (exponent =? 0) then (normalize accumulated modulus) else (ringPow rest (normalize (prim multiply base base : Nat) modulus) (prim quotient exponent 2 0 : Nat) modulus (if ((prim remainder exponent 2 0 : Nat) =? 1) then (normalize (prim multiply accumulated base : Nat) modulus) else accumulated)))), + recursive_argument: fuel +} + +definition{ + name: powerWorkAcc, + parameters: [fuel : Nat, exponent : Nat, accumulated : Nat], + result: Nat, + body: (match fuel + | Nat.zero => accumulated + | Nat.succ rest => (if (exponent =? 0) then accumulated else (powerWorkAcc rest (prim quotient exponent 2 0 : Nat) (accumulated + (1 + (prim remainder exponent 2 0 : Nat)))))), + recursive_argument: fuel +} + +definition{ + name: powerWork, + parameters: [fuel : Nat, exponent : Nat], + result: Nat, + body: (powerWorkAcc fuel exponent 0) +} + +definition{ + name: instructionWork, + parameters: [instruction : Instruction, bits : Nat], + result: Nat, + body: (if ((project instruction opcode) =? 17) then (1 + (powerWork bits (project instruction argument))) else 1) +} + +theorem{ + name: zeroExponentIsRingUnit, + parameters: [fuel : Nat, base : Nat, modulus : Nat], + statement: ((ringPow fuel base 0 modulus 1) = (normalize 1 modulus)), + proof: induction{ + branches: [ + {proof: linear_arithmetic{definitions: [ringPow]}, binders: [], constructor: zero}, + { + proof: linear_arithmetic{definitions: [ringPow]}, + binders: [rest, hypothesis], + constructor: succ + } + ], + scrutinee: fuel + }, + axioms: [propext] +} + +theorem{ + name: zeroExponentCostsNoMultiplications, + parameters: [fuel : Nat], + statement: ((powerWork fuel 0) = 0), + proof: induction{ + branches: [ + { + proof: linear_arithmetic{definitions: [powerWork, powerWorkAcc]}, + binders: [], + constructor: zero + }, + { + proof: linear_arithmetic{definitions: [powerWork, powerWorkAcc]}, + binders: [rest, hypothesis], + constructor: succ + } + ], + scrutinee: fuel + }, + axioms: [propext] +} + +definition{ + name: ringStep, + parameters: [instruction : Instruction, value : Nat, modulus : Nat], + result: Nat, + body: (let x : Nat := (normalize value modulus); (let y : Nat := (normalize (project instruction argument) modulus); (let op : Nat := (project instruction opcode); (normalize (if (op =? 0) then (prim subtract modulus x : Nat) else (if (op =? 1) then (prim subtract (prim subtract modulus 1 : Nat) x : Nat) else (if (op =? 2) then (x + 1) else (if (op =? 3) then (prim subtract (x + modulus) 1 : Nat) else (if (op =? 4) then (x + y) else (if (op =? 5) then (prim subtract (x + modulus) y : Nat) else (if (op =? 6) then (prim multiply x y : Nat) else (if (op =? 7) then (natBitwise modulus 7 x y) else (if (op =? 8) then (natBitwise modulus 8 x y) else (if (op =? 9) then (natBitwise modulus 9 x y) else (if (op =? 10) then (if (x <=? y) then 1 else 0) else (if (op =? 11) then (if (x value + | List.cons head tail => (execute tail (ringStep head value modulus) modulus)), + recursive_argument: instructions +} + +definition{ + name: appendProgram, + parameters: [prefix : (List Instruction), suffix : (List Instruction)], + result: (List Instruction), + body: (match prefix + | List.nil => suffix + | List.cons head tail => (cons head (appendProgram tail suffix))), + recursive_argument: prefix +} + +definition{ + name: checkpointLinkAllowed, + parameters: [ + jobMatches : Bool, + programMatches : Bool, + inputMatches : Bool, + modelMatches : Bool, + predecessorMatches : Bool, + replayMatches : Bool, + currentStep : Nat, + nextStep : Nat, + programLength : Nat + ], + result: Bool, + body: (replayMatches && (jobMatches && (programMatches && (inputMatches && (modelMatches && (predecessorMatches && ((currentStep (currentStep < nextStep)), + proof: linear_arithmetic{definitions: [checkpointLinkAllowed]}, + axioms: [Quot.sound, propext] +} + +definition{ + name: supportedWidth, + parameters: [bits : Nat], + result: Bool, + body: ((bits =? 8) || ((bits =? 16) || ((bits =? 32) || ((bits =? 64) || (bits =? 128))))) +} + +definition{ + name: instructionsAllowed, + parameters: [instructions : (List Instruction)], + result: Bool, + body: (match instructions + | List.nil => true + | List.cons head tail => ((instructionAllowed (project head opcode)) && (instructionsAllowed tail))), + recursive_argument: instructions +} + +definition{ + name: instructionCount, + parameters: [instructions : (List Instruction)], + result: Nat, + body: (match instructions | List.nil => 0 | List.cons head tail => (1 + (instructionCount tail))), + recursive_argument: instructions +} + +definition{ + name: sameInstruction, + parameters: [left : Instruction, right : Instruction], + result: Bool, + body: (((project left opcode) =? (project right opcode)) && ((project left argument) =? (project right argument))) +} + +definition{ + name: sameInstructions, + parameters: [left : (List Instruction), right : (List Instruction)], + result: Bool, + body: (match left + | List.nil => (match right | List.nil => true | List.cons head tail => false) + | List.cons head tail => (match right + | List.nil => false + | List.cons other rest => ((sameInstruction head other) && (sameInstructions tail rest)))), + recursive_argument: left +} + +definition{ + name: instructionWellFormed, + parameters: [instruction : Instruction, modulus : Nat], + result: Bool, + body: ((instructionAllowed (project instruction opcode)) && (if ((project instruction opcode) <=? 3) then ((project instruction argument) =? 0) else ((project instruction argument) true + | List.cons head tail => ((instructionWellFormed head modulus) && (instructionsWellFormed tail modulus))), + recursive_argument: instructions +} + +definition{ + name: programAllowed, + parameters: [program : Program, maximumSteps : Nat], + result: Bool, + body: ((supportedWidth (project program bits)) && ((Stitch.Identity::digestWellFormed (project program programRoot)) && ((Stitch.Identity::digestWellFormed (project program modelRoot)) && ((instructionsWellFormed (project program instructions) (ringModulus (project program bits))) && ((instructionCount (project program instructions)) <=? maximumSteps))))) +} + +definition{ + name: takeSteps, + parameters: [instructions : (List Instruction), count : Nat], + result: (List Instruction), + body: (match count + | Nat.zero => (nil Instruction) + | Nat.succ rest => (match instructions + | List.nil => (nil Instruction) + | List.cons head tail => (cons head (takeSteps tail rest)))), + recursive_argument: count +} + +definition{ + name: replayedValue, + parameters: [job : Job, checkpoint : Checkpoint], + result: Nat, + body: (execute (takeSteps (project (project job program) instructions) (project checkpoint step)) (project job initialValue) (ringModulus (project (project job program) bits))) +} + +definition{ + name: jobAllowed, + parameters: [job : Job, maximumSteps : Nat], + result: Bool, + body: ((programAllowed (project job program) maximumSteps) && ((Stitch.Identity::digestWellFormed (project job jobRoot)) && ((Stitch.Identity::digestWellFormed (project job inputRoot)) && ((project job initialValue) ((project checkpoint value) = (replayedValue job checkpoint))), + proof: linear_arithmetic{definitions: [checkpointMatchesJob]}, + axioms: [Quot.sound, propext] +} + +structure{ + name: ProgramDigestInput, + type_parameters: [], + parameters: [], + fields: [ + {name: version, type: Nat}, + {name: modelRoot, type: Stitch.Identity::Digest}, + {name: bits, type: Nat}, + {name: instructions, type: (List Instruction)} + ] +} + +structure{ + name: ProgramDigestObservation, + type_parameters: [], + parameters: [], + fields: [ + {name: input, type: ProgramDigestInput}, + {name: digest, type: Stitch.Identity::DigestObservation} + ] +} + +structure{ + name: InputDigestInput, + type_parameters: [], + parameters: [], + fields: [{name: version, type: Nat}, {name: bits, type: Nat}, {name: value, type: Nat}] +} + +structure{ + name: InputDigestObservation, + type_parameters: [], + parameters: [], + fields: [ + {name: input, type: InputDigestInput}, + {name: digest, type: Stitch.Identity::DigestObservation} + ] +} + +structure{ + name: JobDigestInput, + type_parameters: [], + parameters: [], + fields: [ + {name: version, type: Nat}, + {name: programRoot, type: Stitch.Identity::Digest}, + {name: inputRoot, type: Stitch.Identity::Digest}, + {name: modelRoot, type: Stitch.Identity::Digest}, + {name: initialValue, type: Nat} + ] +} + +structure{ + name: JobDigestObservation, + type_parameters: [], + parameters: [], + fields: [ + {name: input, type: JobDigestInput}, + {name: digest, type: Stitch.Identity::DigestObservation} + ] +} + +structure{ + name: StateDigestInput, + type_parameters: [], + parameters: [], + fields: [ + {name: version, type: Nat}, + {name: jobRoot, type: Stitch.Identity::Digest}, + {name: programRoot, type: Stitch.Identity::Digest}, + {name: inputRoot, type: Stitch.Identity::Digest}, + {name: modelRoot, type: Stitch.Identity::Digest}, + {name: bits, type: Nat}, + {name: step, type: Nat}, + {name: value, type: Nat} + ] +} + +structure{ + name: StateDigestObservation, + type_parameters: [], + parameters: [], + fields: [ + {name: input, type: StateDigestInput}, + {name: digest, type: Stitch.Identity::DigestObservation} + ] +} + +structure{ + name: CheckpointDigestInput, + type_parameters: [], + parameters: [], + fields: [ + {name: version, type: Nat}, + {name: jobRoot, type: Stitch.Identity::Digest}, + {name: programRoot, type: Stitch.Identity::Digest}, + {name: inputRoot, type: Stitch.Identity::Digest}, + {name: modelRoot, type: Stitch.Identity::Digest}, + {name: step, type: Nat}, + {name: priorRoot, type: Stitch.Identity::Digest}, + {name: stateRoot, type: Stitch.Identity::Digest}, + {name: value, type: Nat} + ] +} + +structure{ + name: CheckpointDigestObservation, + type_parameters: [], + parameters: [], + fields: [ + {name: input, type: CheckpointDigestInput}, + {name: digest, type: Stitch.Identity::DigestObservation} + ] +} + +structure{ + name: JobCommitments, + type_parameters: [], + parameters: [], + fields: [ + {name: program, type: ProgramDigestObservation}, + {name: input, type: InputDigestObservation}, + {name: job, type: JobDigestObservation} + ] +} + +structure{ + name: CheckpointCommitments, + type_parameters: [], + parameters: [], + fields: [ + {name: state, type: StateDigestObservation}, + {name: checkpoint, type: CheckpointDigestObservation} + ] +} + +definition{ + name: programCommitted, + parameters: [program : Program, observation : ProgramDigestObservation, maximumSteps : Nat], + result: Bool, + body: ((programAllowed program maximumSteps) && (((project (project observation input) version) =? 1) && ((Stitch.Identity::sameDigest (project (project observation input) modelRoot) (project program modelRoot)) && (((project (project observation input) bits) =? (project program bits)) && ((sameInstructions (project (project observation input) instructions) (project program instructions)) && ((Stitch.Identity::digestAccepted (project observation digest)) && (Stitch.Identity::sameDigest (project (project observation digest) expected) (project program programRoot)))))))) +} + +definition{ + name: inputCommitted, + parameters: [job : Job, observation : InputDigestObservation], + result: Bool, + body: (((project (project observation input) version) =? 1) && (((project (project observation input) bits) =? (project (project job program) bits)) && (((project (project observation input) value) =? (project job initialValue)) && ((Stitch.Identity::digestAccepted (project observation digest)) && (Stitch.Identity::sameDigest (project (project observation digest) expected) (project job inputRoot)))))) +} + +definition{ + name: jobCommitted, + parameters: [ + job : Job, + commitments : JobCommitments, + maximumSteps : Nat, + expectedModelRoot : Stitch.Identity::Digest + ], + result: Bool, + body: ((Stitch.Identity::digestWellFormed expectedModelRoot) && ((Stitch.Identity::sameDigest (project (project job program) modelRoot) expectedModelRoot) && ((jobAllowed job maximumSteps) && ((programCommitted (project job program) (project commitments program) maximumSteps) && ((inputCommitted job (project commitments input)) && (((project (project (project commitments job) input) version) =? 1) && ((Stitch.Identity::sameDigest (project (project (project commitments job) input) programRoot) (project (project job program) programRoot)) && ((Stitch.Identity::sameDigest (project (project (project commitments job) input) inputRoot) (project job inputRoot)) && ((Stitch.Identity::sameDigest (project (project (project commitments job) input) modelRoot) (project (project job program) modelRoot)) && (((project (project (project commitments job) input) initialValue) =? (project job initialValue)) && ((Stitch.Identity::digestAccepted (project (project commitments job) digest)) && (Stitch.Identity::sameDigest (project (project (project commitments job) digest) expected) (project job jobRoot))))))))))))) +} + +definition{ + name: stateCommitted, + parameters: [job : Job, checkpoint : Checkpoint, observation : StateDigestObservation], + result: Bool, + body: (((project (project observation input) version) =? 1) && ((Stitch.Identity::sameDigest (project (project observation input) jobRoot) (project checkpoint jobRoot)) && ((Stitch.Identity::sameDigest (project (project observation input) programRoot) (project checkpoint programRoot)) && ((Stitch.Identity::sameDigest (project (project observation input) inputRoot) (project checkpoint inputRoot)) && ((Stitch.Identity::sameDigest (project (project observation input) modelRoot) (project checkpoint modelRoot)) && (((project (project observation input) bits) =? (project (project job program) bits)) && (((project (project observation input) step) =? (project checkpoint step)) && (((project (project observation input) value) =? (project checkpoint value)) && ((Stitch.Identity::digestAccepted (project observation digest)) && (Stitch.Identity::sameDigest (project (project observation digest) expected) (project checkpoint stateRoot))))))))))) +} + +definition{ + name: checkpointCommitted, + parameters: [checkpoint : Checkpoint, observation : CheckpointDigestObservation], + result: Bool, + body: (((project (project observation input) version) =? 1) && ((Stitch.Identity::sameDigest (project (project observation input) jobRoot) (project checkpoint jobRoot)) && ((Stitch.Identity::sameDigest (project (project observation input) programRoot) (project checkpoint programRoot)) && ((Stitch.Identity::sameDigest (project (project observation input) inputRoot) (project checkpoint inputRoot)) && ((Stitch.Identity::sameDigest (project (project observation input) modelRoot) (project checkpoint modelRoot)) && ((Stitch.Identity::sameDigest (project (project observation input) priorRoot) (project checkpoint priorRoot)) && ((Stitch.Identity::sameDigest (project (project observation input) stateRoot) (project checkpoint stateRoot)) && (((project (project observation input) step) =? (project checkpoint step)) && (((project (project observation input) value) =? (project checkpoint value)) && ((Stitch.Identity::digestAccepted (project observation digest)) && (Stitch.Identity::sameDigest (project (project observation digest) expected) (project checkpoint checkpointRoot)))))))))))) +} + +definition{ + name: committedCheckpointAllowed, + parameters: [ + job : Job, + checkpoint : Checkpoint, + jobCommitments : JobCommitments, + checkpointCommitments : CheckpointCommitments, + maximumSteps : Nat, + expectedModelRoot : Stitch.Identity::Digest + ], + result: Bool, + body: ((jobCommitted job jobCommitments maximumSteps expectedModelRoot) && ((checkpointMatchesJob job checkpoint) && ((stateCommitted job checkpoint (project checkpointCommitments state)) && (checkpointCommitted checkpoint (project checkpointCommitments checkpoint))))) +} + +definition{ + name: committedCheckpointSuccessor, + parameters: [ + job : Job, + current : Checkpoint, + candidate : Checkpoint, + jobCommitments : JobCommitments, + currentCommitments : CheckpointCommitments, + candidateCommitments : CheckpointCommitments, + maximumSteps : Nat, + expectedModelRoot : Stitch.Identity::Digest + ], + result: Bool, + body: ((committedCheckpointAllowed job current jobCommitments currentCommitments maximumSteps expectedModelRoot) && ((committedCheckpointAllowed job candidate jobCommitments candidateCommitments maximumSteps expectedModelRoot) && (checkpointSuccessor job current candidate))) +} + +definition{ + name: advanceCheckpoint, + parameters: [ + job : Job, + current : Checkpoint, + candidate : Checkpoint, + jobCommitments : JobCommitments, + currentCommitments : CheckpointCommitments, + candidateCommitments : CheckpointCommitments, + maximumSteps : Nat, + expectedModelRoot : Stitch.Identity::Digest + ], + result: Checkpoint, + body: (if (committedCheckpointSuccessor job current candidate jobCommitments currentCommitments candidateCommitments maximumSteps expectedModelRoot) then candidate else current) +} + +theorem{ + name: committedCheckpointReplays, + parameters: [ + job : Job, + checkpoint : Checkpoint, + jobCommitments : JobCommitments, + checkpointCommitments : CheckpointCommitments, + maximumSteps : Nat, + expectedModelRoot : Stitch.Identity::Digest + ], + statement: (((committedCheckpointAllowed job checkpoint jobCommitments checkpointCommitments maximumSteps expectedModelRoot) = true) -> ((project checkpoint value) = (replayedValue job checkpoint))), + proof: linear_arithmetic{definitions: [checkpointMatchesJob, committedCheckpointAllowed]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: mismatchedStateValueRejected, + parameters: [job : Job, checkpoint : Checkpoint, observation : StateDigestObservation], + statement: (((project (project observation input) value) < (project checkpoint value)) -> ((stateCommitted job checkpoint observation) = false)), + proof: linear_arithmetic{definitions: [stateCommitted]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: unsupportedWidthCannotCommit, + parameters: [program : Program, observation : ProgramDigestObservation, maximumSteps : Nat], + statement: (((project program bits) = 24) -> ((programCommitted program observation maximumSteps) = false)), + proof: linear_arithmetic{definitions: [programAllowed, programCommitted, supportedWidth]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: checkpointTransitionNeverRollsBack, + parameters: [ + job : Job, + current : Checkpoint, + candidate : Checkpoint, + jobCommitments : JobCommitments, + currentCommitments : CheckpointCommitments, + candidateCommitments : CheckpointCommitments, + maximumSteps : Nat, + expectedModelRoot : Stitch.Identity::Digest + ], + statement: ((project current step) <= (project (advanceCheckpoint job current candidate jobCommitments currentCommitments candidateCommitments maximumSteps expectedModelRoot) step)), + proof: linear_arithmetic{ + definitions: [advanceCheckpoint, checkpointSuccessor, committedCheckpointSuccessor] + }, + axioms: [Quot.sound, propext] +} + +structure{ + name: Word, + type_parameters: [], + parameters: [], + fields: [{name: bits, type: Nat}, {name: value, type: Nat}] +} + +structure{ + name: TypedInstruction, + type_parameters: [], + parameters: [], + fields: [{name: opcode, type: Nat}, {name: argument, type: Nat}, {name: argumentBits, type: Nat}] +} + +definition{ + name: byteWidth, + parameters: [bits : Nat], + result: Bool, + body: ((prim remainder bits 8 0 : Nat) =? 0) +} + +definition{ + name: wordAllowed, + parameters: [word : Word], + result: Bool, + body: ((byteWidth (project word bits)) && ((project word value) ((byteWidth bits) && (bits <=? capacityBits)) + | List.cons head tail => ((typedInstructionAllowed head bits capacityBits) && (typedProgramAllowed tail (typedResultBits head bits) capacityBits))), + recursive_argument: instructions +} + +definition{ + name: concatWords, + parameters: [left : Word, right : Word], + result: Word, + body: (record Word {bits := ((project left bits) + (project right bits)), value := ((prim multiply (project left value) (ringModulus (project right bits)) : Nat) + (project right value))}) +} + +definition{ + name: typedStep, + parameters: [instruction : TypedInstruction, word : Word], + result: Word, + body: (if ((project instruction opcode) =? 14) then (concatWords word (record Word {bits := (project instruction argumentBits), value := (project instruction argument)})) else (record Word {bits := (typedResultBits instruction (project word bits)), value := (ringStep (record Instruction {opcode := (project instruction opcode), argument := (project instruction argument)}) (project word value) (ringModulus (arithmeticWidth (project word bits) (project instruction argumentBits))))})) +} + +definition{ + name: typedInstructionWork, + parameters: [instruction : TypedInstruction, bits : Nat], + result: Nat, + body: (let width : Nat := (arithmeticWidth bits (project instruction argumentBits)); (let limbs : Nat := (prim quotient (width + 63) 64 0 : Nat); (let productWork : Nat := (prim multiply limbs limbs : Nat); (if ((project instruction opcode) =? 14) then (1 + (prim quotient (bits + (project instruction argumentBits)) 8 0 : Nat)) else (if ((project instruction opcode) =? 17) then (1 + (prim multiply productWork (powerWork width (project instruction argument)) : Nat)) else (if (((project instruction opcode) =? 6) || ((15 <=? (project instruction opcode)) && ((project instruction opcode) <=? 16))) then (1 + productWork) else (if ((7 <=? (project instruction opcode)) && ((project instruction opcode) <=? 9)) then (1 + width) else (1 + limbs)))))))) +} + +definition{ + name: typedProgramWorkAcc, + parameters: [instructions : (List TypedInstruction), bits : Nat, accumulated : Nat], + result: Nat, + body: (match instructions + | List.nil => accumulated + | List.cons head tail => (typedProgramWorkAcc tail (typedResultBits head bits) (accumulated + (typedInstructionWork head bits)))), + recursive_argument: instructions +} + +definition{ + name: typedProgramWork, + parameters: [instructions : (List TypedInstruction), bits : Nat], + result: Nat, + body: (typedProgramWorkAcc instructions bits 0) +} + +definition{ + name: typedExecute, + parameters: [instructions : (List TypedInstruction), word : Word], + result: Word, + body: (match instructions + | List.nil => word + | List.cons head tail => (typedExecute tail (typedStep head word))), + recursive_argument: instructions +} + +definition{ + name: appendTypedProgram, + parameters: [prefix : (List TypedInstruction), suffix : (List TypedInstruction)], + result: (List TypedInstruction), + body: (match prefix + | List.nil => suffix + | List.cons head tail => (cons head (appendTypedProgram tail suffix))), + recursive_argument: prefix +} + +theorem{ + name: concatPreservesDeclaredWidth, + parameters: [left : Word, right : Word], + statement: ((project (concatWords left right) bits) = ((project left bits) + (project right bits))), + proof: reflexivity{} +} + +theorem{ + name: concatIsBigEndianAppend, + parameters: [left : Word, right : Word], + statement: ((project (concatWords left right) value) = ((prim multiply (project left value) (ringModulus (project right bits)) : Nat) + (project right value))), + proof: reflexivity{} +} + +theorem{ + name: typedResumeEqualsUninterrupted, + parameters: [prefix : (List TypedInstruction), suffix : (List TypedInstruction), word : Word], + statement: ((typedExecute (appendTypedProgram prefix suffix) word) = (typedExecute suffix (typedExecute prefix word))), + proof: induction{ + branches: [ + { + proof: simplify{definitions: [appendTypedProgram, typedExecute]}, + binders: [], + constructor: nil + }, + { + proof: simplify{definitions: [appendTypedProgram, hypothesis, typedExecute]}, + binders: [head, tail, hypothesis], + constructor: cons + } + ], + generalizing: [word], + scrutinee: prefix + }, + axioms: [propext] +} + +theorem{ + name: concatCapacityCannotTruncate, + parameters: [argument : Nat, argumentBits : Nat, bits : Nat, capacityBits : Nat], + statement: ((capacityBits < (bits + argumentBits)) -> ((typedInstructionAllowed (record TypedInstruction {opcode := 14, argument := argument, argumentBits := argumentBits}) bits capacityBits) = false)), + proof: linear_arithmetic{ + definitions: [typedInstructionAdmission, typedInstructionAllowed, typedResultBits] + }, + axioms: [Quot.sound, propext] +} + +theorem{ + name: typedAdmissionBoundsDeclaredWidth, + parameters: [instruction : TypedInstruction, bits : Nat, capacityBits : Nat, resultBits : Nat], + statement: (((typedInstructionAdmission instruction bits capacityBits resultBits) = true) -> (resultBits <= capacityBits)), + proof: linear_arithmetic{definitions: [typedInstructionAdmission]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: typedAdmissionBoundsResultWidth, + parameters: [instruction : TypedInstruction, bits : Nat, capacityBits : Nat], + statement: (((typedInstructionAllowed instruction bits capacityBits) = true) -> ((typedResultBits instruction bits) <= capacityBits)), + proof: apply{ + arguments: [instruction, bits, capacityBits, (typedResultBits instruction bits)], + theorem: typedAdmissionBoundsDeclaredWidth + }, + axioms: [Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Custody.lex.tex b/app/src/Stitch/Custody.lex.tex new file mode 100644 index 0000000..ff2ce46 --- /dev/null +++ b/app/src/Stitch/Custody.lex.tex @@ -0,0 +1,986 @@ +\begin{lexlean}{Stitch.Custody} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Stitch.Identity} +\importmodule{Stitch.Fragments} +\title{Stitch recoverable service model} +\begin{semanticmodule} +inductive{ + name: TransferPhase, + type_parameters: [], + parameters: [], + constructors: [ + {name: Requested, fields: []}, + {name: Acknowledged, fields: []}, + {name: Committed, fields: []}, + {name: Failed, fields: []}, + {name: Uncertain, fields: []} + ] +} + +structure{ + name: Receipt, + type_parameters: [], + parameters: [], + fields: [ + {name: requestRoot, type: Stitch.Identity::Digest}, + {name: manifestRoot, type: Stitch.Identity::Digest}, + {name: fragmentRoot, type: Stitch.Identity::Digest}, + {name: holderId, type: Nat}, + {name: index, type: Nat}, + {name: observedAt, type: Nat}, + {name: leaseUntil, type: Nat}, + {name: identityAuthenticated, type: Bool} + ] +} + +structure{ + name: Transfer, + type_parameters: [], + parameters: [], + fields: [ + {name: requestRoot, type: Stitch.Identity::Digest}, + {name: manifestRoot, type: Stitch.Identity::Digest}, + {name: fragmentRoot, type: Stitch.Identity::Digest}, + {name: sourceHolder, type: Nat}, + {name: targetHolder, type: Nat}, + {name: index, type: Nat}, + {name: placementRevision, type: Nat}, + {name: phase, type: TransferPhase}, + {name: receipt, type: Receipt} + ] +} + +structure{ + name: Placement, + type_parameters: [], + parameters: [], + fields: [ + {name: manifestRoot, type: Stitch.Identity::Digest}, + {name: revision, type: Nat}, + {name: holder0, type: Nat}, + {name: holder1, type: Nat}, + {name: holder2, type: Nat}, + {name: active0, type: Bool}, + {name: active1, type: Bool}, + {name: active2, type: Bool}, + {name: receipt0, type: Receipt}, + {name: receipt1, type: Receipt}, + {name: receipt2, type: Receipt} + ] +} + +definition{ + name: distinctHolders, + parameters: [a : Nat, b : Nat, c : Nat], + result: Bool, + body: ((not (a =? b)) && ((not (a =? c)) && (not (b =? c)))) +} + +definition{ + name: activeCount, + parameters: [placement : Placement], + result: Nat, + body: ((if (project placement active0) then 1 else 0) + ((if (project placement active1) then 1 else 0) + (if (project placement active2) then 1 else 0))) +} + +definition{ + name: activeThreshold, + parameters: [a : Bool, b : Bool, c : Bool], + result: Bool, + body: (2 <=? ((if a then 1 else 0) + ((if b then 1 else 0) + (if c then 1 else 0)))) +} + +definition{ + name: recoverable, + parameters: [placement : Placement], + result: Bool, + body: ((distinctHolders (project placement holder0) (project placement holder1) (project placement holder2)) && (activeThreshold (project placement active0) (project placement active1) (project placement active2))) +} + +definition{ + name: receiptLive, + parameters: [ + manifestRoot : Stitch.Identity::Digest, + index : Nat, + holder : Nat, + receipt : Receipt, + now : Nat + ], + result: Bool, + body: ((index (record Transfer {requestRoot := (project transfer requestRoot), manifestRoot := (project transfer manifestRoot), fragmentRoot := (project transfer fragmentRoot), sourceHolder := (project transfer sourceHolder), targetHolder := (project transfer targetHolder), index := (project transfer index), placementRevision := (project transfer placementRevision), phase := (if uncertain then (ctor TransferPhase.Uncertain) else (ctor TransferPhase.Failed)), receipt := (project transfer receipt)}) + | TransferPhase.Acknowledged => (record Transfer {requestRoot := (project transfer requestRoot), manifestRoot := (project transfer manifestRoot), fragmentRoot := (project transfer fragmentRoot), sourceHolder := (project transfer sourceHolder), targetHolder := (project transfer targetHolder), index := (project transfer index), placementRevision := (project transfer placementRevision), phase := (if uncertain then (ctor TransferPhase.Uncertain) else (ctor TransferPhase.Failed)), receipt := (project transfer receipt)}) + | TransferPhase.Committed => transfer + | TransferPhase.Failed => transfer + | TransferPhase.Uncertain => transfer) +} + +theorem{ + name: unacknowledgedCannotCommit, + parameters: [ + requested : Bool, + manifestMatches : Bool, + fragmentMatches : Bool, + holderMatches : Bool, + leaseLive : Bool, + sourceCurrent : Bool, + targetDistinct : Bool + ], + statement: ((commitAllowed requested false manifestMatches fragmentMatches holderMatches leaseLive sourceCurrent targetDistinct) = false), + proof: reflexivity{} +} + +theorem{ + name: uncommittedCannotRetire, + parameters: [remainingDistinctIndices : Nat, threshold : Nat], + statement: ((retireAllowed false remainingDistinctIndices threshold) = false), + proof: reflexivity{} +} + +theorem{ + name: retirementPreservesThreshold, + parameters: [targetCommitted : Bool, remainingDistinctIndices : Nat, threshold : Nat], + statement: (((retireAllowed targetCommitted remainingDistinctIndices threshold) = true) -> (threshold <= remainingDistinctIndices)), + proof: linear_arithmetic{definitions: [retireAllowed]}, + axioms: [Quot.sound, propext] +} + +definition{ + name: replaceFirst, + parameters: [placement : Placement, target : Nat, committed : Bool], + result: Placement, + body: (record Placement {manifestRoot := (project placement manifestRoot), revision := (if (committed && ((not (target =? (project placement holder1))) && (not (target =? (project placement holder2))))) then ((project placement revision) + 1) else (project placement revision)), holder0 := (if (committed && ((not (target =? (project placement holder1))) && (not (target =? (project placement holder2))))) then target else (project placement holder0)), holder1 := (project placement holder1), holder2 := (project placement holder2), active0 := ((committed && ((not (target =? (project placement holder1))) && (not (target =? (project placement holder2))))) || (project placement active0)), active1 := (project placement active1), active2 := (project placement active2), receipt0 := (project placement receipt0), receipt1 := (project placement receipt1), receipt2 := (project placement receipt2)}) +} + +definition{ + name: retireFirst, + parameters: [placement : Placement], + result: Placement, + body: (record Placement {manifestRoot := (project placement manifestRoot), revision := (if ((project placement active1) && (project placement active2)) then ((project placement revision) + 1) else (project placement revision)), holder0 := (project placement holder0), holder1 := (project placement holder1), holder2 := (project placement holder2), active0 := ((project placement active0) && (not ((project placement active1) && (project placement active2)))), active1 := (project placement active1), active2 := (project placement active2), receipt0 := (project placement receipt0), receipt1 := (project placement receipt1), receipt2 := (project placement receipt2)}) +} + +theorem{ + name: conjunctionPreservationFact, + parameters: [], + statement: (forall (p : Bool), (forall (q : Bool), (forall (r : Bool), (forall (s : Bool), (((p = true) -> (r = true)) -> (((q = true) -> (s = true)) -> ((((p && q) = true) -> ((r && s) = true)) <-> (0 = 0)))))))), + proof: decide{} +} + +theorem{ + name: booleanSelfPreservationFact, + parameters: [], + statement: (forall (p : Bool), (((p = true) -> (p = true)) <-> (0 = 0))), + proof: decide{} +} + +theorem{ + name: activeFirstPreservationFact, + parameters: [], + statement: (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), (forall (g : Bool), ((((activeThreshold a b c) = true) -> ((activeThreshold (g || a) b c) = true)) <-> (0 = 0)))))), + proof: decide{} +} + +theorem{ + name: activeRetirementPreservationFact, + parameters: [], + statement: (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), ((((activeThreshold a b c) = true) -> ((activeThreshold (a && (not (b && c))) b c) = true)) <-> (0 = 0))))), + proof: decide{} +} + +theorem{ + name: activeIndexedPreservationFact, + parameters: [], + statement: (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), (forall (g0 : Bool), (forall (g1 : Bool), (forall (g2 : Bool), ((((activeThreshold a b c) = true) -> ((activeThreshold (g0 || a) (g1 || b) (g2 || c)) = true)) <-> (0 = 0)))))))), + proof: decide{} +} + +theorem{ + name: distinctFirstPreservationFact, + parameters: [h0 : Nat, h1 : Nat, h2 : Nat, target : Nat, committed : Bool], + statement: ((((distinctHolders h0 h1 h2) = true) -> ((distinctHolders (if (committed && ((not (target =? h1)) && (not (target =? h2)))) then target else h0) h1 h2) = true)) <-> (0 = 0)), + proof: constructor{ + branches: [ + linear_arithmetic{definitions: [distinctHolders]}, + linear_arithmetic{definitions: [distinctHolders]} + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: committedMigrationPreservesRecovery, + parameters: [placement : Placement, target : Nat, committed : Bool], + statement: (((recoverable placement) = true) -> ((recoverable (replaceFirst placement target committed)) = true)), + proof: simplify{ + definitions: [ + activeFirstPreservationFact, + conjunctionPreservationFact, + distinctFirstPreservationFact, + recoverable, + replaceFirst + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: committedMigrationPreservesRecoveryFact, + parameters: [placement : Placement, target : Nat, committed : Bool], + statement: ((((recoverable placement) = true) -> ((recoverable (replaceFirst placement target committed)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + activeFirstPreservationFact, + conjunctionPreservationFact, + distinctFirstPreservationFact, + recoverable, + replaceFirst + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: retirementPreservesRecovery, + parameters: [placement : Placement], + statement: (((recoverable placement) = true) -> ((recoverable (retireFirst placement)) = true)), + proof: simplify{ + definitions: [ + activeRetirementPreservationFact, + booleanSelfPreservationFact, + conjunctionPreservationFact, + recoverable, + retireFirst + ] + }, + axioms: [propext] +} + +theorem{ + name: retirementPreservesRecoveryFact, + parameters: [placement : Placement], + statement: ((((recoverable placement) = true) -> ((recoverable (retireFirst placement)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + activeRetirementPreservationFact, + booleanSelfPreservationFact, + conjunctionPreservationFact, + recoverable, + retireFirst + ] + }, + axioms: [propext] +} + +definition{ + name: replaceIndex, + parameters: [placement : Placement, index : Nat, target : Nat, committed : Bool], + result: Placement, + body: (record Placement {manifestRoot := (project placement manifestRoot), revision := (if (((index =? 0) && (committed && ((not (target =? (project placement holder1))) && (not (target =? (project placement holder2)))))) || (((index =? 1) && (committed && ((not (target =? (project placement holder0))) && (not (target =? (project placement holder2)))))) || ((index =? 2) && (committed && ((not (target =? (project placement holder0))) && (not (target =? (project placement holder1)))))))) then ((project placement revision) + 1) else (project placement revision)), holder0 := (if ((index =? 0) && (committed && ((not (target =? (project placement holder1))) && (not (target =? (project placement holder2)))))) then target else (project placement holder0)), holder1 := (if ((index =? 1) && (committed && ((not (target =? (project placement holder0))) && (not (target =? (project placement holder2)))))) then target else (project placement holder1)), holder2 := (if ((index =? 2) && (committed && ((not (target =? (project placement holder0))) && (not (target =? (project placement holder1)))))) then target else (project placement holder2)), active0 := (((index =? 0) && (committed && ((not (target =? (project placement holder1))) && (not (target =? (project placement holder2)))))) || (project placement active0)), active1 := (((index =? 1) && (committed && ((not (target =? (project placement holder0))) && (not (target =? (project placement holder2)))))) || (project placement active1)), active2 := (((index =? 2) && (committed && ((not (target =? (project placement holder0))) && (not (target =? (project placement holder1)))))) || (project placement active2)), receipt0 := (project placement receipt0), receipt1 := (project placement receipt1), receipt2 := (project placement receipt2)}) +} + +theorem{ + name: distinctIndexedPreservationFact, + parameters: [h0 : Nat, h1 : Nat, h2 : Nat, index : Nat, target : Nat, committed : Bool], + statement: ((((distinctHolders h0 h1 h2) = true) -> ((distinctHolders (if ((index =? 0) && (committed && ((not (target =? h1)) && (not (target =? h2))))) then target else h0) (if ((index =? 1) && (committed && ((not (target =? h0)) && (not (target =? h2))))) then target else h1) (if ((index =? 2) && (committed && ((not (target =? h0)) && (not (target =? h1))))) then target else h2)) = true)) <-> (0 = 0)), + proof: constructor{ + branches: [ + linear_arithmetic{definitions: [distinctHolders]}, + linear_arithmetic{definitions: [distinctHolders]} + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: indexedMigrationPreservesRecovery, + parameters: [placement : Placement, index : Nat, target : Nat, committed : Bool], + statement: (((recoverable placement) = true) -> ((recoverable (replaceIndex placement index target committed)) = true)), + proof: simplify{ + definitions: [ + activeIndexedPreservationFact, + conjunctionPreservationFact, + distinctIndexedPreservationFact, + recoverable, + replaceIndex + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: indexedMigrationPreservesRecoveryFact, + parameters: [placement : Placement, index : Nat, target : Nat, committed : Bool], + statement: ((((recoverable placement) = true) -> ((recoverable (replaceIndex placement index target committed)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + activeIndexedPreservationFact, + conjunctionPreservationFact, + distinctIndexedPreservationFact, + recoverable, + replaceIndex + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +definition{ + name: acknowledgeTransfer, + parameters: [transfer : Transfer, receipt : Receipt, now : Nat], + result: Transfer, + body: (match (project transfer phase) + | TransferPhase.Requested => (if (receiptBound transfer receipt now) then (record Transfer {requestRoot := (project transfer requestRoot), manifestRoot := (project transfer manifestRoot), fragmentRoot := (project transfer fragmentRoot), sourceHolder := (project transfer sourceHolder), targetHolder := (project transfer targetHolder), index := (project transfer index), placementRevision := (project transfer placementRevision), phase := (ctor TransferPhase.Acknowledged), receipt := receipt}) else transfer) + | TransferPhase.Acknowledged => transfer + | TransferPhase.Committed => transfer + | TransferPhase.Failed => transfer + | TransferPhase.Uncertain => transfer) +} + +definition{ + name: commitTransfer, + parameters: [ + transfer : Transfer, + now : Nat, + fragmentVerified : Bool, + sourceCurrent : Bool, + targetDistinct : Bool + ], + result: Transfer, + body: (match (project transfer phase) + | TransferPhase.Requested => transfer + | TransferPhase.Acknowledged => (if ((receiptBound transfer (project transfer receipt) now) && (fragmentVerified && (sourceCurrent && targetDistinct))) then (record Transfer {requestRoot := (project transfer requestRoot), manifestRoot := (project transfer manifestRoot), fragmentRoot := (project transfer fragmentRoot), sourceHolder := (project transfer sourceHolder), targetHolder := (project transfer targetHolder), index := (project transfer index), placementRevision := (project transfer placementRevision), phase := (ctor TransferPhase.Committed), receipt := (project transfer receipt)}) else transfer) + | TransferPhase.Committed => transfer + | TransferPhase.Failed => transfer + | TransferPhase.Uncertain => transfer) +} + +structure{ + name: PhysicalCopy, + type_parameters: [], + parameters: [], + fields: [ + {name: index, type: Nat}, + {name: holder, type: Nat}, + {name: byteLength, type: Nat}, + {name: retained, type: Bool}, + {name: superseded, type: Bool}, + {name: externalRelay, type: Bool}, + {name: manifestRoot, type: Stitch.Identity::Digest}, + {name: fragmentRoot, type: Stitch.Identity::Digest}, + {name: receipt, type: Receipt} + ] +} + +definition{ + name: physicalCopyLive, + parameters: [copy : PhysicalCopy, now : Nat], + result: Bool, + body: ((project copy retained) && ((not (project copy superseded)) && ((Stitch.Identity::sameDigest (project copy fragmentRoot) (project (project copy receipt) fragmentRoot)) && (receiptLive (project copy manifestRoot) (project copy index) (project copy holder) (project copy receipt) now)))) +} + +definition{ + name: physicalBytes, + parameters: [copies : (List PhysicalCopy)], + result: Nat, + body: (match copies + | List.nil => 0 + | List.cons head tail => ((if (project head retained) then (project head byteLength) else 0) + (physicalBytes tail))), + recursive_argument: copies +} + +definition{ + name: requestedPhase, + parameters: [transfer : Transfer], + result: Bool, + body: (match (project transfer phase) + | TransferPhase.Requested => true + | TransferPhase.Acknowledged => false + | TransferPhase.Committed => false + | TransferPhase.Failed => false + | TransferPhase.Uncertain => false) +} + +definition{ + name: committedPhase, + parameters: [transfer : Transfer], + result: Bool, + body: (match (project transfer phase) + | TransferPhase.Requested => false + | TransferPhase.Acknowledged => false + | TransferPhase.Committed => true + | TransferPhase.Failed => false + | TransferPhase.Uncertain => false) +} + +definition{ + name: sameRequest, + parameters: [left : Transfer, right : Transfer], + result: Bool, + body: ((Stitch.Identity::sameDigest (project left requestRoot) (project right requestRoot)) && ((Stitch.Identity::sameDigest (project left manifestRoot) (project right manifestRoot)) && ((Stitch.Identity::sameDigest (project left fragmentRoot) (project right fragmentRoot)) && (((project left sourceHolder) =? (project right sourceHolder)) && (((project left targetHolder) =? (project right targetHolder)) && (((project left index) =? (project right index)) && ((project left placementRevision) =? (project right placementRevision)))))))) +} + +definition{ + name: requestWellFormed, + parameters: [transfer : Transfer], + result: Bool, + body: ((Stitch.Identity::digestWellFormed (project transfer requestRoot)) && ((Stitch.Identity::digestWellFormed (project transfer manifestRoot)) && ((Stitch.Identity::digestWellFormed (project transfer fragmentRoot)) && ((project transfer index) true + | List.cons head tail => ((not (Stitch.Identity::sameDigest (project head requestRoot) requestRoot)) && (requestUnused tail requestRoot))), + recursive_argument: transfers +} + +definition{ + name: requestRecorded, + parameters: [transfers : (List Transfer), transfer : Transfer], + result: Bool, + body: (match transfers + | List.nil => false + | List.cons head tail => (((sameRequest head transfer) && (requestedPhase head)) || (requestRecorded tail transfer))), + recursive_argument: transfers +} + +definition{ + name: recordCompletion, + parameters: [transfers : (List Transfer), completed : Transfer], + result: (List Transfer), + body: (match transfers + | List.nil => (nil Transfer) + | List.cons head tail => (cons (if (Stitch.Identity::sameDigest (project head requestRoot) (project completed requestRoot)) then completed else head) (recordCompletion tail completed))), + recursive_argument: transfers +} + +definition{ + name: sourcePlaced, + parameters: [placement : Placement, transfer : Transfer], + result: Bool, + body: ((Stitch.Identity::sameDigest (project placement manifestRoot) (project transfer manifestRoot)) && (((project placement revision) =? (project transfer placementRevision)) && (if ((project transfer index) =? 0) then ((project placement active0) && (((project transfer sourceHolder) =? (project placement holder0)) && ((not ((project transfer targetHolder) =? (project placement holder0))) && ((not ((project transfer targetHolder) =? (project placement holder1))) && (not ((project transfer targetHolder) =? (project placement holder2))))))) else (if ((project transfer index) =? 1) then ((project placement active1) && (((project transfer sourceHolder) =? (project placement holder1)) && ((not ((project transfer targetHolder) =? (project placement holder0))) && ((not ((project transfer targetHolder) =? (project placement holder1))) && (not ((project transfer targetHolder) =? (project placement holder2))))))) else (if ((project transfer index) =? 2) then ((project placement active2) && (((project transfer sourceHolder) =? (project placement holder2)) && ((not ((project transfer targetHolder) =? (project placement holder0))) && ((not ((project transfer targetHolder) =? (project placement holder1))) && (not ((project transfer targetHolder) =? (project placement holder2))))))) else false))))) +} + +definition{ + name: sourceLive, + parameters: [placement : Placement, transfer : Transfer, now : Nat], + result: Bool, + body: ((sourcePlaced placement transfer) && (if ((project transfer index) =? 0) then ((Stitch.Identity::sameDigest (project transfer fragmentRoot) (project (project placement receipt0) fragmentRoot)) && (receiptLive (project placement manifestRoot) 0 (project placement holder0) (project placement receipt0) now)) else (if ((project transfer index) =? 1) then ((Stitch.Identity::sameDigest (project transfer fragmentRoot) (project (project placement receipt1) fragmentRoot)) && (receiptLive (project placement manifestRoot) 1 (project placement holder1) (project placement receipt1) now)) else (if ((project transfer index) =? 2) then ((Stitch.Identity::sameDigest (project transfer fragmentRoot) (project (project placement receipt2) fragmentRoot)) && (receiptLive (project placement manifestRoot) 2 (project placement holder2) (project placement receipt2) now)) else false)))) +} + +definition{ + name: fragmentBound, + parameters: [transfer : Transfer, fragment : Stitch.Fragments::Fragment], + result: Bool, + body: ((Stitch.Identity::sameDigest (project transfer manifestRoot) (project fragment manifestRoot)) && ((Stitch.Identity::sameDigest (project transfer fragmentRoot) (project fragment payloadRoot)) && ((project transfer index) =? (project fragment index)))) +} + +structure{ + name: FragmentIntegrityObservation, + type_parameters: [], + parameters: [], + fields: [ + {name: fragmentRoot, type: Stitch.Identity::Digest}, + {name: encodingRoot, type: Stitch.Identity::Digest}, + {name: index, type: Nat}, + {name: payload, type: Bytes}, + {name: digest, type: Stitch.Identity::DigestObservation} + ] +} + +definition{ + name: fragmentIntegrityAccepted, + parameters: [ + transfer : Transfer, + fragment : Stitch.Fragments::Fragment, + observation : FragmentIntegrityObservation + ], + result: Bool, + body: ((fragmentBound transfer fragment) && ((Stitch.Identity::digestAccepted (project observation digest)) && ((Stitch.Identity::sameDigest (project transfer fragmentRoot) (project observation fragmentRoot)) && ((Stitch.Identity::sameDigest (project observation fragmentRoot) (project (project observation digest) expected)) && ((Stitch.Identity::sameDigest (project fragment encodingRoot) (project observation encodingRoot)) && (((project fragment index) =? (project observation index)) && (prim equal (project fragment payload) (project observation payload) : Bool))))))) +} + +definition{ + name: prepareCompletion, + parameters: [ + placement : Placement, + transfer : Transfer, + receipt : Receipt, + fragment : Stitch.Fragments::Fragment, + integrity : FragmentIntegrityObservation, + now : Nat + ], + result: Transfer, + body: (commitTransfer (acknowledgeTransfer transfer receipt now) now (fragmentIntegrityAccepted transfer fragment integrity) (sourceLive placement transfer now) (not ((project transfer sourceHolder) =? (project transfer targetHolder)))) +} + +theorem{ + name: indexedCopyLiveZero, + parameters: [placement : Placement, now : Nat], + statement: ((indexedCopyLive placement 0 now) = ((project placement active0) && (receiptLive (project placement manifestRoot) 0 (project placement holder0) (project placement receipt0) now))), + proof: reflexivity{} +} + +theorem{ + name: indexedCopyLiveOne, + parameters: [placement : Placement, now : Nat], + statement: ((indexedCopyLive placement 1 now) = ((project placement active1) && (receiptLive (project placement manifestRoot) 1 (project placement holder1) (project placement receipt1) now))), + proof: reflexivity{} +} + +theorem{ + name: indexedCopyLiveTwo, + parameters: [placement : Placement, now : Nat], + statement: ((indexedCopyLive placement 2 now) = ((project placement active2) && (receiptLive (project placement manifestRoot) 2 (project placement holder2) (project placement receipt2) now))), + proof: reflexivity{} +} + +definition{ + name: choosePlacement, + parameters: [selection : Stitch.Fragments::Bit, yes : Placement, no : Placement], + result: Placement, + body: (match selection | Stitch.Fragments::Bit.Zero => no | Stitch.Fragments::Bit.One => yes) +} + +definition{ + name: chooseTruth, + parameters: [selection : Stitch.Fragments::Bit, yes : Bool, no : Bool], + result: Bool, + body: (match selection | Stitch.Fragments::Bit.Zero => no | Stitch.Fragments::Bit.One => yes) +} + +definition{ + name: selectionOfTruth, + parameters: [value : Bool], + result: Stitch.Fragments::Bit, + body: (if value then (ctor Stitch.Fragments::Bit.One) else (ctor Stitch.Fragments::Bit.Zero)) +} + +definition{ + name: selectPlacement, + parameters: [guard : Bool, yes : Placement, no : Placement], + result: Placement, + body: (choosePlacement (selectionOfTruth guard) yes no) +} + +definition{ + name: selectTruth, + parameters: [guard : Bool, yes : Bool, no : Bool], + result: Bool, + body: (chooseTruth (selectionOfTruth guard) yes no) +} + +theorem{ + name: recoveryOfChoice, + parameters: [selection : Stitch.Fragments::Bit, yes : Placement, no : Placement], + statement: ((recoverable (choosePlacement selection yes no)) = (chooseTruth selection (recoverable yes) (recoverable no))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Zero}, + {proof: reflexivity{}, binders: [], constructor: One} + ], + scrutinee: selection + } +} + +theorem{ + name: liveRecoveryOfChoice, + parameters: [selection : Stitch.Fragments::Bit, yes : Placement, no : Placement, now : Nat], + statement: ((recoverableAt (choosePlacement selection yes no) now) = (chooseTruth selection (recoverableAt yes now) (recoverableAt no now))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Zero}, + {proof: reflexivity{}, binders: [], constructor: One} + ], + scrutinee: selection + } +} + +theorem{ + name: recoveryOfSelection, + parameters: [guard : Bool, yes : Placement, no : Placement], + statement: ((recoverable (selectPlacement guard yes no)) = (selectTruth guard (recoverable yes) (recoverable no))), + proof: apply{arguments: [(selectionOfTruth guard), yes, no], theorem: recoveryOfChoice} +} + +theorem{ + name: liveRecoveryOfSelection, + parameters: [guard : Bool, yes : Placement, no : Placement, now : Nat], + statement: ((recoverableAt (selectPlacement guard yes no) now) = (selectTruth guard (recoverableAt yes now) (recoverableAt no now))), + proof: apply{arguments: [(selectionOfTruth guard), yes, no, now], theorem: liveRecoveryOfChoice} +} + +theorem{ + name: fallbackPreservationFact, + parameters: [], + statement: (forall (old : Bool), (forall (fallback : Bool), (forall (next : Bool), (forall (guard : Bool), (((old = true) -> (fallback = true)) -> (((old = true) -> ((selectTruth guard next old) = true)) -> (((old = true) -> ((selectTruth guard next fallback) = true)) <-> (0 = 0)))))))), + proof: decide{} +} + +definition{ + name: migrationBase, + parameters: [placement : Placement, completed : Transfer, index : Nat, now : Nat], + result: Bool, + body: ((committedPhase completed) && ((receiptBound completed (project completed receipt) now) && ((sourceLive placement completed now) && ((project completed index) =? index)))) +} + +definition{ + name: migrationGate0, + parameters: [placement : Placement, completed : Transfer, now : Nat], + result: Bool, + body: ((migrationBase placement completed 0 now) && ((not ((project completed targetHolder) =? (project placement holder1))) && ((not ((project completed targetHolder) =? (project placement holder2))) && (receiptLive (project placement manifestRoot) 0 (project completed targetHolder) (project completed receipt) now)))) +} + +definition{ + name: committedPlacement0, + parameters: [placement : Placement, completed : Transfer], + result: Placement, + body: (record Placement {manifestRoot := (project placement manifestRoot), revision := ((project placement revision) + 1), holder0 := (project completed targetHolder), holder1 := (project placement holder1), holder2 := (project placement holder2), active0 := true, active1 := (project placement active1), active2 := (project placement active2), receipt0 := (project completed receipt), receipt1 := (project placement receipt1), receipt2 := (project placement receipt2)}) +} + +theorem{ + name: staticGate0Preservation, + parameters: [], + statement: (forall (base : Bool), (forall (d01 : Bool), (forall (d02 : Bool), (forall (d12 : Bool), (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), (forall (n1 : Bool), (forall (n2 : Bool), (forall (lease : Bool), (((((d01 && (d02 && d12)) && (activeThreshold a b c)) = true) -> ((selectTruth (base && (n1 && (n2 && lease))) ((n1 && (n2 && d12)) && (activeThreshold true b c)) ((d01 && (d02 && d12)) && (activeThreshold a b c))) = true)) <-> (0 = 0)))))))))))), + proof: decide{} +} + +theorem{ + name: liveGate0Preservation, + parameters: [], + statement: (forall (base : Bool), (forall (d01 : Bool), (forall (d02 : Bool), (forall (d12 : Bool), (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), (forall (n1 : Bool), (forall (n2 : Bool), (forall (lease : Bool), (((((a && (b && d01)) || ((a && (c && d02)) || (b && (c && d12)))) = true) -> ((selectTruth (base && (n1 && (n2 && lease))) (((true && lease) && (b && n1)) || (((true && lease) && (c && n2)) || (b && (c && d12)))) ((a && (b && d01)) || ((a && (c && d02)) || (b && (c && d12))))) = true)) <-> (0 = 0)))))))))))), + proof: decide{} +} + +theorem{ + name: staticMigrationGate0Fact, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: ((((recoverable placement) = true) -> ((selectTruth (migrationGate0 placement completed now) (recoverable (committedPlacement0 placement completed)) (recoverable placement)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + committedPlacement0, + distinctHolders, + migrationGate0, + recoverable, + staticGate0Preservation + ] + }, + axioms: [propext] +} + +theorem{ + name: liveMigrationGate0Fact, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: ((((recoverableAt placement now) = true) -> ((selectTruth (migrationGate0 placement completed now) (recoverableAt (committedPlacement0 placement completed) now) (recoverableAt placement now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + committedPlacement0, + indexedCopyLiveOne, + indexedCopyLiveTwo, + indexedCopyLiveZero, + liveGate0Preservation, + migrationGate0, + recoverableAt + ] + }, + axioms: [propext] +} + +definition{ + name: migrationGate1, + parameters: [placement : Placement, completed : Transfer, now : Nat], + result: Bool, + body: ((migrationBase placement completed 1 now) && ((not ((project placement holder0) =? (project completed targetHolder))) && ((not ((project completed targetHolder) =? (project placement holder2))) && (receiptLive (project placement manifestRoot) 1 (project completed targetHolder) (project completed receipt) now)))) +} + +definition{ + name: committedPlacement1, + parameters: [placement : Placement, completed : Transfer], + result: Placement, + body: (record Placement {manifestRoot := (project placement manifestRoot), revision := ((project placement revision) + 1), holder0 := (project placement holder0), holder1 := (project completed targetHolder), holder2 := (project placement holder2), active0 := (project placement active0), active1 := true, active2 := (project placement active2), receipt0 := (project placement receipt0), receipt1 := (project completed receipt), receipt2 := (project placement receipt2)}) +} + +theorem{ + name: staticGate1Preservation, + parameters: [], + statement: (forall (base : Bool), (forall (d01 : Bool), (forall (d02 : Bool), (forall (d12 : Bool), (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), (forall (n1 : Bool), (forall (n2 : Bool), (forall (lease : Bool), (((((d01 && (d02 && d12)) && (activeThreshold a b c)) = true) -> ((selectTruth (base && (n1 && (n2 && lease))) ((n1 && (d02 && n2)) && (activeThreshold a true c)) ((d01 && (d02 && d12)) && (activeThreshold a b c))) = true)) <-> (0 = 0)))))))))))), + proof: decide{} +} + +theorem{ + name: liveGate1Preservation, + parameters: [], + statement: (forall (base : Bool), (forall (d01 : Bool), (forall (d02 : Bool), (forall (d12 : Bool), (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), (forall (n1 : Bool), (forall (n2 : Bool), (forall (lease : Bool), (((((a && (b && d01)) || ((a && (c && d02)) || (b && (c && d12)))) = true) -> ((selectTruth (base && (n1 && (n2 && lease))) ((a && ((true && lease) && n1)) || ((a && (c && d02)) || ((true && lease) && (c && n2)))) ((a && (b && d01)) || ((a && (c && d02)) || (b && (c && d12))))) = true)) <-> (0 = 0)))))))))))), + proof: decide{} +} + +theorem{ + name: staticMigrationGate1Fact, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: ((((recoverable placement) = true) -> ((selectTruth (migrationGate1 placement completed now) (recoverable (committedPlacement1 placement completed)) (recoverable placement)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + committedPlacement1, + distinctHolders, + migrationGate1, + recoverable, + staticGate1Preservation + ] + }, + axioms: [propext] +} + +theorem{ + name: liveMigrationGate1Fact, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: ((((recoverableAt placement now) = true) -> ((selectTruth (migrationGate1 placement completed now) (recoverableAt (committedPlacement1 placement completed) now) (recoverableAt placement now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + committedPlacement1, + indexedCopyLiveOne, + indexedCopyLiveTwo, + indexedCopyLiveZero, + liveGate1Preservation, + migrationGate1, + recoverableAt + ] + }, + axioms: [propext] +} + +definition{ + name: migrationGate2, + parameters: [placement : Placement, completed : Transfer, now : Nat], + result: Bool, + body: ((migrationBase placement completed 2 now) && ((not ((project placement holder0) =? (project completed targetHolder))) && ((not ((project placement holder1) =? (project completed targetHolder))) && (receiptLive (project placement manifestRoot) 2 (project completed targetHolder) (project completed receipt) now)))) +} + +definition{ + name: committedPlacement2, + parameters: [placement : Placement, completed : Transfer], + result: Placement, + body: (record Placement {manifestRoot := (project placement manifestRoot), revision := ((project placement revision) + 1), holder0 := (project placement holder0), holder1 := (project placement holder1), holder2 := (project completed targetHolder), active0 := (project placement active0), active1 := (project placement active1), active2 := true, receipt0 := (project placement receipt0), receipt1 := (project placement receipt1), receipt2 := (project completed receipt)}) +} + +theorem{ + name: staticGate2Preservation, + parameters: [], + statement: (forall (base : Bool), (forall (d01 : Bool), (forall (d02 : Bool), (forall (d12 : Bool), (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), (forall (n1 : Bool), (forall (n2 : Bool), (forall (lease : Bool), (((((d01 && (d02 && d12)) && (activeThreshold a b c)) = true) -> ((selectTruth (base && (n1 && (n2 && lease))) ((d01 && (n1 && n2)) && (activeThreshold a b true)) ((d01 && (d02 && d12)) && (activeThreshold a b c))) = true)) <-> (0 = 0)))))))))))), + proof: decide{} +} + +theorem{ + name: liveGate2Preservation, + parameters: [], + statement: (forall (base : Bool), (forall (d01 : Bool), (forall (d02 : Bool), (forall (d12 : Bool), (forall (a : Bool), (forall (b : Bool), (forall (c : Bool), (forall (n1 : Bool), (forall (n2 : Bool), (forall (lease : Bool), (((((a && (b && d01)) || ((a && (c && d02)) || (b && (c && d12)))) = true) -> ((selectTruth (base && (n1 && (n2 && lease))) ((a && (b && d01)) || ((a && ((true && lease) && n1)) || (b && ((true && lease) && n2)))) ((a && (b && d01)) || ((a && (c && d02)) || (b && (c && d12))))) = true)) <-> (0 = 0)))))))))))), + proof: decide{} +} + +theorem{ + name: staticMigrationGate2Fact, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: ((((recoverable placement) = true) -> ((selectTruth (migrationGate2 placement completed now) (recoverable (committedPlacement2 placement completed)) (recoverable placement)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + committedPlacement2, + distinctHolders, + migrationGate2, + recoverable, + staticGate2Preservation + ] + }, + axioms: [propext] +} + +theorem{ + name: liveMigrationGate2Fact, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: ((((recoverableAt placement now) = true) -> ((selectTruth (migrationGate2 placement completed now) (recoverableAt (committedPlacement2 placement completed) now) (recoverableAt placement now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + committedPlacement2, + indexedCopyLiveOne, + indexedCopyLiveTwo, + indexedCopyLiveZero, + liveGate2Preservation, + migrationGate2, + recoverableAt + ] + }, + axioms: [propext] +} + +definition{ + name: migrationAllowed, + parameters: [placement : Placement, completed : Transfer, now : Nat], + result: Bool, + body: ((migrationGate0 placement completed now) || ((migrationGate1 placement completed now) || (migrationGate2 placement completed now))) +} + +definition{ + name: installReceipt, + parameters: [placement : Placement, index : Nat, receipt : Receipt], + result: Placement, + body: (record Placement {manifestRoot := (project placement manifestRoot), revision := (project placement revision), holder0 := (project placement holder0), holder1 := (project placement holder1), holder2 := (project placement holder2), active0 := (project placement active0), active1 := (project placement active1), active2 := (project placement active2), receipt0 := (if (index =? 0) then receipt else (project placement receipt0)), receipt1 := (if (index =? 1) then receipt else (project placement receipt1)), receipt2 := (if (index =? 2) then receipt else (project placement receipt2))}) +} + +definition{ + name: migrate, + parameters: [placement : Placement, completed : Transfer, now : Nat], + result: Placement, + body: (selectPlacement (migrationGate0 placement completed now) (committedPlacement0 placement completed) (selectPlacement (migrationGate1 placement completed now) (committedPlacement1 placement completed) (selectPlacement (migrationGate2 placement completed now) (committedPlacement2 placement completed) placement))) +} + +theorem{ + name: typedMigrationPreservesRecoveryFact, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: ((((recoverable placement) = true) -> ((recoverable (migrate placement completed now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + booleanSelfPreservationFact, + fallbackPreservationFact, + migrate, + recoveryOfSelection, + staticMigrationGate0Fact, + staticMigrationGate1Fact, + staticMigrationGate2Fact + ] + }, + axioms: [propext] +} + +theorem{ + name: typedMigrationPreservesRecovery, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: (((recoverable placement) = true) -> ((recoverable (migrate placement completed now)) = true)), + proof: simplify{definitions: [typedMigrationPreservesRecoveryFact]}, + axioms: [propext] +} + +theorem{ + name: typedMigrationPreservesLiveRecoveryAtObservationTimeFact, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: ((((recoverableAt placement now) = true) -> ((recoverableAt (migrate placement completed now) now) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + booleanSelfPreservationFact, + fallbackPreservationFact, + liveMigrationGate0Fact, + liveMigrationGate1Fact, + liveMigrationGate2Fact, + liveRecoveryOfSelection, + migrate + ] + }, + axioms: [propext] +} + +theorem{ + name: typedMigrationPreservesLiveRecoveryAtObservationTime, + parameters: [placement : Placement, completed : Transfer, now : Nat], + statement: (((recoverableAt placement now) = true) -> ((recoverableAt (migrate placement completed now) now) = true)), + proof: simplify{definitions: [typedMigrationPreservesLiveRecoveryAtObservationTimeFact]}, + axioms: [propext] +} + +theorem{ + name: expiredReceiptDoesNotCountAsLive, + parameters: [ + manifestRoot : Stitch.Identity::Digest, + index : Nat, + holder : Nat, + receipt : Receipt, + now : Nat + ], + statement: (((project receipt leaseUntil) <= now) -> ((receiptLive manifestRoot index holder receipt now) = false)), + proof: linear_arithmetic{definitions: [receiptLive]}, + axioms: [Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Effects.lex.tex b/app/src/Stitch/Effects.lex.tex new file mode 100644 index 0000000..a4f961e --- /dev/null +++ b/app/src/Stitch/Effects.lex.tex @@ -0,0 +1,676 @@ +\begin{lexlean}{Stitch.Effects} + +\useglossary{lexlean.std.bool@1.2.0} + +\useglossary{lexlean.std.nat@1.2.0} + +\useglossary{stitch.domain@1.0.0} + +\title{Stitch recoverable service model} + +\begin{semanticmodule} +structure{ + name: Transport, + type_parameters: [], + parameters: [], + fields: [ + {name: generation, type: Nat}, + {name: closed, type: Bool}, + {name: channelKey, type: Bytes}, + {name: localPeer, type: Bytes} + ] +} + +structure{ + name: TransportCallback, + type_parameters: [], + parameters: [], + fields: [ + {name: generation, type: Nat}, + {name: channelKey, type: Bytes}, + {name: localPeer, type: Bytes}, + {name: remotePeer, type: Bytes} + ] +} + +definition{ + name: transportCanSend, + parameters: [state : Transport], + result: Bool, + body: (not (project state closed)) +} + +definition{ + name: transportClose, + parameters: [state : Transport], + result: Transport, + body: (record Transport {generation := ((project state generation) + 1), closed := true, channelKey := (project state channelKey), localPeer := (project state localPeer)}) +} + +definition{ + name: transportOpen, + parameters: [state : Transport, channelKey : Bytes], + result: Transport, + body: (record Transport {generation := (project state generation), closed := false, channelKey := channelKey, localPeer := (project state localPeer)}) +} + +definition{ + name: transportSessionMatches, + parameters: [state : Transport, callback : TransportCallback], + result: Bool, + body: ((transportCanSend state) && (((project state generation) =? (project callback generation)) && ((prim equal (project state channelKey) (project callback channelKey) : Bool) && (prim equal (project state localPeer) (project callback localPeer) : Bool)))) +} + +definition{ + name: transportPeerCallbackAllowed, + parameters: [ + state : Transport, + callback : TransportCallback, + remotePeer : Bytes, + entryCurrent : Bool + ], + result: Bool, + body: ((transportSessionMatches state callback) && ((prim equal (project callback remotePeer) remotePeer : Bool) && entryCurrent)) +} + +definition{ + name: transportChannelCallbackAllowed, + parameters: [ + state : Transport, + callback : TransportCallback, + remotePeer : Bytes, + entryCurrent : Bool, + channelCurrent : Bool + ], + result: Bool, + body: ((transportPeerCallbackAllowed state callback remotePeer entryCurrent) && channelCurrent) +} + +definition{ + name: transportSignalAllowed, + parameters: [ + state : Transport, + channelKey : Bytes, + remotePeer : Bytes, + targetPeer : Bytes, + broadcast : Bool + ], + result: Bool, + body: ((transportCanSend state) && ((prim equal (project state channelKey) channelKey : Bool) && ((not (prim equal (project state localPeer) remotePeer : Bool)) && (broadcast || (prim equal (project state localPeer) targetPeer : Bool))))) +} + +definition{ + name: transportPeerAllocationAllowed, + parameters: [state : Transport, peerCount : Nat, maxPeers : Nat], + result: Bool, + body: ((transportCanSend state) && (peerCount true + | DnsPhase.Published => true + | DnsPhase.Refused => true + | DnsPhase.Unknown => false) +} + +definition{ + name: dnsMayReconcile, + parameters: [phase : DnsPhase], + result: Bool, + body: (not (dnsMayWritePhase phase)) +} + +definition{ + name: dnsRequestAllowed, + parameters: [state : DnsPublication, candidate : DnsCandidate, busy : Bool], + result: Bool, + body: ((not busy) && ((dnsScopeMatches (project state scope) (project candidate scope)) && ((dnsMayWritePhase (project state phase)) || (prim equal (project state pointerDigest) (project candidate pointerDigest) : Bool)))) +} + +definition{ + name: dnsSelectRead, + parameters: [ + phase : DnsPhase, + exactCandidate : Bool, + recordPresent : Bool, + predecessor : Bool, + bootstrap : Bool, + live : Bool + ], + result: DnsDecision, + body: (if exactCandidate then (ctor DnsDecision.Reconciled) else (if (dnsMayReconcile phase) then (ctor DnsDecision.Wait) else (if live then (if recordPresent then (if predecessor then (ctor DnsDecision.Update) else (ctor DnsDecision.Refuse)) else (if bootstrap then (ctor DnsDecision.Create) else (ctor DnsDecision.Refuse))) else (ctor DnsDecision.Refuse)))) +} + +definition{ + name: dnsDecisionWrites, + parameters: [decision : DnsDecision], + result: Bool, + body: (match decision + | DnsDecision.Refuse => false + | DnsDecision.Reconciled => false + | DnsDecision.Wait => false + | DnsDecision.Create => true + | DnsDecision.Update => true) +} + +theorem{ + name: unknownReadNeverWrites, + parameters: [], + statement: (forall (exactCandidate : Bool), (forall (recordPresent : Bool), (forall (predecessor : Bool), (forall (bootstrap : Bool), (forall (live : Bool), ((dnsDecisionWrites (dnsSelectRead (ctor DnsPhase.Unknown) exactCandidate recordPresent predecessor bootstrap live)) = false)))))), + proof: decide{} +} + +definition{ + name: dnsSelectGatedRead, + parameters: [ + admitted : Bool, + phase : DnsPhase, + exactCandidate : Bool, + recordPresent : Bool, + predecessor : Bool, + bootstrap : Bool, + live : Bool + ], + result: DnsDecision, + body: (if admitted then (dnsSelectRead phase exactCandidate recordPresent predecessor bootstrap live) else (ctor DnsDecision.Refuse)) +} + +theorem{ + name: unknownGatedReadNeverWrites, + parameters: [], + statement: (forall (admitted : Bool), (forall (exactCandidate : Bool), (forall (recordPresent : Bool), (forall (predecessor : Bool), (forall (bootstrap : Bool), (forall (live : Bool), ((dnsDecisionWrites (dnsSelectGatedRead admitted (ctor DnsPhase.Unknown) exactCandidate recordPresent predecessor bootstrap live)) = false))))))), + proof: decide{} +} + +definition{ + name: dnsReadDecision, + parameters: [state : DnsPublication, candidate : DnsCandidate, observation : DnsRead, now : Nat], + result: DnsDecision, + body: (dnsSelectGatedRead ((dnsRequestAllowed state candidate false) && ((dnsScopeMatches (project candidate scope) (project observation scope)) && ((prim equal (project candidate pointerDigest) (project observation candidateDigest) : Bool) && ((project observation complete) && (((not (project observation recordPresent)) || (project observation authenticated)) && ((not (project state hasRecordId)) || ((project observation recordPresent) && (prim equal (project state recordId) (project observation recordId) : Bool)))))))) (project state phase) ((project observation recordPresent) && (prim equal (project observation pointerDigest) (project candidate pointerDigest) : Bool)) (project observation recordPresent) ((project candidate hasPrevious) && ((prim equal (project observation pointerDigest) (project candidate previousDigest) : Bool) && (((project observation revision) + 1) =? (project candidate revision)))) ((not (project state hasRecordId)) && ((not (project candidate hasPrevious)) && ((project candidate revision) =? 0))) (((project candidate validFrom) <=? now) && (now state + | DnsDecision.Reconciled => (record DnsPublication {scope := (project state scope), phase := (ctor DnsPhase.Published), pointerDigest := (project candidate pointerDigest), recordId := (project observation recordId), hasRecordId := true}) + | DnsDecision.Wait => state + | DnsDecision.Create => state + | DnsDecision.Update => state) +} + +definition{ + name: dnsBeginWrite, + parameters: [state : DnsPublication, candidate : DnsCandidate, observation : DnsRead, now : Nat], + result: DnsPublication, + body: (match (dnsReadDecision state candidate observation now) + | DnsDecision.Refuse => state + | DnsDecision.Reconciled => state + | DnsDecision.Wait => state + | DnsDecision.Create => (record DnsPublication {scope := (project state scope), phase := (ctor DnsPhase.Unknown), pointerDigest := (project candidate pointerDigest), recordId := (project observation recordId), hasRecordId := (project observation recordPresent)}) + | DnsDecision.Update => (record DnsPublication {scope := (project state scope), phase := (ctor DnsPhase.Unknown), pointerDigest := (project candidate pointerDigest), recordId := (project observation recordId), hasRecordId := (project observation recordPresent)})) +} + +definition{ + name: dnsFinishWrite, + parameters: [state : DnsPublication, result : DnsWriteResult], + result: DnsPublication, + body: (if ((dnsMayReconcile (project state phase)) && ((dnsScopeMatches (project state scope) (project result scope)) && (prim equal (project state pointerDigest) (project result candidateDigest) : Bool))) then (record DnsPublication {scope := (project state scope), phase := (if (project result refused) then (if (project result acknowledged) then (ctor DnsPhase.Unknown) else (ctor DnsPhase.Refused)) else (if ((project result acknowledged) && ((project result recordIdValid) && ((not (project state hasRecordId)) || (prim equal (project state recordId) (project result recordId) : Bool)))) then (ctor DnsPhase.Published) else (ctor DnsPhase.Unknown))), pointerDigest := (project state pointerDigest), recordId := (if ((not (project result refused)) && ((project result acknowledged) && ((project result recordIdValid) && ((not (project state hasRecordId)) || (prim equal (project state recordId) (project result recordId) : Bool))))) then (project result recordId) else (project state recordId)), hasRecordId := ((project state hasRecordId) || ((not (project result refused)) && ((project result acknowledged) && ((project result recordIdValid) && ((not (project state hasRecordId)) || (prim equal (project state recordId) (project result recordId) : Bool))))))}) else state) +} + +theorem{ + name: unknownCannotAuthorizeWrite, + parameters: [], + statement: ((dnsMayWritePhase (ctor DnsPhase.Unknown)) = false), + proof: decide{} +} + +theorem{ + name: unknownOffersReconciliation, + parameters: [], + statement: ((dnsMayReconcile (ctor DnsPhase.Unknown)) = true), + proof: decide{} +} + +inductive{ + name: VmPhase, + type_parameters: [], + parameters: [], + constructors: [ + {name: Idle, fields: []}, + {name: Booting, fields: []}, + {name: Ready, fields: []}, + {name: Failed, fields: []} + ] +} + +structure{ + name: Vm, + type_parameters: [], + parameters: [], + fields: [{name: generation, type: Nat}, {name: phase, type: VmPhase}] +} + +definition{ + name: vmCanBoot, + parameters: [state : Vm], + result: Bool, + body: (match (project state phase) + | VmPhase.Idle => true + | VmPhase.Booting => false + | VmPhase.Ready => false + | VmPhase.Failed => true) +} + +definition{ + name: vmIsBooting, + parameters: [state : Vm], + result: Bool, + body: (match (project state phase) + | VmPhase.Idle => false + | VmPhase.Booting => true + | VmPhase.Ready => false + | VmPhase.Failed => false) +} + +definition{ + name: vmCanExecute, + parameters: [state : Vm], + result: Bool, + body: (match (project state phase) + | VmPhase.Idle => false + | VmPhase.Booting => false + | VmPhase.Ready => true + | VmPhase.Failed => false) +} + +definition{ + name: vmStart, + parameters: [state : Vm], + result: Vm, + body: (if (vmCanBoot state) then (record Vm {generation := ((project state generation) + 1), phase := (ctor VmPhase.Booting)}) else state) +} + +definition{ + name: vmCallbackAllowed, + parameters: [state : Vm, generation : Nat, instanceCurrent : Bool], + result: Bool, + body: (((project state generation) =? generation) && (instanceCurrent && ((vmIsBooting state) || (vmCanExecute state)))) +} + +definition{ + name: vmFailAllowed, + parameters: [state : Vm, generation : Nat], + result: Bool, + body: (((project state generation) =? generation) && (vmIsBooting state)) +} + +definition{ + name: vmFail, + parameters: [state : Vm, generation : Nat], + result: Vm, + body: (if (vmFailAllowed state generation) then (record Vm {generation := ((project state generation) + 1), phase := (ctor VmPhase.Failed)}) else state) +} + +definition{ + name: vmGenerationFilter, + parameters: [difference : Nat, whenEqual : Vm, whenDifferent : Vm], + result: Vm, + body: (match difference | Nat.zero => whenEqual | Nat.succ rest => whenDifferent) +} + +theorem{ + name: vmPositiveGenerationFilterFact, + parameters: [difference : Nat, whenEqual : Vm, whenDifferent : Vm], + statement: (((0 < difference) -> ((vmGenerationFilter difference whenEqual whenDifferent) = whenDifferent)) <-> (0 = 0)), + proof: cases{ + branches: [ + { + proof: constructor{ + branches: [linear_arithmetic{}, linear_arithmetic{definitions: [vmGenerationFilter]}] + }, + binders: [], + constructor: zero + }, + { + proof: constructor{ + branches: [linear_arithmetic{}, linear_arithmetic{definitions: [vmGenerationFilter]}] + }, + binders: [rest], + constructor: succ + } + ], + scrutinee: difference + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: vmOldGenerationDifference, + parameters: [state : Vm, generation : Nat], + statement: ((generation < (project state generation)) <-> (0 < (prim subtract (project state generation) generation : Nat))), + proof: constructor{branches: [linear_arithmetic{}, linear_arithmetic{}]}, + axioms: [Quot.sound, propext] +} + +definition{ + name: vmReadyCandidate, + parameters: [state : Vm, instanceCurrent : Bool, readinessObserved : Bool], + result: Vm, + body: (if ((vmIsBooting state) && (instanceCurrent && readinessObserved)) then (record Vm {generation := (project state generation), phase := (ctor VmPhase.Ready)}) else state) +} + +definition{ + name: vmObserveReady, + parameters: [state : Vm, generation : Nat, instanceCurrent : Bool, readinessObserved : Bool], + result: Vm, + body: (vmGenerationFilter (prim subtract (project state generation) generation : Nat) (vmGenerationFilter (prim subtract generation (project state generation) : Nat) (vmReadyCandidate state instanceCurrent readinessObserved) state) state) +} + +theorem{ + name: bootingCannotBootAgain, + parameters: [generation : Nat], + statement: ((vmCanBoot (record Vm {generation := generation, phase := (ctor VmPhase.Booting)})) = false), + proof: reflexivity{} +} + +theorem{ + name: failedVmCanRetry, + parameters: [generation : Nat], + statement: ((vmCanBoot (record Vm {generation := generation, phase := (ctor VmPhase.Failed)})) = true), + proof: reflexivity{} +} + +theorem{ + name: bootingCannotExecute, + parameters: [generation : Nat], + statement: ((vmCanExecute (record Vm {generation := generation, phase := (ctor VmPhase.Booting)})) = false), + proof: reflexivity{} +} + +theorem{ + name: staleTransportGenerationCannotCallback, + parameters: [state : Transport, callback : TransportCallback], + statement: (((project callback generation) < (project state generation)) -> ((transportSessionMatches state callback) = false)), + proof: linear_arithmetic{definitions: [transportCanSend, transportSessionMatches]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: reconnectCannotReviveCapturedCallback, + parameters: [state : Transport, callback : TransportCallback, channelKey : Bytes], + statement: (((project callback generation) <= (project state generation)) -> ((transportSessionMatches (transportOpen (transportClose state) channelKey) callback) = false)), + proof: linear_arithmetic{ + definitions: [transportCanSend, transportClose, transportOpen, transportSessionMatches] + }, + axioms: [Quot.sound, propext] +} + +theorem{ + name: staleVmGenerationCannotCallback, + parameters: [state : Vm, generation : Nat, instanceCurrent : Bool], + statement: ((generation < (project state generation)) -> ((vmCallbackAllowed state generation instanceCurrent) = false)), + proof: linear_arithmetic{definitions: [vmCallbackAllowed]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: staleVmCannotResurrectReadiness, + parameters: [state : Vm, generation : Nat, instanceCurrent : Bool, readinessObserved : Bool], + statement: ((generation < (project state generation)) -> ((vmObserveReady state generation instanceCurrent readinessObserved) = state)), + proof: simplify{ + definitions: [vmObserveReady, vmOldGenerationDifference, vmPositiveGenerationFilterFact] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: unresolvedDnsReadCannotWrite, + parameters: [ + scope : DnsScope, + pointerDigest : Bytes, + recordId : Bytes, + hasRecordId : Bool, + candidate : DnsCandidate, + observation : DnsRead, + now : Nat + ], + statement: ((dnsDecisionWrites (dnsReadDecision (record DnsPublication {scope := scope, phase := (ctor DnsPhase.Unknown), pointerDigest := pointerDigest, recordId := recordId, hasRecordId := hasRecordId}) candidate observation now)) = false), + proof: simplify{definitions: [dnsReadDecision, unknownGatedReadNeverWrites]}, + axioms: [propext] +} + +structure{ + name: C1Progress, + type_parameters: [], + parameters: [], + fields: [ + {name: startedAt, type: Nat}, + {name: lastSequence, type: Nat}, + {name: hasSequence, type: Bool}, + {name: consecutive, type: Nat} + ] +} + +definition{ + name: c1InWindow, + parameters: [progress : C1Progress, now : Nat], + result: Bool, + body: (((project progress startedAt) <=? now) && (now <=? ((project progress startedAt) + 10000000))) +} + +definition{ + name: c1ProbeAccepted, + parameters: [progress : C1Progress, sequence : Nat, now : Nat, correlated : Bool], + result: Bool, + body: (correlated && ((c1InWindow progress now) && ((not (project progress hasSequence)) || ((project progress lastSequence) ((c1ConnectionQualified progress now orderedChannel) = false)), + proof: linear_arithmetic{definitions: [c1ConnectionQualified]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: expiredConnectionCannotQualify, + parameters: [progress : C1Progress, now : Nat, orderedChannel : Bool], + statement: ((((project progress startedAt) + 10000000) < now) -> ((c1ConnectionQualified progress now orderedChannel) = false)), + proof: linear_arithmetic{definitions: [c1ConnectionQualified, c1InWindow]}, + axioms: [Quot.sound, propext] +} + +definition{ + name: authorityMayCreate, + parameters: [exists : Bool, explicitSetup : Bool], + result: Bool, + body: ((not exists) && explicitSetup) +} + +theorem{ + name: existingAuthorityNeverRotates, + parameters: [], + statement: (forall (explicitSetup : Bool), ((authorityMayCreate true explicitSetup) = false)), + proof: decide{} +} + +definition{ + name: journalMayClaim, + parameters: [unresolved : Bool], + result: Bool, + body: (not unresolved) +} + +definition{ + name: journalMayFinish, + parameters: [sameCandidate : Bool, sameOwner : Bool, exactPublishedRead : Bool], + result: Bool, + body: (sameCandidate && (sameOwner || exactPublishedRead)) +} + +theorem{ + name: unknownJournalCannotClaim, + parameters: [], + statement: ((journalMayClaim true) = false), + proof: decide{} +} + +theorem{ + name: foreignCandidateCannotFinish, + parameters: [], + statement: (forall (sameOwner : Bool), (forall (exactPublishedRead : Bool), ((journalMayFinish false sameOwner exactPublishedRead) = false))), + proof: decide{} +} +\end{semanticmodule} + +\end{lexlean} diff --git a/app/src/Stitch/Encoding.lex.tex b/app/src/Stitch/Encoding.lex.tex new file mode 100644 index 0000000..940ba10 --- /dev/null +++ b/app/src/Stitch/Encoding.lex.tex @@ -0,0 +1,115 @@ +\begin{lexlean}{Stitch.Encoding} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Stitch.Identity} +\title{Stitch recoverable service model} +\begin{semanticmodule} +inductive{ + name: DependencyKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: Decoder, fields: []}, + {name: Parameters, fields: []}, + {name: Basis, fields: []}, + {name: Residual, fields: []}, + {name: Framing, fields: []} + ] +} + +structure{ + name: Dependency, + type_parameters: [], + parameters: [], + fields: [ + {name: root, type: Stitch.Identity::Digest}, + {name: kind, type: DependencyKind}, + {name: byteLength, type: Nat}, + {name: present, type: Bool}, + {name: integrityChecked, type: Bool} + ] +} + +structure{ + name: Encoding, + type_parameters: [], + parameters: [], + fields: [ + {name: objectRoot, type: Stitch.Identity::Digest}, + {name: representationRoot, type: Stitch.Identity::Digest}, + {name: representation, type: Bytes}, + {name: decoderRoot, type: Stitch.Identity::Digest}, + {name: dependencies, type: (List Dependency)}, + {name: modelBytes, type: Nat}, + {name: parameterBytes, type: Nat}, + {name: residualBytes, type: Nat}, + {name: framingBytes, type: Nat}, + {name: metadataBytes, type: Nat}, + {name: externalBasisBytes, type: Nat} + ] +} + +definition{ + name: dependenciesReady, + parameters: [dependencies : (List Dependency)], + result: Bool, + body: (match dependencies + | List.nil => true + | List.cons head tail => ((project head present) && ((project head integrityChecked) && (dependenciesReady tail)))), + recursive_argument: dependencies +} + +definition{ + name: selfContainedBytes, + parameters: [encoding : Encoding], + result: Nat, + body: ((project encoding modelBytes) + ((project encoding parameterBytes) + ((project encoding residualBytes) + ((project encoding framingBytes) + (project encoding metadataBytes))))) +} + +definition{ + name: totalRecoveryBytes, + parameters: [encoding : Encoding], + result: Nat, + body: ((selfContainedBytes encoding) + (project encoding externalBasisBytes)) +} + +definition{name: rawDecode, parameters: [value : Bytes], result: Bytes, body: value} + +theorem{ + name: rawRecoveryExact, + parameters: [value : Bytes], + statement: ((rawDecode value) = value), + proof: reflexivity{} +} + +theorem{ + name: externalBasisNotFree, + parameters: [encoding : Encoding], + statement: ((selfContainedBytes encoding) <= (totalRecoveryBytes encoding)), + proof: linear_arithmetic{definitions: [selfContainedBytes, totalRecoveryBytes]}, + axioms: [Quot.sound, propext] +} + +structure{ + name: RecoveryObservation, + type_parameters: [], + parameters: [], + fields: [ + {name: objectRoot, type: Stitch.Identity::Digest}, + {name: representationRoot, type: Stitch.Identity::Digest}, + {name: recoveredBytes, type: Bytes}, + {name: expectedBytes, type: Bytes}, + {name: decoderBound, type: Bool}, + {name: dependenciesPresent, type: Bool} + ] +} + +definition{ + name: exactRecovery, + parameters: [observation : RecoveryObservation], + result: Bool, + body: ((project observation decoderBound) && ((project observation dependenciesPresent) && (prim equal (project observation recoveredBytes) (project observation expectedBytes) : Bool))) +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Evidence.lex.tex b/app/src/Stitch/Evidence.lex.tex new file mode 100644 index 0000000..425496f --- /dev/null +++ b/app/src/Stitch/Evidence.lex.tex @@ -0,0 +1,253 @@ +\begin{lexlean}{Stitch.Evidence} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Stitch.Identity} +\importmodule{Stitch.Encoding} +\title{Stitch recoverable service model} +\begin{semanticmodule} +inductive{ + name: ClaimKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: Integrity, fields: []}, + {name: Authorization, fields: []}, + {name: Reconstruction, fields: []}, + {name: PureExecution, fields: []}, + {name: Availability, fields: []}, + {name: Durability, fields: []}, + {name: Confidentiality, fields: []} + ] +} + +inductive{ + name: EvidenceKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: Specified, fields: []}, + {name: KernelChecked, fields: []}, + {name: ImplementationTested, fields: []}, + {name: IndependentlyReplayed, fields: []}, + {name: FieldMeasured, fields: []}, + {name: Refuted, fields: []}, + {name: Untested, fields: []} + ] +} + +inductive{ + name: HostEffect, + type_parameters: [], + parameters: [], + constructors: [ + {name: ReadClock, fields: []}, + {name: SendFragment, fields: []}, + {name: PersistFragment, fields: []}, + {name: ReadDNS, fields: []}, + {name: WriteDNS, fields: []}, + {name: ReceivePeer, fields: []}, + {name: RunVM, fields: []}, + {name: FetchDependency, fields: []}, + {name: VerifySignature, fields: []}, + {name: HashBytes, fields: []} + ] +} + +structure{ + name: HostAssumptions, + type_parameters: [], + parameters: [], + fields: [ + {name: digestCollisionResistance, type: Bool}, + {name: signatureUnforgeability, type: Bool}, + {name: authorizedKeyBinding, type: Bool}, + {name: receiptAuthentication, type: Bool}, + {name: storageRetentionForLease, type: Bool}, + {name: independentFailureDomains, type: Bool}, + {name: monotonicElapsedClock, type: Bool}, + {name: releasedRuntimeMatchesModel, type: Bool} + ] +} + +structure{ + name: Evidence, + type_parameters: [], + parameters: [], + fields: [ + {name: claim, type: ClaimKind}, + {name: kind, type: EvidenceKind}, + {name: modelRoot, type: Stitch.Identity::Digest}, + {name: artifactRoot, type: Stitch.Identity::Digest}, + {name: subjectRoot, type: Stitch.Identity::Digest}, + {name: assumptionsRoot, type: Stitch.Identity::Digest}, + {name: dependencyRoot, type: Stitch.Identity::Digest}, + {name: assumptions, type: HostAssumptions}, + {name: dependencies, type: (List Stitch.Encoding::Dependency)}, + {name: hostEffects, type: (List HostEffect)}, + {name: observedAt, type: Nat}, + {name: validUntil, type: Nat}, + {name: horizon, type: Nat}, + {name: failureBound, type: Nat} + ] +} + +structure{ + name: Scope, + type_parameters: [], + parameters: [], + fields: [ + {name: claim, type: ClaimKind}, + {name: kind, type: EvidenceKind}, + {name: modelRoot, type: Stitch.Identity::Digest}, + {name: artifactRoot, type: Stitch.Identity::Digest}, + {name: subjectRoot, type: Stitch.Identity::Digest}, + {name: assumptionsRoot, type: Stitch.Identity::Digest}, + {name: dependencyRoot, type: Stitch.Identity::Digest}, + {name: assumptions, type: HostAssumptions}, + {name: dependencies, type: (List Stitch.Encoding::Dependency)}, + {name: hostEffects, type: (List HostEffect)}, + {name: horizon, type: Nat}, + {name: failures, type: Nat} + ] +} + +definition{ + name: claimCode, + parameters: [value : ClaimKind], + result: Nat, + body: (match value + | ClaimKind.Integrity => 0 + | ClaimKind.Authorization => 1 + | ClaimKind.Reconstruction => 2 + | ClaimKind.PureExecution => 3 + | ClaimKind.Availability => 4 + | ClaimKind.Durability => 5 + | ClaimKind.Confidentiality => 6) +} + +definition{ + name: kindCode, + parameters: [value : EvidenceKind], + result: Nat, + body: (match value + | EvidenceKind.Specified => 0 + | EvidenceKind.KernelChecked => 1 + | EvidenceKind.ImplementationTested => 2 + | EvidenceKind.IndependentlyReplayed => 3 + | EvidenceKind.FieldMeasured => 4 + | EvidenceKind.Refuted => 5 + | EvidenceKind.Untested => 6) +} + +definition{ + name: effectCode, + parameters: [value : HostEffect], + result: Nat, + body: (match value + | HostEffect.ReadClock => 0 + | HostEffect.SendFragment => 1 + | HostEffect.PersistFragment => 2 + | HostEffect.ReadDNS => 3 + | HostEffect.WriteDNS => 4 + | HostEffect.ReceivePeer => 5 + | HostEffect.RunVM => 6 + | HostEffect.FetchDependency => 7 + | HostEffect.VerifySignature => 8 + | HostEffect.HashBytes => 9) +} + +definition{ + name: dependencyKindCode, + parameters: [value : Stitch.Encoding::DependencyKind], + result: Nat, + body: (match value + | Stitch.Encoding::DependencyKind.Decoder => 0 + | Stitch.Encoding::DependencyKind.Parameters => 1 + | Stitch.Encoding::DependencyKind.Basis => 2 + | Stitch.Encoding::DependencyKind.Residual => 3 + | Stitch.Encoding::DependencyKind.Framing => 4) +} + +definition{ + name: sameAssumptions, + parameters: [left : HostAssumptions, right : HostAssumptions], + result: Bool, + body: (((if (project left digestCollisionResistance) then 1 else 0) =? (if (project right digestCollisionResistance) then 1 else 0)) && (((if (project left signatureUnforgeability) then 1 else 0) =? (if (project right signatureUnforgeability) then 1 else 0)) && (((if (project left authorizedKeyBinding) then 1 else 0) =? (if (project right authorizedKeyBinding) then 1 else 0)) && (((if (project left receiptAuthentication) then 1 else 0) =? (if (project right receiptAuthentication) then 1 else 0)) && (((if (project left storageRetentionForLease) then 1 else 0) =? (if (project right storageRetentionForLease) then 1 else 0)) && (((if (project left independentFailureDomains) then 1 else 0) =? (if (project right independentFailureDomains) then 1 else 0)) && (((if (project left monotonicElapsedClock) then 1 else 0) =? (if (project right monotonicElapsedClock) then 1 else 0)) && ((if (project left releasedRuntimeMatchesModel) then 1 else 0) =? (if (project right releasedRuntimeMatchesModel) then 1 else 0))))))))) +} + +definition{ + name: sameDependency, + parameters: [left : Stitch.Encoding::Dependency, right : Stitch.Encoding::Dependency], + result: Bool, + body: ((Stitch.Identity::sameDigest (project left root) (project right root)) && (((dependencyKindCode (project left kind)) =? (dependencyKindCode (project right kind))) && (((project left byteLength) =? (project right byteLength)) && ((Stitch.Identity::digestWellFormed (project left root)) && ((project left present) && ((project right present) && ((project left integrityChecked) && (project right integrityChecked)))))))) +} + +definition{ + name: dependenciesUnchanged, + parameters: [ + left : (List Stitch.Encoding::Dependency), + right : (List Stitch.Encoding::Dependency) + ], + result: Bool, + body: (match left + | List.nil => (match right | List.nil => true | List.cons other rest => false) + | List.cons head tail => (match right + | List.nil => false + | List.cons other rest => ((sameDependency head other) && (dependenciesUnchanged tail rest)))), + recursive_argument: left +} + +definition{ + name: effectMember, + parameters: [effect : HostEffect, effects : (List HostEffect)], + result: Bool, + body: (match effects + | List.nil => false + | List.cons head tail => (((effectCode effect) =? (effectCode head)) || (effectMember effect tail))), + recursive_argument: effects +} + +definition{ + name: effectsCovered, + parameters: [requested : (List HostEffect), allowed : (List HostEffect)], + result: Bool, + body: (match requested + | List.nil => true + | List.cons head tail => ((effectMember head allowed) && (effectsCovered tail allowed))), + recursive_argument: requested +} + +definition{ + name: positiveEvidenceKind, + parameters: [kind : EvidenceKind], + result: Bool, + body: ((1 <=? (kindCode kind)) && ((kindCode kind) <=? 4)) +} + +definition{ + name: scopeReusable, + parameters: [evidence : Evidence, requested : Scope, now : Nat], + result: Bool, + body: (((claimCode (project evidence claim)) =? (claimCode (project requested claim))) && (((kindCode (project evidence kind)) =? (kindCode (project requested kind))) && ((positiveEvidenceKind (project evidence kind)) && ((Stitch.Identity::digestWellFormed (project evidence modelRoot)) && ((Stitch.Identity::sameDigest (project evidence modelRoot) (project requested modelRoot)) && ((Stitch.Identity::digestWellFormed (project evidence artifactRoot)) && ((Stitch.Identity::sameDigest (project evidence artifactRoot) (project requested artifactRoot)) && ((Stitch.Identity::digestWellFormed (project evidence subjectRoot)) && ((Stitch.Identity::sameDigest (project evidence subjectRoot) (project requested subjectRoot)) && ((Stitch.Identity::digestWellFormed (project evidence assumptionsRoot)) && ((Stitch.Identity::sameDigest (project evidence assumptionsRoot) (project requested assumptionsRoot)) && ((Stitch.Identity::digestWellFormed (project evidence dependencyRoot)) && ((Stitch.Identity::sameDigest (project evidence dependencyRoot) (project requested dependencyRoot)) && ((sameAssumptions (project evidence assumptions) (project requested assumptions)) && ((dependenciesUnchanged (project evidence dependencies) (project requested dependencies)) && ((effectsCovered (project requested hostEffects) (project evidence hostEffects)) && (((project evidence observedAt) <=? now) && ((now ((scopeReusable evidence requested now) = false)), + proof: linear_arithmetic{definitions: [scopeReusable]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: expiredEvidenceCannotBeReused, + parameters: [evidence : Evidence, requested : Scope, now : Nat], + statement: (((project evidence validUntil) <= now) -> ((scopeReusable evidence requested now) = false)), + proof: linear_arithmetic{definitions: [scopeReusable]}, + axioms: [Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Fragments.lex.tex b/app/src/Stitch/Fragments.lex.tex new file mode 100644 index 0000000..9b74db6 --- /dev/null +++ b/app/src/Stitch/Fragments.lex.tex @@ -0,0 +1,323 @@ +\begin{lexlean}{Stitch.Fragments} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Stitch.Identity} +\importmodule{Stitch.Encoding} +\title{Stitch recoverable service model} +\begin{semanticmodule} +structure{ + name: BitPair, + type_parameters: [], + parameters: [], + fields: [{name: left, type: Nat}, {name: right, type: Nat}] +} + +inductive{ + name: Blocks, + type_parameters: [], + parameters: [], + constructors: [{name: End, fields: []}, {name: More, fields: [BitPair, Blocks]}] +} + +structure{ + name: Fragment, + type_parameters: [], + parameters: [], + fields: [ + {name: manifestRoot, type: Stitch.Identity::Digest}, + {name: encodingRoot, type: Stitch.Identity::Digest}, + {name: index, type: Nat}, + {name: payloadRoot, type: Stitch.Identity::Digest}, + {name: payload, type: Bytes}, + {name: byteLength, type: Nat} + ] +} + +definition{ + name: xorBit, + parameters: [left : Nat, right : Nat], + result: Nat, + body: (if (left =? right) then 0 else 1) +} + +definition{name: encodePair, parameters: [pair : BitPair], result: BitPair, body: pair} + +definition{ + name: recoverLeftParity, + parameters: [pair : BitPair], + result: BitPair, + body: (record BitPair {left := (project pair left), right := (xorBit (project pair left) (xorBit (project pair left) (project pair right)))}) +} + +definition{ + name: recoverRightParity, + parameters: [pair : BitPair], + result: BitPair, + body: (record BitPair {left := (xorBit (xorBit (project pair left) (project pair right)) (project pair right)), right := (project pair right)}) +} + +theorem{ + name: leftParityBitExact, + parameters: [left : Nat, right : Nat], + statement: ((left <= 1) -> ((right <= 1) -> ((xorBit left (xorBit left right)) = right))), + proof: linear_arithmetic{definitions: [xorBit]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: rightParityBitExact, + parameters: [left : Nat, right : Nat], + statement: ((left <= 1) -> ((right <= 1) -> ((xorBit (xorBit left right) right) = left))), + proof: linear_arithmetic{definitions: [xorBit]}, + axioms: [Quot.sound, propext] +} + +definition{ + name: pairAllowed, + parameters: [ + leftIndex : Nat, + rightIndex : Nat, + manifestMatches : Bool, + fragmentsValid : Bool, + dependenciesPresent : Bool + ], + result: Bool, + body: ((leftIndex right + | Bit.One => (match right | Bit.Zero => (ctor Bit.One) | Bit.One => (ctor Bit.Zero))) +} + +definition{ + name: leftParity, + parameters: [blocks : BitBlocks], + result: BitBlocks, + body: (match blocks + | BitBlocks.End => (ctor BitBlocks.End) + | BitBlocks.More left right tail => (ctor BitBlocks.More left (xorCell left right) (leftParity tail))), + recursive_argument: blocks +} + +definition{ + name: rightParity, + parameters: [blocks : BitBlocks], + result: BitBlocks, + body: (match blocks + | BitBlocks.End => (ctor BitBlocks.End) + | BitBlocks.More left right tail => (ctor BitBlocks.More (xorCell left right) right (rightParity tail))), + recursive_argument: blocks +} + +theorem{ + name: leftParityInvolutive, + parameters: [blocks : BitBlocks], + statement: ((leftParity (leftParity blocks)) = blocks), + proof: induction{ + branches: [ + {proof: simplify{definitions: [leftParity]}, binders: [], constructor: End}, + { + proof: cases{ + branches: [ + { + proof: cases{ + branches: [ + { + proof: simplify{definitions: [hypothesis, leftParity, xorCell]}, + binders: [], + constructor: Zero + }, + { + proof: simplify{definitions: [hypothesis, leftParity, xorCell]}, + binders: [], + constructor: One + } + ], + scrutinee: right + }, + binders: [], + constructor: Zero + }, + { + proof: cases{ + branches: [ + { + proof: simplify{definitions: [hypothesis, leftParity, xorCell]}, + binders: [], + constructor: Zero + }, + { + proof: simplify{definitions: [hypothesis, leftParity, xorCell]}, + binders: [], + constructor: One + } + ], + scrutinee: right + }, + binders: [], + constructor: One + } + ], + scrutinee: left + }, + binders: [left, right, tail, hypothesis], + constructor: More + } + ], + scrutinee: blocks + }, + axioms: [propext] +} + +theorem{ + name: rightParityInvolutive, + parameters: [blocks : BitBlocks], + statement: ((rightParity (rightParity blocks)) = blocks), + proof: induction{ + branches: [ + {proof: simplify{definitions: [rightParity]}, binders: [], constructor: End}, + { + proof: cases{ + branches: [ + { + proof: cases{ + branches: [ + { + proof: simplify{definitions: [hypothesis, rightParity, xorCell]}, + binders: [], + constructor: Zero + }, + { + proof: simplify{definitions: [hypothesis, rightParity, xorCell]}, + binders: [], + constructor: One + } + ], + scrutinee: right + }, + binders: [], + constructor: Zero + }, + { + proof: cases{ + branches: [ + { + proof: simplify{definitions: [hypothesis, rightParity, xorCell]}, + binders: [], + constructor: Zero + }, + { + proof: simplify{definitions: [hypothesis, rightParity, xorCell]}, + binders: [], + constructor: One + } + ], + scrutinee: right + }, + binders: [], + constructor: One + } + ], + scrutinee: left + }, + binders: [left, right, tail, hypothesis], + constructor: More + } + ], + scrutinee: blocks + }, + axioms: [propext] +} + +inductive{ + name: PairSelection, + type_parameters: [], + parameters: [], + constructors: [ + {name: Systematic, fields: []}, + {name: LeftParity, fields: []}, + {name: RightParity, fields: []} + ] +} + +definition{ + name: encodeForPair, + parameters: [blocks : BitBlocks, selection : PairSelection], + result: BitBlocks, + body: (match selection + | PairSelection.Systematic => blocks + | PairSelection.LeftParity => (leftParity blocks) + | PairSelection.RightParity => (rightParity blocks)) +} + +definition{ + name: decodePair, + parameters: [available : BitBlocks, selection : PairSelection], + result: BitBlocks, + body: (match selection + | PairSelection.Systematic => available + | PairSelection.LeftParity => (leftParity available) + | PairSelection.RightParity => (rightParity available)) +} + +theorem{ + name: everyCompatiblePairRecoversFiniteBlocks, + parameters: [blocks : BitBlocks, selection : PairSelection], + statement: ((decodePair (encodeForPair blocks selection) selection) = blocks), + proof: cases{ + branches: [ + { + proof: simplify{definitions: [decodePair, encodeForPair]}, + binders: [], + constructor: Systematic + }, + { + proof: simplify{definitions: [decodePair, encodeForPair, leftParityInvolutive]}, + binders: [], + constructor: LeftParity + }, + { + proof: simplify{definitions: [decodePair, encodeForPair, rightParityInvolutive]}, + binders: [], + constructor: RightParity + } + ], + scrutinee: selection + }, + axioms: [propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Identity.lex.tex b/app/src/Stitch/Identity.lex.tex new file mode 100644 index 0000000..1218eb2 --- /dev/null +++ b/app/src/Stitch/Identity.lex.tex @@ -0,0 +1,75 @@ +\begin{lexlean}{Stitch.Identity} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch recoverable service model} +\begin{semanticmodule} +structure{ + name: Digest, + type_parameters: [], + parameters: [], + fields: [ + {name: w0, type: Nat}, + {name: w1, type: Nat}, + {name: w2, type: Nat}, + {name: w3, type: Nat}, + {name: w4, type: Nat}, + {name: w5, type: Nat}, + {name: w6, type: Nat}, + {name: w7, type: Nat} + ] +} + +structure{ + name: Object, + type_parameters: [], + parameters: [], + fields: [ + {name: digest, type: Digest}, + {name: canonicalBytes, type: Bytes}, + {name: byteLength, type: Nat} + ] +} + +structure{ + name: DigestObservation, + type_parameters: [], + parameters: [], + fields: [ + {name: expected, type: Digest}, + {name: observed, type: Digest}, + {name: domainMatches, type: Bool}, + {name: canonicalSerializationMatches, type: Bool} + ] +} + +definition{ + name: sameDigest, + parameters: [left : Digest, right : Digest], + result: Bool, + body: (((project left w0) =? (project right w0)) && (((project left w1) =? (project right w1)) && (((project left w2) =? (project right w2)) && (((project left w3) =? (project right w3)) && (((project left w4) =? (project right w4)) && (((project left w5) =? (project right w5)) && (((project left w6) =? (project right w6)) && ((project left w7) =? (project right w7))))))))) +} + +definition{ + name: digestWellFormed, + parameters: [digest : Digest], + result: Bool, + body: (((project digest w0) ((observationFresh observedAt expires now) = false)), + proof: linear_arithmetic{definitions: [observationFresh]}, + axioms: [Quot.sound, propext] +} + +definition{ + name: reachableObservation, + parameters: [observation : PeerObservation, observer : Nat, now : Nat], + result: Bool, + body: (((project observation observer) =? observer) && ((project observation authenticated) && ((observationFresh (project observation observedAt) (project observation expires) now) && (match (project observation reachability) + | Reachability.Unknown => false + | Reachability.Reachable => true + | Reachability.TimedOut => false + | Reachability.Conflicting => false)))) +} + +definition{ + name: updateObservation, + parameters: [current : PeerObservation, candidate : PeerObservation, now : Nat], + result: PeerObservation, + body: (if (acceptObservation current candidate now) then candidate else current) +} + +theorem{ + name: futureObservationRejected, + parameters: [observedAt : Nat, expires : Nat, now : Nat], + statement: ((now < observedAt) -> ((observationFresh observedAt expires now) = false)), + proof: linear_arithmetic{definitions: [observationFresh]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: acceptedObservationIsFresh, + parameters: [current : PeerObservation, candidate : PeerObservation, now : Nat], + statement: (((acceptObservation current candidate now) = true) -> (((project candidate observedAt) <= now) /\ (now < (project candidate expires)))), + proof: linear_arithmetic{definitions: [acceptObservation, observationFresh]}, + axioms: [Classical.choice, Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Pointer.lex.tex b/app/src/Stitch/Pointer.lex.tex new file mode 100644 index 0000000..c21fc6f --- /dev/null +++ b/app/src/Stitch/Pointer.lex.tex @@ -0,0 +1,183 @@ +\begin{lexlean}{Stitch.Pointer} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\importmodule{Stitch.Identity} +\title{Stitch recoverable service model} +\begin{semanticmodule} +structure{ + name: Authority, + type_parameters: [], + parameters: [], + fields: [ + {name: nameRoot, type: Stitch.Identity::Digest}, + {name: keyRoot, type: Stitch.Identity::Digest}, + {name: epoch, type: Nat} + ] +} + +structure{ + name: Pointer, + type_parameters: [], + parameters: [], + fields: [ + {name: nameRoot, type: Stitch.Identity::Digest}, + {name: authorityRoot, type: Stitch.Identity::Digest}, + {name: revision, type: Nat}, + {name: predecessor, type: Stitch.Identity::Digest}, + {name: objectRoot, type: Stitch.Identity::Digest}, + {name: transitionRoot, type: Stitch.Identity::Digest}, + {name: pointerRoot, type: Stitch.Identity::Digest}, + {name: notBefore, type: Nat}, + {name: expires, type: Nat}, + {name: signature, type: Bytes} + ] +} + +definition{ + name: successorAllowed, + parameters: [ + currentRevision : Nat, + nextRevision : Nat, + predecessorMatches : Bool, + authorityMatches : Bool, + signatureValid : Bool, + notBefore : Nat, + expires : Nat, + now : Nat + ], + result: Bool, + body: (authorityMatches && ((nextRevision =? (currentRevision + 1)) && (predecessorMatches && (signatureValid && ((notBefore <=? now) && (now ((restoreAllowed accepted scopeMatches digestMatches signatureValid notBefore expires now headPresent sameHead) = false)), + proof: linear_arithmetic{definitions: [restoreAllowed]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: successorStrictlyAdvances, + parameters: [ + currentRevision : Nat, + nextRevision : Nat, + predecessorMatches : Bool, + authorityMatches : Bool, + signatureValid : Bool, + notBefore : Nat, + expires : Nat, + now : Nat + ], + statement: (((successorAllowed currentRevision nextRevision predecessorMatches authorityMatches signatureValid notBefore expires now) = true) -> (currentRevision < nextRevision)), + proof: linear_arithmetic{definitions: [successorAllowed]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: wrongAuthorityRefused, + parameters: [ + currentRevision : Nat, + nextRevision : Nat, + predecessorMatches : Bool, + signatureValid : Bool, + notBefore : Nat, + expires : Nat, + now : Nat + ], + statement: ((successorAllowed currentRevision nextRevision predecessorMatches false signatureValid notBefore expires now) = false), + proof: reflexivity{} +} + +theorem{ + name: rollbackRefused, + parameters: [ + currentRevision : Nat, + nextRevision : Nat, + predecessorMatches : Bool, + authorityMatches : Bool, + signatureValid : Bool, + notBefore : Nat, + expires : Nat, + now : Nat + ], + statement: ((nextRevision <= currentRevision) -> ((successorAllowed currentRevision nextRevision predecessorMatches authorityMatches signatureValid notBefore expires now) = false)), + proof: linear_arithmetic{definitions: [successorAllowed]}, + axioms: [Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/PrismId.lex.tex b/app/src/Stitch/PrismId.lex.tex new file mode 100644 index 0000000..4414af8 --- /dev/null +++ b/app/src/Stitch/PrismId.lex.tex @@ -0,0 +1,428 @@ +\begin{lexlean}{Stitch.PrismId} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch recoverable service model} +\begin{semanticmodule} +definition{ + name: deviceMaySign, + parameters: [linked : Bool, revoked : Bool], + result: Bool, + body: (linked && (not revoked)) +} + +definition{ + name: mayAdminister, + parameters: [linked : Bool, revoked : Bool, delegate : Bool], + result: Bool, + body: ((deviceMaySign linked revoked) && (not delegate)) +} + +definition{ + name: bindAllowed, + parameters: [ + signerLinked : Bool, + signerRevoked : Bool, + signerDelegate : Bool, + signatureValid : Bool, + samePrism : Bool + ], + result: Bool, + body: ((mayAdminister signerLinked signerRevoked signerDelegate) && (signatureValid && samePrism)) +} + +definition{ + name: linkGate, + parameters: [userConfirmed : Bool, alreadyUsed : Bool, secretMatches : Bool, fresh : Bool], + result: Bool, + body: (userConfirmed && ((not alreadyUsed) && (secretMatches && fresh))) +} + +definition{ + name: linkOfferAccepted, + parameters: [ + userConfirmed : Bool, + alreadyUsed : Bool, + secretMatches : Bool, + expires : Nat, + now : Nat + ], + result: Bool, + body: (linkGate userConfirmed alreadyUsed secretMatches (now ((linkOfferAccepted userConfirmed alreadyUsed secretMatches expires now) = false)), + proof: linear_arithmetic{definitions: [linkGate, linkOfferAccepted]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: delegateNeverReceivesPrivateBoundary, + parameters: [], + statement: ((receivesPrivateBoundary true) = false), + proof: reflexivity{} +} + +theorem{ + name: delegateOutsideScopeRefused, + parameters: [], + statement: (forall (linked : Bool), (forall (revoked : Bool), ((actionAllowed linked revoked true false) = false))), + proof: decide{} +} + +theorem{ + name: revokedDeviceActionRefused, + parameters: [], + statement: (forall (linked : Bool), (forall (delegate : Bool), (forall (inScope : Bool), ((actionAllowed linked true delegate inScope) = false)))), + proof: decide{} +} + +theorem{ + name: replayedActionRefused, + parameters: [], + statement: (forall (audienceMatches : Bool), (forall (inWindow : Bool), ((actionGate audienceMatches false inWindow) = false))), + proof: decide{} +} + +theorem{ + name: wrongAudienceActionRefused, + parameters: [unseen : Bool, inWindow : Bool], + statement: ((actionGate false unseen inWindow) = false), + proof: reflexivity{} +} + +theorem{ + name: staleActionRefused, + parameters: [audienceMatches : Bool, unseen : Bool, issued : Nat, now : Nat, window : Nat], + statement: (((issued + window) < now) -> ((actionFresh audienceMatches unseen issued now window) = false)), + proof: linear_arithmetic{definitions: [actionFresh, actionGate]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: unattestedDeviceRefusedWhenRequired, + parameters: [], + statement: ((hostAdmitsDevice true false) = false), + proof: reflexivity{} +} + +theorem{ + name: staleBoundaryKeyRefused, + parameters: [keyEpoch : Nat, requiredEpoch : Nat], + statement: ((keyEpoch < requiredEpoch) -> ((boundaryKeyAdmitted keyEpoch requiredEpoch) = false)), + proof: linear_arithmetic{definitions: [boundaryKeyAdmitted]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: memberCannotRevokeRecovery, + parameters: [], + statement: (forall (signerRevokedByRecovery : Bool), ((revocationCounts false signerRevokedByRecovery true) = false)), + proof: decide{} +} + +theorem{ + name: revokedByRecoveryCannotRevoke, + parameters: [], + statement: (forall (signerRecovery : Bool), (forall (targetRecovery : Bool), ((revocationCounts signerRecovery true targetRecovery) = false))), + proof: decide{} +} + +theorem{ + name: memberCannotReplaceRecovery, + parameters: [], + statement: ((recoveryBindAllowed false true) = false), + proof: reflexivity{} +} + +theorem{ + name: belowThresholdRefused, + parameters: [threshold : Nat, collected : Nat], + statement: ((collected < threshold) -> ((thresholdMet threshold collected) = false)), + proof: linear_arithmetic{definitions: [thresholdMet]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: zeroThresholdRefused, + parameters: [collected : Nat], + statement: ((thresholdMet 0 collected) = false), + proof: reflexivity{} +} + +theorem{ + name: hardenedDeviceCannotShare, + parameters: [], + statement: ((mayShareBoundary false) = false), + proof: reflexivity{} +} + +theorem{ + name: postQuantumDowngradeRefused, + parameters: [], + statement: ((hybridWrapRequired true false) = false), + proof: reflexivity{} +} + +theorem{ + name: attestationForOtherKeyRefused, + parameters: [], + statement: (forall (verifiedHardware : Bool), ((attestationBinds verifiedHardware false) = false)), + proof: decide{} +} + +theorem{ + name: singleIdentityBoundaryPrivate, + parameters: [], + statement: ((boundaryShared 1) = false), + proof: reflexivity{} +} + +theorem{ + name: twoIdentitiesMakeBoundaryShared, + parameters: [identities : Nat], + statement: ((2 <= identities) -> ((boundaryShared identities) = true)), + proof: linear_arithmetic{definitions: [boundaryShared]}, + axioms: [propext] +} + +theorem{ + name: nonMemberSeesOnlyPublished, + parameters: [], + statement: ((boundaryVisibleTo false false) = false), + proof: reflexivity{} +} + +theorem{ + name: classicalSignatureAlwaysRequired, + parameters: [pqAdvertised : Bool, verifierHasPq : Bool, pqValid : Bool], + statement: ((hybridSignatureAccepted false pqAdvertised verifierHasPq pqValid) = false), + proof: reflexivity{} +} + +theorem{ + name: postQuantumSignatureStripRefused, + parameters: [], + statement: (forall (classicalValid : Bool), ((hybridSignatureAccepted classicalValid true true false) = false)), + proof: decide{} +} + +theorem{ + name: unverifiedApprovalRefused, + parameters: [], + statement: (forall (userPresent : Bool), (forall (challengeMatches : Bool), (forall (assertionValid : Bool), ((presenceSatisfied true userPresent false challengeMatches assertionValid) = false)))), + proof: decide{} +} + +theorem{ + name: approvalOfOtherActionRefused, + parameters: [], + statement: (forall (userPresent : Bool), (forall (userVerified : Bool), (forall (assertionValid : Bool), ((presenceSatisfied true userPresent userVerified false assertionValid) = false)))), + proof: decide{} +} + +theorem{ + name: forgedApprovalRefused, + parameters: [], + statement: (forall (userPresent : Bool), (forall (userVerified : Bool), (forall (challengeMatches : Bool), ((presenceSatisfied true userPresent userVerified challengeMatches false) = false)))), + proof: decide{} +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Recovery.lex.tex b/app/src/Stitch/Recovery.lex.tex new file mode 100644 index 0000000..ef53747 --- /dev/null +++ b/app/src/Stitch/Recovery.lex.tex @@ -0,0 +1,100 @@ +\begin{lexlean}{Stitch.Recovery} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch recoverable service model} +\begin{semanticmodule} +structure{ + name: Limits, + type_parameters: [], + parameters: [], + fields: [ + {name: wireBytes, type: Nat}, + {name: entries, type: Nat}, + {name: objectBytes, type: Nat}, + {name: replaySteps, type: Nat} + ] +} + +structure{ + name: State, + type_parameters: [], + parameters: [], + fields: [ + {name: root, type: Bytes}, + {name: generation, type: Nat}, + {name: wireBytes, type: Nat}, + {name: entries, type: Nat}, + {name: replaySteps, type: Nat} + ] +} + +definition{ + name: admitted, + parameters: [bounds : Limits, current : State, candidate : State, verified : Bool], + result: Bool, + body: (verified && (((project current generation) =? (project candidate generation)) && (((project candidate wireBytes) <=? (project bounds wireBytes)) && (((project candidate entries) <=? (project bounds entries)) && ((project candidate replaySteps) <=? (project bounds replaySteps)))))) +} + +definition{ + name: commit, + parameters: [bounds : Limits, current : State, candidate : State, verified : Bool], + result: State, + body: (if (admitted bounds current candidate verified) then (record State {root := (project candidate root), generation := ((project current generation) + 1), wireBytes := (project candidate wireBytes), entries := (project candidate entries), replaySteps := (project candidate replaySteps)}) else current) +} + +definition{ + name: anchorAllowed, + parameters: [ + suppliedDigest : Bytes, + expectedDigest : Bytes, + validFrom : Nat, + validUntil : Nat, + now : Nat, + retainedRevision : Nat, + candidateRevision : Nat, + sameRetained : Bool + ], + result: Bool, + body: ((prim equal suppliedDigest expectedDigest : Bool) && ((validFrom <=? now) && ((now ((progressAllowed retained candidate sameIdentity linked) = false)), + proof: linear_arithmetic{definitions: [progressAllowed]}, + axioms: [Quot.sound, propext] +} + +theorem{ + name: unverifiedImportPreservesState, + parameters: [bounds : Limits, current : State, candidate : State], + statement: ((commit bounds current candidate false) = current), + proof: reflexivity{} +} + +theorem{ + name: acceptedCandidateWithinBounds, + parameters: [bounds : Limits, current : State, candidate : State, verified : Bool], + statement: (((admitted bounds current candidate verified) = true) -> (((project candidate wireBytes) <= (project bounds wireBytes)) /\ (((project candidate entries) <= (project bounds entries)) /\ ((project candidate replaySteps) <= (project bounds replaySteps))))), + proof: linear_arithmetic{definitions: [admitted]}, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: staleGenerationRefused, + parameters: [bounds : Limits, current : State, candidate : State, verified : Bool], + statement: (((project candidate generation) < (project current generation)) -> ((admitted bounds current candidate verified) = false)), + proof: linear_arithmetic{definitions: [admitted]}, + axioms: [Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/Relay.lex.tex b/app/src/Stitch/Relay.lex.tex new file mode 100644 index 0000000..99a45d3 --- /dev/null +++ b/app/src/Stitch/Relay.lex.tex @@ -0,0 +1,244 @@ +\begin{lexlean}{Stitch.Relay} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch recoverable service model} +\begin{semanticmodule} +structure{ + name: Limits, + type_parameters: [], + parameters: [], + fields: [ + {name: wireBytes, type: Nat}, + {name: chunkBytes, type: Nat}, + {name: messageBytes, type: Nat}, + {name: frames, type: Nat}, + {name: entries, type: Nat}, + {name: retainedBytes, type: Nat}, + {name: tombstones, type: Nat}, + {name: assemblyAge, type: Nat}, + {name: futureSkew, type: Nat}, + {name: requestTimeout, type: Nat} + ] +} + +definition{ + name: limits, + parameters: [], + result: Limits, + body: (record Limits {wireBytes := 4096, chunkBytes := 2700, messageBytes := 524288, frames := 256, entries := 16, retainedBytes := 2097152, tombstones := 256, assemblyAge := 30000, futureSkew := 5000, requestTimeout := 30000}) +} + +definition{name: signalLifetime, parameters: [], result: Nat, body: 60000} + +definition{name: warmLifetime, parameters: [], result: Nat, body: 1800000} + +structure{ + name: Capacity, + type_parameters: [], + parameters: [], + fields: [ + {name: entries, type: Nat}, + {name: retainedBytes, type: Nat}, + {name: tombstones, type: Nat} + ] +} + +structure{ + name: Identity, + type_parameters: [], + parameters: [], + fields: [ + {name: channel, type: Bytes}, + {name: session, type: Bytes}, + {name: digest, type: Bytes}, + {name: purpose, type: Bytes}, + {name: created, type: Nat}, + {name: messageBytes, type: Nat}, + {name: frames, type: Nat} + ] +} + +structure{ + name: Frame, + type_parameters: [], + parameters: [], + fields: [ + {name: identity, type: Identity}, + {name: index, type: Nat}, + {name: payloadBytes, type: Nat}, + {name: wireBytes, type: Nat} + ] +} + +structure{ + name: Assembly, + type_parameters: [], + parameters: [], + fields: [ + {name: identity, type: Identity}, + {name: receivedFrames, type: Nat}, + {name: receivedBytes, type: Nat}, + {name: started, type: Nat}, + {name: last, type: Nat}, + {name: verifying, type: Bool} + ] +} + +definition{ + name: sameIdentity, + parameters: [left : Identity, right : Identity], + result: Bool, + body: ((prim equal (project left channel) (project right channel) : Bool) && ((prim equal (project left session) (project right session) : Bool) && ((prim equal (project left digest) (project right digest) : Bool) && ((prim equal (project left purpose) (project right purpose) : Bool) && (((project left created) =? (project right created)) && (((project left messageBytes) =? (project right messageBytes)) && ((project left frames) =? (project right frames)))))))) +} + +definition{ + name: frameAllowed, + parameters: [ + bounds : Limits, + frame : Frame, + channel : Bytes, + purpose : Bytes, + wallNow : Nat, + lifetime : Nat + ], + result: Bool, + body: (let identity : Identity := (project frame identity); ((prim equal (project identity channel) channel : Bool) && ((prim equal (project identity purpose) purpose : Bool) && ((0 false + | List.cons head tail => (if (Stitch.Identity::sameDigest (project head actionId) actionId) then (((project head epoch) =? epoch) && (not (project head settled))) else (reservationActive tail actionId epoch))), + recursive_argument: reservations +} + +definition{ + name: completionSafetyGuard, + parameters: [ledger : Stitch.Budget::Ledger, now : Nat], + result: Bool, + body: ((Stitch.Budget::ledgerValid ledger) && (((project (project ledger budget) last) <=? now) && (now (0 = 0)))))), + proof: decide{} +} + +theorem{ + name: ledgerClockView, + parameters: [ledger : Stitch.Budget::Ledger], + statement: ((Stitch.Budget::ledgerValid ledger) = ((ledgerTime (project ledger budget)) && (ledgerHistory ledger))), + proof: simplify{ + definitions: [clockViewGrouping, ledgerHistory, ledgerTime, Stitch.Budget::ledgerValid] + }, + axioms: [propext] +} + +theorem{ + name: completionHistory, + parameters: [ledger : Stitch.Budget::Ledger, now : Nat], + statement: ((ledgerHistory (completionLedger ledger now)) = (ledgerHistory ledger)), + proof: reflexivity{} +} + +theorem{ + name: completionTime, + parameters: [ledger : Stitch.Budget::Ledger, now : Nat], + statement: ((ledgerTime (project (completionLedger ledger now) budget)) = (((project (project ledger budget) start) <=? now) && (now (((((project (project ledger budget) last) <=? now) && (now ((ledgerTime (project (completionLedger ledger now) budget)) = true))) <-> (0 = 0)), + proof: constructor{ + branches: [ + linear_arithmetic{}, + linear_arithmetic{definitions: [completionBudget, completionLedger, ledgerTime]} + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: historyPreservedFact, + parameters: [], + statement: (forall (oldTime : Bool), (forall (newTime : Bool), (forall (history : Bool), (forall (extra : Bool), (((oldTime = true) -> ((extra = true) -> (newTime = true))) -> (((((oldTime && history) && extra) = true) -> ((newTime && history) = true)) <-> (0 = 0))))))), + proof: decide{} +} + +theorem{ + name: completionLedgerValidityFact, + parameters: [ledger : Stitch.Budget::Ledger, now : Nat], + statement: ((((completionSafetyGuard ledger now) = true) -> ((Stitch.Budget::ledgerValid (completionLedger ledger now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + clockAdvanceFact, + completionHistory, + completionSafetyGuard, + historyPreservedFact, + ledgerClockView + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +definition{ + name: choosePlacement, + parameters: [ + selection : Stitch.Budget::Selection, + whenTrue : Stitch.Custody::Placement, + whenFalse : Stitch.Custody::Placement + ], + result: Stitch.Custody::Placement, + body: (match selection + | Stitch.Budget::Selection.Reject => whenFalse + | Stitch.Budget::Selection.Accept => whenTrue) +} + +theorem{ + name: ledgerPlacementValiditySelect, + parameters: [ + selection : Stitch.Budget::Selection, + whenTrue : Stitch.Budget::Ledger, + whenFalse : Stitch.Budget::Ledger, + placement : Stitch.Custody::Placement + ], + statement: ((ledgerPlacementValid (Stitch.Budget::selectLedger selection whenTrue whenFalse) placement) = (Stitch.Budget::selectBool selection (ledgerPlacementValid whenTrue placement) (ledgerPlacementValid whenFalse placement))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: productValiditySelect, + parameters: [ + selection : Stitch.Budget::Selection, + trueLedger : Stitch.Budget::Ledger, + falseLedger : Stitch.Budget::Ledger, + truePlacement : Stitch.Custody::Placement, + falsePlacement : Stitch.Custody::Placement + ], + statement: ((ledgerPlacementValid (Stitch.Budget::selectLedger selection trueLedger falseLedger) (choosePlacement selection truePlacement falsePlacement)) = (Stitch.Budget::selectBool selection (ledgerPlacementValid trueLedger truePlacement) (ledgerPlacementValid falseLedger falsePlacement))), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: completionSelectionReserved, + parameters: [selection : Stitch.Budget::Selection, ledger : Stitch.Budget::Ledger, now : Nat], + statement: ((project (project (Stitch.Budget::selectLedger selection (completionLedger ledger now) ledger) budget) reserved) = (project (project ledger budget) reserved)), + proof: cases{ + branches: [ + {proof: reflexivity{}, binders: [], constructor: Reject}, + {proof: reflexivity{}, binders: [], constructor: Accept} + ], + scrutinee: selection + } +} + +theorem{ + name: reservationClock, + parameters: [ + ledger : Stitch.Budget::Ledger, + actionId : Stitch.Identity::Digest, + cost : Stitch.Budget::Resources, + now : Nat + ], + statement: ((project (project (Stitch.Budget::reservationCandidate ledger actionId cost now) budget) last) = now), + proof: reflexivity{} +} + +theorem{ + name: completionClock, + parameters: [ledger : Stitch.Budget::Ledger, now : Nat], + statement: ((project (project (completionLedger ledger now) budget) last) = now), + proof: reflexivity{} +} + +theorem{ + name: guardedProductPreservationFact, + parameters: [], + statement: (forall (before : Bool), (forall (guard : Bool), (forall (candidate : Bool), (((guard = true) -> (candidate = true)) -> (((before = true) -> ((Stitch.Budget::selectBool (Stitch.Budget::selectionFromBool guard) candidate before) = true)) <-> (0 = 0)))))), + proof: decide{} +} + +theorem{ + name: requestAdmissionProductFact, + parameters: [], + statement: (forall (live : Bool), (forall (reserve : Bool), (forall (rest : Bool), (forall (next : Bool), (((reserve = true) -> (next = true)) -> ((((live && (reserve && rest)) = true) -> ((next && live) = true)) <-> (0 = 0))))))), + proof: decide{} +} + +theorem{ + name: weakenAdmissionFact, + parameters: [], + statement: (forall (before : Bool), (forall (after : Bool), (forall (extra : Bool), (((before = true) -> (after = true)) -> ((((before && extra) = true) -> (after = true)) <-> (0 = 0)))))), + proof: decide{} +} + +theorem{ + name: requestMigrationCandidateValidityFact, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + cost : Stitch.Budget::Resources, + now : Nat + ], + statement: ((((requestMigrationAllowed state transfer cost now) = true) -> ((ledgerPlacementValid (Stitch.Budget::reservationCandidate (project state ledger) (project transfer requestRoot) cost now) (project state placement)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + ledgerPlacementValid, + requestAdmissionProductFact, + requestMigrationAllowed, + reservationClock, + Stitch.Budget::reservationCandidateGuarantee + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +definition{ + name: migrationCandidateValidity, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + receipt : Stitch.Custody::Receipt, + fragment : Stitch.Fragments::Fragment, + integrity : Stitch.Custody::FragmentIntegrityObservation, + now : Nat + ], + result: Bool, + body: (ledgerPlacementValid (completionLedger (project state ledger) now) (Stitch.Custody::migrate (project state placement) (Stitch.Custody::prepareCompletion (project state placement) transfer receipt fragment integrity now) now)) +} + +theorem{ + name: migrationCandidateValidityFact, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + receipt : Stitch.Custody::Receipt, + fragment : Stitch.Fragments::Fragment, + integrity : Stitch.Custody::FragmentIntegrityObservation, + now : Nat + ], + statement: ((((completeMigrationAllowed state transfer receipt fragment integrity now) = true) -> ((ledgerPlacementValid (completionLedger (project state ledger) now) (Stitch.Custody::migrate (project state placement) (Stitch.Custody::prepareCompletion (project state placement) transfer receipt fragment integrity now) now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + completeMigrationAllowed, + completionClock, + completionLedgerValidityFact, + ledgerPlacementValid, + weakenAdmissionFact, + Stitch.Custody::conjunctionPreservationFact, + Stitch.Custody::typedMigrationPreservesLiveRecoveryAtObservationTimeFact + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +definition{ + name: applyMigration, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + receipt : Stitch.Custody::Receipt, + fragment : Stitch.Fragments::Fragment, + integrity : Stitch.Custody::FragmentIntegrityObservation, + now : Nat + ], + result: State, + body: (let allowed : Bool := (completeMigrationAllowed state transfer receipt fragment integrity now); (let completed : Stitch.Custody::Transfer := (Stitch.Custody::prepareCompletion (project state placement) transfer receipt fragment integrity now); (let selection : Stitch.Budget::Selection := (Stitch.Budget::selectionFromBool allowed); (record State {objects := (project state objects), encodings := (project state encodings), placement := (choosePlacement selection (Stitch.Custody::migrate (project state placement) completed now) (project state placement)), peers := (project state peers), pointers := (project state pointers), jobs := (project state jobs), checkpoints := (project state checkpoints), ledger := (Stitch.Budget::selectLedger selection (completionLedger (project state ledger) now) (project state ledger)), evidence := (project state evidence), transfers := (if allowed then (Stitch.Custody::recordCompletion (project state transfers) completed) else (project state transfers))})))) +} + +theorem{ + name: migrationRequestDoesNotEstablishCustody, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + cost : Stitch.Budget::Resources, + now : Nat + ], + statement: ((project (requestMigration state transfer cost now) placement) = (project state placement)), + proof: reflexivity{} +} + +theorem{ + name: migrationRequestPreservesProductInvariantFact, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + cost : Stitch.Budget::Resources, + now : Nat + ], + statement: ((((valid state) = true) -> ((valid (requestMigration state transfer cost now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + guardedProductPreservationFact, + ledgerPlacementValiditySelect, + requestMigration, + requestMigrationCandidateValidityFact, + valid + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: migrationRequestPreservesProductInvariant, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + cost : Stitch.Budget::Resources, + now : Nat + ], + statement: (((valid state) = true) -> ((valid (requestMigration state transfer cost now)) = true)), + proof: simplify{definitions: [migrationRequestPreservesProductInvariantFact]}, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: migrationPreservesProductInvariantFact, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + receipt : Stitch.Custody::Receipt, + fragment : Stitch.Fragments::Fragment, + integrity : Stitch.Custody::FragmentIntegrityObservation, + now : Nat + ], + statement: ((((valid state) = true) -> ((valid (applyMigration state transfer receipt fragment integrity now)) = true)) <-> (0 = 0)), + proof: simplify{ + definitions: [ + applyMigration, + guardedProductPreservationFact, + migrationCandidateValidityFact, + productValiditySelect, + valid + ] + }, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: migrationPreservesProductInvariant, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + receipt : Stitch.Custody::Receipt, + fragment : Stitch.Fragments::Fragment, + integrity : Stitch.Custody::FragmentIntegrityObservation, + now : Nat + ], + statement: (((valid state) = true) -> ((valid (applyMigration state transfer receipt fragment integrity now)) = true)), + proof: simplify{definitions: [migrationPreservesProductInvariantFact]}, + axioms: [Classical.choice, Quot.sound, propext] +} + +theorem{ + name: migrationCompletionDoesNotRefundBudget, + parameters: [ + state : State, + transfer : Stitch.Custody::Transfer, + receipt : Stitch.Custody::Receipt, + fragment : Stitch.Fragments::Fragment, + integrity : Stitch.Custody::FragmentIntegrityObservation, + now : Nat + ], + statement: ((project (project (project (applyMigration state transfer receipt fragment integrity now) ledger) budget) reserved) = (project (project (project state ledger) budget) reserved)), + proof: apply{ + arguments: [ + (Stitch.Budget::selectionFromBool (completeMigrationAllowed state transfer receipt fragment integrity now)), + (project state ledger), + now + ], + theorem: completionSelectionReserved + } +} + +definition{ + name: settleActionAllowed, + parameters: [state : State, observation : Stitch.Budget::SettlementObservation, now : Nat], + result: Bool, + body: ((Stitch.Custody::recoverableAt (project state placement) now) && (Stitch.Budget::settleLedgerAllowed (project state ledger) observation now)) +} + +definition{ + name: settleAction, + parameters: [state : State, observation : Stitch.Budget::SettlementObservation, now : Nat], + result: State, + body: (record State {objects := (project state objects), encodings := (project state encodings), placement := (project state placement), peers := (project state peers), pointers := (project state pointers), jobs := (project state jobs), checkpoints := (project state checkpoints), ledger := (if (settleActionAllowed state observation now) then (Stitch.Budget::settleLedger (project state ledger) observation now) else (project state ledger)), evidence := (project state evidence), transfers := (project state transfers)}) +} + +theorem{ + name: settlementDoesNotEstablishCustody, + parameters: [state : State, observation : Stitch.Budget::SettlementObservation, now : Nat], + statement: ((project (settleAction state observation now) placement) = (project state placement)), + proof: reflexivity{} +} +\end{semanticmodule} +\end{lexlean} diff --git a/app/src/Stitch/VmAdministration.lex.tex b/app/src/Stitch/VmAdministration.lex.tex new file mode 100644 index 0000000..fafef10 --- /dev/null +++ b/app/src/Stitch/VmAdministration.lex.tex @@ -0,0 +1,137 @@ +\begin{lexlean}{Stitch.VmAdministration} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{stitch.domain@1.0.0} +\title{Stitch recoverable service model} +\begin{semanticmodule} +definition{ + name: shareAllowed, + parameters: [granted : Bool, current : Bool, blocked : Bool], + result: Bool, + body: (granted && (current && (not blocked))) +} + +definition{ + name: ethernetAllowed, + parameters: [ + granted : Bool, + ready : Bool, + current : Bool, + open : Bool, + valid : Bool, + blocked : Bool + ], + result: Bool, + body: (granted && (ready && (current && (open && (valid && (not blocked)))))) +} + +definition{ + name: commandAllowed, + parameters: [ready : Bool, busy : Bool, blocked : Bool, capacity : Bool], + result: Bool, + body: (ready && ((not busy) && ((not blocked) && capacity))) +} + +definition{ + name: observationAllowed, + parameters: [ + generation : Nat, + captured : Nat, + sameInstance : Bool, + dispatched : Bool, + blocked : Bool + ], + result: Bool, + body: ((generation =? captured) && (sameInstance && (dispatched && (not blocked)))) +} + +definition{ + name: administrationAllowed, + parameters: [instancePresent : Bool, busy : Bool], + result: Bool, + body: (instancePresent && (not busy)) +} + +definition{ + name: forgetAllowed, + parameters: [present : Bool, resolved : Bool, busy : Bool], + result: Bool, + body: (present && (resolved && (not busy))) +} + +definition{ + name: allocationAllowed, + parameters: [used : Nat, requested : Nat, limit : Nat], + result: Bool, + body: ((used + requested) <=? limit) +} + +definition{ + name: metadataAllowed, + parameters: [used : Nat, limit : Nat], + result: Bool, + body: (used 0 + | Option.some byte => (prim to_nat byte : Nat)), + axioms: [Quot.sound, propext] +} + +definition{ + name: unsignedBE, + parameters: [request : Bytes, offset : Nat, remaining : Nat, accumulated : Nat], + result: Nat, + body: (match remaining + | Nat.zero => accumulated + | Nat.succ rest => (unsignedBE request (offset + 1) rest ((prim multiply accumulated 256 : Nat) + (byteNat request offset)))), + axioms: [Quot.sound, propext], + recursive_argument: remaining +} + +definition{ + name: flag, + parameters: [request : Bytes, offset : Nat], + result: Bool, + body: ((byteNat request offset) =? 1), + axioms: [Quot.sound, propext] +} + +definition{ + name: flagsCanonical, + parameters: [request : Bytes, offset : Nat, remaining : Nat], + result: Bool, + body: (match remaining + | Nat.zero => true + | Nat.succ rest => (((byteNat request offset) <=? 1) && (flagsCanonical request (offset + 1) rest))), + axioms: [Quot.sound, propext], + recursive_argument: remaining +} + +definition{ + name: verdict, + parameters: [allowed : Bool], + result: Bytes, + body: (if allowed then (prim utf8_encode "admit" : Bytes) else (prim utf8_encode "refuse" : Bytes)) +} + +definition{ + name: decimalDigit, + parameters: [value : Nat], + result: Bytes, + body: (if (value =? 0) then 0x30 else (if (value =? 1) then 0x31 else (if (value =? 2) then 0x32 else (if (value =? 3) then 0x33 else (if (value =? 4) then 0x34 else (if (value =? 5) then 0x35 else (if (value =? 6) then 0x36 else (if (value =? 7) then 0x37 else (if (value =? 8) then 0x38 else 0x39))))))))) +} + +definition{ + name: decimalBytes, + parameters: [value : Nat, remaining : Nat], + result: Bytes, + body: (match remaining + | Nat.zero => 0x + | Nat.succ rest => (if (value /lexlean.toml lock`, then `build --all`, then `verify --all`. Only temporary candidate locks/output may change. Preserve original source bytes and compare their hashes. +3. Obtain runtime `.lean` sources emitted by that candidate, not from the old SDK or by text patching. In this rehearsal they were copied unchanged from the running verifier's `.lexlean/verified/.staging-*/lean-src` workspace before cleanup; the verification was then required to finish successfully. Stitch's snapshot contains all 25 generated app modules and the three emitted runtime modules. Template's three generated modules came from its build tree; its sole Portable runtime was reused byte-for-byte from the same candidate's emitted runtime. The per-file hashes are in each `generated-native-inputs.json`. +4. Stage those exact generated files in a new native workspace with the accompanying `lakefile.toml`. No `.lake` cache is copied. Run `LEAN_NUM_THREADS=2 lake --verbose build PrismGenerated` with the actual pinned Lake executable on PATH and a 600-second process bound. Both configs use `moreLeanArgs = ["-j2"]`; all native roots are explicit. The logs retain emitted `lean ... -c` commands as evidence that this was native C emission, not an object-only shortcut. +5. Compare exit status, outputs, source provenance, and the resulting evidence with this report. A new compiler or changed source requires its own result; these attestations must not be reused for other inputs. + +No runtime was edited, no Laws import was removed, and no kernel or policy check was disabled. Logs contain temporary diagnostic paths; no full duplicate source tree or binary is included here. + +## Remaining acceptance boundary + +This rehearsal uses the real proposed compiler and demonstrates that it removes the previously observed native stall on these inputs. It does not run the absent local `prismpm` executable, prove complete SDK compatibility, replace the repository's unchanged artifact/vector gate, or qualify external browser/provider/VM behavior. LexLean's full acceptance and the SDK owner's compiler-pair/immutable-artifact qualification remain separate requirements. Track [LexLean #465 / PR #466](https://github.com/UOR-Foundation/LexLean/pull/466) and the existing [PrismPM SDK owner coordination](https://github.com/UOR-Foundation/PrismPM/issues/194#issuecomment-6780585108). Published tags remain untouched. + +## Updated placement-source rehearsal + +The later source checkpoint `c99dc0d74d8b0f1c036df1aff18cc047b3bf5c1a` adds the placement declarations while retaining 25 app modules. Its separate evidence is in `stitch-placement/`; the original `stitch/` result above remains scoped to its earlier input. + +All 25 source files were compared against this exact commit. Actual candidate `lock` and `build --all` ran only in an isolated exported app tree, yielding build `0ad014252e6f1ff6af86aad9d33e66b760cf38724c1fe8d25cd2dcb4cb3859d9`. The 25 freshly generated app modules and the three unchanged runtime modules emitted by the same candidate compiler were staged in a fresh native directory. The unchanged native command/configuration passed all 30 jobs with exit 0 in 16.093 seconds under the same 600-second bound. + +Only affected candidate generation and cold native compilation were repeated. Full candidate verification and the unchanged Template rehearsal were not repeated, so the earlier candidate attestation must not be attributed to this new source. The accepted-pinned source proof is recorded separately by the project; this diagnostic does not replace it or whole-SDK qualification. No accepted lock was modified. diff --git a/docs/evidence/native-candidate-466/SHA256SUMS b/docs/evidence/native-candidate-466/SHA256SUMS new file mode 100644 index 0000000..58bc0b1 --- /dev/null +++ b/docs/evidence/native-candidate-466/SHA256SUMS @@ -0,0 +1,33 @@ +53fbb8bf98b02ef293c49195ec2a26a1b58717a76dea9f07fe307ad890064ec9 README.md +2c11cc903ada3522d60681b2a0afbe22ccd7d5267cca78300654ca6ac688fa53 compiler/README.txt +4be6e17d2e2cc720e42cae9456ba3a7f4cd4526e0bd1c43526813c9fb4cae48b compiler/artifact.json +8e3538e0ab5f81a3ee04927d8838c8c674e0e112838b4b3ce87ec218143276af compiler/lean-toolchain +c8a20b27c959a259477cf5176ac00f36f9eb94f71bbc68b6745e9c2159f20970 compiler/lean-version.txt +108892b177299a457cd3dfc9058c52abdf1fd79172c43c4020ea817f4bed61c9 compiler/lexlean.sha256 +4ae64ac5dc4f595ef8ffd63e4b48231bd8ba972a949e5eac0182257e8408921f compiler/rt03-success.txt +7ed1e0ac881493fd6dbbe3ce96c5f743f933dda86d08654d1d69cdcc242c205d compiler/rt03.log +24a5037a8f0a264369ef37bb46e019ade6c524beaead1c28f77a429f856a066b compiler/rust-toolchain.toml +b2bdf493bcf6d1dc55181a0efc2774b6d9cf7bf5c8dcc5bed592c994b2ad38c4 compiler/rust-version.txt +de9ccef885b037ae49c80d4796c10d6799e6e199bf0b419bc85a9305e4c113bd compiler/source-commit.txt +f34bb2dc2662961e6f2978f459a851bf1bda81000e7ee24e9f1e4c0b9a409295 compiler/source-tree.txt +d3b733785f18a99c6c0fc1136d95440e31b3985880d73d660d60cba6c604eed3 stitch/build.log +56a22b9240738adea4258695fd44713aa30123778eec3f41d37fdf963c7250c0 stitch/generated-native-inputs.json +39ffa560a90f946f8eb06470336eaa6e04b2f2bc4e1df1fc48748f58fcf02430 stitch/lakefile.toml +f6bd0e7353ce6bf0e9379cbb699ac0638d64bc4f593beae1b06a232007568182 stitch/native-result.json +2055e63823a3b8ee792d505c141a8838bab25d511a84a7d6c0a6a031edc29d4f stitch/native.log +56c8f918b8ee1f4ef4151a7bf67526186bce4eabbf9d97104379ebd05dd20d63 stitch/remote-app-comparison.json +fa387bc7599aac2b77405bb6e68addc6f577538386ed812d3c493b403246f15d stitch/source-provenance.json +9dd1cf6293306829b0d7983531417ec7e216b7ece8c2baa32b1df33a12702743 stitch/verify.log +f031f036a83aec6a519748edb9b05f74bedf26fb67ef4f9194af86ed44638748 stitch-placement/build.log +1c945d16dcb9cf3974a94244ff46fef923b8526e7988869af24a5bb90bd55406 stitch-placement/generated-native-inputs.json +39ffa560a90f946f8eb06470336eaa6e04b2f2bc4e1df1fc48748f58fcf02430 stitch-placement/lakefile.toml +d36093311fa7e1a54ea40e5f8d2179a7424b05bef40ef27d309cdb36c1b7ef8a stitch-placement/native-result.json +64532247e7c18692438f6bc085ca479683cbb7999ce6ab91998fa0e2d9ab1f91 stitch-placement/native.log +e76c0f14afe57cc134a22244be871c493397750faa53da28675c339a42da330e stitch-placement/source-provenance.json +520a9b41e0925ab3429c98df99ab767f9e63846b90a8a4b4c4bac00871fb7076 template/build.log +2d7484d7290810bcb09824c6ea6d866ba8dee0bb15459e7a7b08d1b8baa056a8 template/generated-native-inputs.json +9ddc8f1d505f324a5e882683c3f62ac98568d3808d66d855921565a034f8baec template/lakefile.toml +c783d874b3b8352220ef6d20ce20122fde6af979d89812b58c0df8a6a3e0bb7e template/native-result.json +992722340b1cd248d607dc556620e978123341cdb7f720ed919a7ed5e20696af template/native.log +ef2685deccfa24a2087cecabb137af37b7dc3e15d6e82235b99dd6a53e846eef template/source-provenance.json +2863faed2cb0fe32bb71f495b594963cbe2f525eba7d08ad6449637a8e5de804 template/verify.log diff --git a/docs/evidence/native-candidate-466/compiler/README.txt b/docs/evidence/native-candidate-466/compiler/README.txt new file mode 100644 index 0000000..3009038 --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/README.txt @@ -0,0 +1 @@ +DIAGNOSTIC ONLY. Not a released compiler, qualified SDK, or acceptance substitute. Source is PR466 cc5561203. No product gate has been weakened. RT-03 result and source provenance must accompany any rehearsal. diff --git a/docs/evidence/native-candidate-466/compiler/artifact.json b/docs/evidence/native-candidate-466/compiler/artifact.json new file mode 100644 index 0000000..ce15c51 --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/artifact.json @@ -0,0 +1,11 @@ +{ + "repository": "UOR-Foundation/LexLean", + "pull_request": 466, + "run_id": 42910816795, + "artifact_id": 13807497041, + "name": "native-candidate-cc5561203-diagnostic-only", + "zip_sha256": "36c696b3ef8c6640b3ed33f058577494ab8a7871931c565e1135dd27add22755", + "binary_sha256": "05ed3b3da7390aa8250288841cbe6baecc20ef28e96249df3d7682b8a51a4cfa", + "expires_at": "2026-11-17T22:06:31Z", + "qualified_sdk": false +} diff --git a/docs/evidence/native-candidate-466/compiler/lean-toolchain b/docs/evidence/native-candidate-466/compiler/lean-toolchain new file mode 100644 index 0000000..2b61957 --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/lean-toolchain @@ -0,0 +1 @@ +leanprover/lean4:v4.32.1 diff --git a/docs/evidence/native-candidate-466/compiler/lean-version.txt b/docs/evidence/native-candidate-466/compiler/lean-version.txt new file mode 100644 index 0000000..63c062a --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/lean-version.txt @@ -0,0 +1 @@ +Lean (version 4.32.1, x86_64-unknown-linux-gnu, commit f054605aea4b840552cca2e725580bffd1e1b704, Release) diff --git a/docs/evidence/native-candidate-466/compiler/lexlean.sha256 b/docs/evidence/native-candidate-466/compiler/lexlean.sha256 new file mode 100644 index 0000000..2aa9294 --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/lexlean.sha256 @@ -0,0 +1 @@ +05ed3b3da7390aa8250288841cbe6baecc20ef28e96249df3d7682b8a51a4cfa diagnostic/lexlean diff --git a/docs/evidence/native-candidate-466/compiler/rt03-success.txt b/docs/evidence/native-candidate-466/compiler/rt03-success.txt new file mode 100644 index 0000000..eb3a1df --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/rt03-success.txt @@ -0,0 +1 @@ +RT-03 passed on the recorded source and toolchains. diff --git a/docs/evidence/native-candidate-466/compiler/rt03.log b/docs/evidence/native-candidate-466/compiler/rt03.log new file mode 100644 index 0000000..f8bc904 --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/rt03.log @@ -0,0 +1,11 @@ + Compiling repo-model v0.4.0 (/home/runner/work/LexLean/LexLean/crates/model) + Compiling repo-conformance v0.4.0 (/home/runner/work/LexLean/LexLean/crates/conformance) + Finished `test` profile [unoptimized + debuginfo] target(s) in 29.46s + Running tests/conformance.rs (target/debug/deps/conformance-4b02e7ab9c96bbf8) + +running 1 test +test conformance_rt_03 has been running for over 60 seconds +test conformance_rt_03 ... ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 481 filtered out; finished in 93.02s + diff --git a/docs/evidence/native-candidate-466/compiler/rust-toolchain.toml b/docs/evidence/native-candidate-466/compiler/rust-toolchain.toml new file mode 100644 index 0000000..5ec5869 --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "1.97.1" +components = ["rustfmt", "clippy"] +profile = "minimal" diff --git a/docs/evidence/native-candidate-466/compiler/rust-version.txt b/docs/evidence/native-candidate-466/compiler/rust-version.txt new file mode 100644 index 0000000..e6706a0 --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/rust-version.txt @@ -0,0 +1,7 @@ +rustc 1.97.1 (8bab26f4f 2026-07-14) +binary: rustc +commit-hash: 8bab26f4f68e0e26f0bb7960be334d5b520ea452 +commit-date: 2026-07-14 +host: x86_64-unknown-linux-gnu +release: 1.97.1 +LLVM version: 22.1.6 diff --git a/docs/evidence/native-candidate-466/compiler/source-commit.txt b/docs/evidence/native-candidate-466/compiler/source-commit.txt new file mode 100644 index 0000000..5aa8435 --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/source-commit.txt @@ -0,0 +1 @@ +cc5561203de8fa5594d573904147a306b2b8bbbf diff --git a/docs/evidence/native-candidate-466/compiler/source-tree.txt b/docs/evidence/native-candidate-466/compiler/source-tree.txt new file mode 100644 index 0000000..0c0cc2a --- /dev/null +++ b/docs/evidence/native-candidate-466/compiler/source-tree.txt @@ -0,0 +1 @@ +c2bbc659b3cea7d58f2a2d0557579d8b2e92ff9e diff --git a/docs/evidence/native-candidate-466/stitch-placement/build.log b/docs/evidence/native-candidate-466/stitch-placement/build.log new file mode 100644 index 0000000..006dec6 --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch-placement/build.log @@ -0,0 +1 @@ +built 25 modules at .lexlean/build/0ad014252e6f1ff6af86aad9d33e66b760cf38724c1fe8d25cd2dcb4cb3859d9 diff --git a/docs/evidence/native-candidate-466/stitch-placement/generated-native-inputs.json b/docs/evidence/native-candidate-466/stitch-placement/generated-native-inputs.json new file mode 100644 index 0000000..9b576ab --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch-placement/generated-native-inputs.json @@ -0,0 +1,114 @@ +[ + { + "path": "LexLeanRuntime/Collections.lean", + "sha256": "03ef41e76f1d32fe97a3b31b91215b3f3caac53fd0c1422abd9efc1a80cd735b" + }, + { + "path": "LexLeanRuntime/Laws.lean", + "sha256": "918e4e066b31216aee098bbfbc41deeb90aefdb88363e94dfe2771303155ae5e" + }, + { + "path": "LexLeanRuntime/Portable.lean", + "sha256": "9a081b865659a3c13a6721ef7c5c93aec0b1ae2ce63bbd38286ec6d28483f8de" + }, + { + "path": "StitchModel/Foundation/Arch.lean", + "sha256": "145af2c29196e286de0fff938a17a61915bb6faac2759141272ce74fa246d608" + }, + { + "path": "StitchModel/Foundation/Bytes.lean", + "sha256": "2376718e1fbece860ef4b9a3ae24ec668e5045db118dfd4c7a7a2c7b7d2e4b39" + }, + { + "path": "StitchModel/Foundation/View/Text/V1/Model.lean", + "sha256": "70473365be15858a0c870172c27ac142f096afe1aee2432eaab2d828af1d55bf" + }, + { + "path": "StitchModel/Product/Architecture.lean", + "sha256": "c4808cbb1a1eccf8b593155d5b9dc1b5e26c3c24526239bb7adac25b46fce773" + }, + { + "path": "StitchModel/Product/Experience.lean", + "sha256": "928dbd1f867a52ec7d1b2d209e644ea1b815376f4c5dbdb89c54b0deec04b05e" + }, + { + "path": "StitchModel/Product/Host.lean", + "sha256": "4feb419016272af67eae5597304d117b4b1a2c7acd759b85493abb067dd0c768" + }, + { + "path": "StitchModel/Product/Model.lean", + "sha256": "6aa18fb9718d254567c5d2b0ed9f97a1d461096fb7fde4af40115aa392936d6d" + }, + { + "path": "StitchModel/Stitch/Authority.lean", + "sha256": "a89ebf120a05fa48a03a46c55bfbff5d2ab30554a7020a6aee491e88072f6f54" + }, + { + "path": "StitchModel/Stitch/Budget.lean", + "sha256": "01f469628c84e8cf66aa9497ed0e82d3f547ae695c7f2a61efb7c8b8bb64fcd7" + }, + { + "path": "StitchModel/Stitch/ChannelFlow.lean", + "sha256": "88ff390c120c789e97f5d56b117d6634806e45f758436be08dc2cc88b5c470b9" + }, + { + "path": "StitchModel/Stitch/Compute.lean", + "sha256": "5e59cbb806a08a0f18a3ac4061704621c435815022d9d8b15896e28104cca191" + }, + { + "path": "StitchModel/Stitch/Custody.lean", + "sha256": "784e463ef8b1f7b3f6d7d6aace5f8750911e20436e020e855c2e9cdbee466765" + }, + { + "path": "StitchModel/Stitch/Effects.lean", + "sha256": "fabf1fbd169c1c9c4043224b2ac253b0c78967e45889389e6d7f5cf90862f1c8" + }, + { + "path": "StitchModel/Stitch/Encoding.lean", + "sha256": "c2b2a20927f3f039298791f30abd4a9cc992b6eaf29334b0b81b3d1f68d98bad" + }, + { + "path": "StitchModel/Stitch/Evidence.lean", + "sha256": "1c6d4247e09a311388b0adf319aa5c59c3807386a2b93527e0120c275a3bad02" + }, + { + "path": "StitchModel/Stitch/Fragments.lean", + "sha256": "556d72531877ee3eb23acf6321b1aadfcc33c1eaaa4b1f3d227c032265aa90fb" + }, + { + "path": "StitchModel/Stitch/Identity.lean", + "sha256": "633907978f9b550c37af80d6b4c975a895e4a9cd09e512d6d0540ba04683dedf" + }, + { + "path": "StitchModel/Stitch/Observation.lean", + "sha256": "4b4ec280f91782403b0c83591f097c8894fc3f70d4545fc60659431c88b6431c" + }, + { + "path": "StitchModel/Stitch/Pointer.lean", + "sha256": "77deec698881364e8739668f427208ce787f376e920a44cc0c2733cb9e04a0ce" + }, + { + "path": "StitchModel/Stitch/Recovery.lean", + "sha256": "71b64b56354ea7f9a02de2f9489fc407e8daf02d26c5773d31a64278240c281a" + }, + { + "path": "StitchModel/Stitch/Relay.lean", + "sha256": "948fe7db4bbe2046c574e5883a17648573f2533bbb5f2a475a278610c6114eda" + }, + { + "path": "StitchModel/Stitch/Signaling.lean", + "sha256": "44713b2e8c2beb9b66658a3ce638f5e7e94285b596cb87458278e2a6925633fb" + }, + { + "path": "StitchModel/Stitch/System.lean", + "sha256": "b5f20f50ccf11fb0b6f403f4f4b2d43f628c7564c6d7630d7d3c956aec7f1ebf" + }, + { + "path": "StitchModel/Stitch/VmAdministration.lean", + "sha256": "2f654ffecc923b2c9c3d2bf17365af6e46eaa945f48cdcd532803c1b0e014db8" + }, + { + "path": "StitchModel/StitchApp.lean", + "sha256": "ccb080862681bb34a67c86fa0d9ec1618969a5de6b097c3e246519d32ec8f47e" + } +] diff --git a/docs/evidence/native-candidate-466/stitch-placement/lakefile.toml b/docs/evidence/native-candidate-466/stitch-placement/lakefile.toml new file mode 100644 index 0000000..36e7e0b --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch-placement/lakefile.toml @@ -0,0 +1,7 @@ +name = "prismpm_verify" +version = "0.1.0" + +[[lean_lib]] +name = "PrismGenerated" +roots = ["LexLeanRuntime.Collections", "LexLeanRuntime.Laws", "LexLeanRuntime.Portable", "StitchModel.Foundation.Arch", "StitchModel.Foundation.Bytes", "StitchModel.Foundation.View.Text.V1.Model", "StitchModel.Product.Architecture", "StitchModel.Product.Experience", "StitchModel.Product.Host", "StitchModel.Product.Model", "StitchModel.Stitch.Authority", "StitchModel.Stitch.Budget", "StitchModel.Stitch.ChannelFlow", "StitchModel.Stitch.Compute", "StitchModel.Stitch.Custody", "StitchModel.Stitch.Effects", "StitchModel.Stitch.Encoding", "StitchModel.Stitch.Evidence", "StitchModel.Stitch.Fragments", "StitchModel.Stitch.Identity", "StitchModel.Stitch.Observation", "StitchModel.Stitch.Pointer", "StitchModel.Stitch.Recovery", "StitchModel.Stitch.Relay", "StitchModel.Stitch.Signaling", "StitchModel.Stitch.System", "StitchModel.Stitch.VmAdministration", "StitchModel.StitchApp"] +moreLeanArgs = ["-j2"] diff --git a/docs/evidence/native-candidate-466/stitch-placement/native-result.json b/docs/evidence/native-candidate-466/stitch-placement/native-result.json new file mode 100644 index 0000000..9dffa52 --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch-placement/native-result.json @@ -0,0 +1 @@ +{"seconds": 16.09338469209615, "exit": 0} \ No newline at end of file diff --git a/docs/evidence/native-candidate-466/stitch-placement/native.log b/docs/evidence/native-candidate-466/stitch-placement/native.log new file mode 100644 index 0000000..8aa993a --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch-placement/native.log @@ -0,0 +1,62 @@ +info: prismpm_verify: no previous manifest, creating one from scratch +info: toolchain not updated; no toolchain information found +✔ [0/30] Ran job computation +✔ [1/30] Ran prismpm_verify:extraDep +ℹ [2/30] Built LexLeanRuntime.Collections (3.2s) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/LexLeanRuntime/Collections.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Collections.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Collections.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/LexLeanRuntime/Collections.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/LexLeanRuntime/Collections.setup.json --json +ℹ [3/30] Built LexLeanRuntime.Portable (3.4s) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/LexLeanRuntime/Portable.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Portable.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Portable.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/LexLeanRuntime/Portable.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/LexLeanRuntime/Portable.setup.json --json +ℹ [4/30] Built StitchModel.Foundation.Arch (294ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Foundation/Arch.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/Arch.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/Arch.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Foundation/Arch.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Foundation/Arch.setup.json --json +ℹ [5/30] Built StitchModel.Foundation.View.Text.V1.Model (234ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Foundation/View/Text/V1/Model.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/View/Text/V1/Model.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/View/Text/V1/Model.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Foundation/View/Text/V1/Model.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Foundation/View/Text/V1/Model.setup.json --json +ℹ [6/30] Built StitchModel.Stitch.Authority (281ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Authority.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Authority.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Authority.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Authority.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Authority.setup.json --json +ℹ [7/30] Built StitchModel.Product.Experience (621ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Product/Experience.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Experience.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Experience.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Product/Experience.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Product/Experience.setup.json --json +ℹ [8/30] Built StitchModel.Stitch.ChannelFlow (209ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/ChannelFlow.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/ChannelFlow.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/ChannelFlow.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/ChannelFlow.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/ChannelFlow.setup.json --json +ℹ [9/30] Built StitchModel.Stitch.Signaling (195ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Signaling.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Signaling.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Signaling.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Signaling.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Signaling.setup.json --json +ℹ [10/30] Built StitchModel.Stitch.VmAdministration (206ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/VmAdministration.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/VmAdministration.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/VmAdministration.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/VmAdministration.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/VmAdministration.setup.json --json +ℹ [11/30] Built StitchModel.Stitch.Relay (343ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Relay.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Relay.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Relay.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Relay.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Relay.setup.json --json +ℹ [12/30] Built StitchModel.Foundation.Bytes (229ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Foundation/Bytes.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/Bytes.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/Bytes.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Foundation/Bytes.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Foundation/Bytes.setup.json --json +ℹ [13/30] Built LexLeanRuntime.Laws (3.6s) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/LexLeanRuntime/Laws.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Laws.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Laws.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/LexLeanRuntime/Laws.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/LexLeanRuntime/Laws.setup.json --json +ℹ [14/30] Built StitchModel.Product.Model (4.3s) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Product/Model.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Model.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Model.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Product/Model.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Product/Model.setup.json --json +ℹ [15/30] Built StitchModel.Product.Architecture (297ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Product/Architecture.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Architecture.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Architecture.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Product/Architecture.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Product/Architecture.setup.json --json +ℹ [16/30] Built StitchModel.Stitch.Recovery (341ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Recovery.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Recovery.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Recovery.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Recovery.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Recovery.setup.json --json +ℹ [17/30] Built StitchModel.Stitch.Observation (322ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Observation.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Observation.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Observation.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Observation.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Observation.setup.json --json +ℹ [18/30] Built StitchModel.Stitch.Effects (787ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Effects.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Effects.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Effects.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Effects.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Effects.setup.json --json +ℹ [19/30] Built StitchModel.Stitch.Identity (250ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Identity.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Identity.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Identity.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Identity.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Identity.setup.json --json +ℹ [20/30] Built StitchModel.Stitch.Encoding (310ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Encoding.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Encoding.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Encoding.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Encoding.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Encoding.setup.json --json +ℹ [21/30] Built StitchModel.Stitch.Compute (1.2s) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Compute.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Compute.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Compute.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Compute.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Compute.setup.json --json +ℹ [22/30] Built StitchModel.Stitch.Pointer (318ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Pointer.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Pointer.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Pointer.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Pointer.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Pointer.setup.json --json +ℹ [23/30] Built StitchModel.Stitch.Fragments (490ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Fragments.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Fragments.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Fragments.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Fragments.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Fragments.setup.json --json +ℹ [24/30] Built StitchModel.Stitch.Evidence (571ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Evidence.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Evidence.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Evidence.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Evidence.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Evidence.setup.json --json +ℹ [25/30] Built StitchModel.Stitch.Budget (3.0s) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Budget.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Budget.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Budget.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Budget.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Budget.setup.json --json +ℹ [26/30] Built StitchModel.Stitch.Custody (1.9s) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/Custody.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Custody.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Custody.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Custody.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Custody.setup.json --json +ℹ [27/30] Built StitchModel.Product.Host (506ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Product/Host.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Host.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Host.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Product/Host.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Product/Host.setup.json --json +ℹ [28/30] Built StitchModel.Stitch.System (511ms) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/Stitch/System.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/System.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/System.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/System.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/Stitch/System.setup.json --json +ℹ [29/30] Built StitchModel.StitchApp (1.3s) +trace: .> LEAN_PATH=/tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-placement-diagnostic/native/StitchModel/StitchApp.lean -o /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/StitchApp.olean -i /tmp/stitch-466-placement-diagnostic/native/.lake/build/lib/lean/StitchModel/StitchApp.ilean -c /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/StitchApp.c --setup /tmp/stitch-466-placement-diagnostic/native/.lake/build/ir/StitchModel/StitchApp.setup.json --json +✔ [30/30] Ran prismpm_verify/PrismGenerated:default +Build completed successfully (30 jobs). diff --git a/docs/evidence/native-candidate-466/stitch-placement/source-provenance.json b/docs/evidence/native-candidate-466/stitch-placement/source-provenance.json new file mode 100644 index 0000000..d136323 --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch-placement/source-provenance.json @@ -0,0 +1,105 @@ +{ + "source_commit": "c99dc0d74d8b0f1c036df1aff18cc047b3bf5c1a", + "files": [ + { + "path": "app/src/Foundation/Arch.lex.tex", + "sha256": "54fdc8eb15c46707e445ff99814d6cbd1731967f801bf064a6c1f4cc01c45394" + }, + { + "path": "app/src/Foundation/Bytes.lex.tex", + "sha256": "ce16e5b439128db3231979381f4599d3ff0617f62c2bf00c348bba35393abcd6" + }, + { + "path": "app/src/Foundation/View/Text/V1/Model.lex.tex", + "sha256": "db124343ad8fe1295bc8eb305c7f59f83cf6ad76d46a5cabea500fe66f3ad5dc" + }, + { + "path": "app/src/Product/Architecture.lex.tex", + "sha256": "d5cc5fd4e64070bddd5c0edc8cb3a318a0965b5e1574efe9a9dfa483b12e8d6d" + }, + { + "path": "app/src/Product/Experience.lex.tex", + "sha256": "10bd1e9b22dc5697b752240ce6d566160dc65bb5810f6a520cb8018f5ff79743" + }, + { + "path": "app/src/Product/Host.lex.tex", + "sha256": "3bb2a621868dc683e776c9b65c58cc60cc2b89e5d007d54c4c152bedd4878871" + }, + { + "path": "app/src/Product/Model.lex.tex", + "sha256": "a811754e08b17292e45f049b9822d7d8d53625a1efdc516687bf8c14aeb44cdb" + }, + { + "path": "app/src/Stitch/Authority.lex.tex", + "sha256": "10afc7af1503f08fe7806dbab24d93f565f34370e3b7d18135f48297e64ee573" + }, + { + "path": "app/src/Stitch/Budget.lex.tex", + "sha256": "581ae188297e3e03e69869a3cfbcdae9554706e007cbeb238d97c8ad30229911" + }, + { + "path": "app/src/Stitch/ChannelFlow.lex.tex", + "sha256": "7f4356ddd38fc94b32a2d6af237ce7382c34bdc7db43c8e8d6ab94cd94fc3e63" + }, + { + "path": "app/src/Stitch/Compute.lex.tex", + "sha256": "ef0f1b8dcf15a8ff26a206b7bd8fa51736bb54ae14e7b6e71a4296deeb4528b7" + }, + { + "path": "app/src/Stitch/Custody.lex.tex", + "sha256": "e9084ba97058adfd3017e634215af1dee12d89c4ff0d409a4271f05387d8d663" + }, + { + "path": "app/src/Stitch/Effects.lex.tex", + "sha256": "7ccc2c30cca7df663541ceece0c85226f921160f56f4ec681703a8d5b589263b" + }, + { + "path": "app/src/Stitch/Encoding.lex.tex", + "sha256": "75b412ab0ed56dea3aa41cc77705fb6233991ea1c2e600a7cf509c3b84e5a95f" + }, + { + "path": "app/src/Stitch/Evidence.lex.tex", + "sha256": "39011e1cf70295427f716d328b1ab754242d3667f0e70a8a48dffa735465c79e" + }, + { + "path": "app/src/Stitch/Fragments.lex.tex", + "sha256": "5cd8d0602cbe501ae4ffc5c18dde17fc6e5766d930ac1d9277545d1ef8d88b83" + }, + { + "path": "app/src/Stitch/Identity.lex.tex", + "sha256": "c4c159234e1623b8f339e86cf47da55c89d197bf21fe334bd893f575ba053870" + }, + { + "path": "app/src/Stitch/Observation.lex.tex", + "sha256": "fe3205a68576d8c7d82f86b45b78f8b6c8b49a873f00c448cccb2eb459749ae8" + }, + { + "path": "app/src/Stitch/Pointer.lex.tex", + "sha256": "10239748c402cdadfc36b150a7a103dfe5124d81fa27bb276575810470c89c46" + }, + { + "path": "app/src/Stitch/Recovery.lex.tex", + "sha256": "4a29e91526ffd1c5aa9fcfc8d990ca1b89d5129813742d9ae55e688eeb6a9121" + }, + { + "path": "app/src/Stitch/Relay.lex.tex", + "sha256": "26a3b5c7f8af3cb058800716a5b73111adbe0188436ae1ad87e1a0e6ce118a03" + }, + { + "path": "app/src/Stitch/Signaling.lex.tex", + "sha256": "97bdfb5160e41a4ed3ab30788f2e3a558836f622c237e4bd3496536212b330c9" + }, + { + "path": "app/src/Stitch/System.lex.tex", + "sha256": "b05a639514a2c56f40b8e960c6cf31023aec8b20d1c18c5ed68a0a936a9d7119" + }, + { + "path": "app/src/Stitch/VmAdministration.lex.tex", + "sha256": "4e578e7e5c9a4f1c83d0181acae555a1c184dd72777473465448a7675b2bb32c" + }, + { + "path": "app/src/StitchApp.lex.tex", + "sha256": "ffd8a4b6b9072b27b06d67d61e1c11d085a6b82e84be4610f27f3805d87f675b" + } + ] +} diff --git a/docs/evidence/native-candidate-466/stitch/build.log b/docs/evidence/native-candidate-466/stitch/build.log new file mode 100644 index 0000000..0000b35 --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch/build.log @@ -0,0 +1 @@ +built 25 modules at .lexlean/build/4e13e97134125c82b1ea9c8c6749558bc9b5b70d4f9b4b248b98382b6f2077c1 diff --git a/docs/evidence/native-candidate-466/stitch/generated-native-inputs.json b/docs/evidence/native-candidate-466/stitch/generated-native-inputs.json new file mode 100644 index 0000000..5563232 --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch/generated-native-inputs.json @@ -0,0 +1,114 @@ +[ + { + "path": "LexLeanRuntime/Collections.lean", + "sha256": "03ef41e76f1d32fe97a3b31b91215b3f3caac53fd0c1422abd9efc1a80cd735b" + }, + { + "path": "LexLeanRuntime/Laws.lean", + "sha256": "918e4e066b31216aee098bbfbc41deeb90aefdb88363e94dfe2771303155ae5e" + }, + { + "path": "LexLeanRuntime/Portable.lean", + "sha256": "9a081b865659a3c13a6721ef7c5c93aec0b1ae2ce63bbd38286ec6d28483f8de" + }, + { + "path": "StitchModel/Foundation/Arch.lean", + "sha256": "145af2c29196e286de0fff938a17a61915bb6faac2759141272ce74fa246d608" + }, + { + "path": "StitchModel/Foundation/Bytes.lean", + "sha256": "2376718e1fbece860ef4b9a3ae24ec668e5045db118dfd4c7a7a2c7b7d2e4b39" + }, + { + "path": "StitchModel/Foundation/View/Text/V1/Model.lean", + "sha256": "70473365be15858a0c870172c27ac142f096afe1aee2432eaab2d828af1d55bf" + }, + { + "path": "StitchModel/Product/Architecture.lean", + "sha256": "c4808cbb1a1eccf8b593155d5b9dc1b5e26c3c24526239bb7adac25b46fce773" + }, + { + "path": "StitchModel/Product/Experience.lean", + "sha256": "0f84782596b1cf620e174bf771582e6225c494195c8819a1c7e7afd47ab066ab" + }, + { + "path": "StitchModel/Product/Host.lean", + "sha256": "4feb419016272af67eae5597304d117b4b1a2c7acd759b85493abb067dd0c768" + }, + { + "path": "StitchModel/Product/Model.lean", + "sha256": "6aa18fb9718d254567c5d2b0ed9f97a1d461096fb7fde4af40115aa392936d6d" + }, + { + "path": "StitchModel/Stitch/Authority.lean", + "sha256": "a89ebf120a05fa48a03a46c55bfbff5d2ab30554a7020a6aee491e88072f6f54" + }, + { + "path": "StitchModel/Stitch/Budget.lean", + "sha256": "01f469628c84e8cf66aa9497ed0e82d3f547ae695c7f2a61efb7c8b8bb64fcd7" + }, + { + "path": "StitchModel/Stitch/ChannelFlow.lean", + "sha256": "88ff390c120c789e97f5d56b117d6634806e45f758436be08dc2cc88b5c470b9" + }, + { + "path": "StitchModel/Stitch/Compute.lean", + "sha256": "5e59cbb806a08a0f18a3ac4061704621c435815022d9d8b15896e28104cca191" + }, + { + "path": "StitchModel/Stitch/Custody.lean", + "sha256": "9e31ce5edee1fe19bab58fca18a77ddf7a5d95abd8be158ad33ee49609089b9b" + }, + { + "path": "StitchModel/Stitch/Effects.lean", + "sha256": "fabf1fbd169c1c9c4043224b2ac253b0c78967e45889389e6d7f5cf90862f1c8" + }, + { + "path": "StitchModel/Stitch/Encoding.lean", + "sha256": "c2b2a20927f3f039298791f30abd4a9cc992b6eaf29334b0b81b3d1f68d98bad" + }, + { + "path": "StitchModel/Stitch/Evidence.lean", + "sha256": "1c6d4247e09a311388b0adf319aa5c59c3807386a2b93527e0120c275a3bad02" + }, + { + "path": "StitchModel/Stitch/Fragments.lean", + "sha256": "556d72531877ee3eb23acf6321b1aadfcc33c1eaaa4b1f3d227c032265aa90fb" + }, + { + "path": "StitchModel/Stitch/Identity.lean", + "sha256": "633907978f9b550c37af80d6b4c975a895e4a9cd09e512d6d0540ba04683dedf" + }, + { + "path": "StitchModel/Stitch/Observation.lean", + "sha256": "4b4ec280f91782403b0c83591f097c8894fc3f70d4545fc60659431c88b6431c" + }, + { + "path": "StitchModel/Stitch/Pointer.lean", + "sha256": "77deec698881364e8739668f427208ce787f376e920a44cc0c2733cb9e04a0ce" + }, + { + "path": "StitchModel/Stitch/Recovery.lean", + "sha256": "71b64b56354ea7f9a02de2f9489fc407e8daf02d26c5773d31a64278240c281a" + }, + { + "path": "StitchModel/Stitch/Relay.lean", + "sha256": "948fe7db4bbe2046c574e5883a17648573f2533bbb5f2a475a278610c6114eda" + }, + { + "path": "StitchModel/Stitch/Signaling.lean", + "sha256": "44713b2e8c2beb9b66658a3ce638f5e7e94285b596cb87458278e2a6925633fb" + }, + { + "path": "StitchModel/Stitch/System.lean", + "sha256": "b5f20f50ccf11fb0b6f403f4f4b2d43f628c7564c6d7630d7d3c956aec7f1ebf" + }, + { + "path": "StitchModel/Stitch/VmAdministration.lean", + "sha256": "2f654ffecc923b2c9c3d2bf17365af6e46eaa945f48cdcd532803c1b0e014db8" + }, + { + "path": "StitchModel/StitchApp.lean", + "sha256": "ccb080862681bb34a67c86fa0d9ec1618969a5de6b097c3e246519d32ec8f47e" + } +] diff --git a/docs/evidence/native-candidate-466/stitch/lakefile.toml b/docs/evidence/native-candidate-466/stitch/lakefile.toml new file mode 100644 index 0000000..36e7e0b --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch/lakefile.toml @@ -0,0 +1,7 @@ +name = "prismpm_verify" +version = "0.1.0" + +[[lean_lib]] +name = "PrismGenerated" +roots = ["LexLeanRuntime.Collections", "LexLeanRuntime.Laws", "LexLeanRuntime.Portable", "StitchModel.Foundation.Arch", "StitchModel.Foundation.Bytes", "StitchModel.Foundation.View.Text.V1.Model", "StitchModel.Product.Architecture", "StitchModel.Product.Experience", "StitchModel.Product.Host", "StitchModel.Product.Model", "StitchModel.Stitch.Authority", "StitchModel.Stitch.Budget", "StitchModel.Stitch.ChannelFlow", "StitchModel.Stitch.Compute", "StitchModel.Stitch.Custody", "StitchModel.Stitch.Effects", "StitchModel.Stitch.Encoding", "StitchModel.Stitch.Evidence", "StitchModel.Stitch.Fragments", "StitchModel.Stitch.Identity", "StitchModel.Stitch.Observation", "StitchModel.Stitch.Pointer", "StitchModel.Stitch.Recovery", "StitchModel.Stitch.Relay", "StitchModel.Stitch.Signaling", "StitchModel.Stitch.System", "StitchModel.Stitch.VmAdministration", "StitchModel.StitchApp"] +moreLeanArgs = ["-j2"] diff --git a/docs/evidence/native-candidate-466/stitch/native-result.json b/docs/evidence/native-candidate-466/stitch/native-result.json new file mode 100644 index 0000000..305ed25 --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch/native-result.json @@ -0,0 +1 @@ +{"seconds": 16.35509194189217, "exit": 0} \ No newline at end of file diff --git a/docs/evidence/native-candidate-466/stitch/native.log b/docs/evidence/native-candidate-466/stitch/native.log new file mode 100644 index 0000000..e150f7e --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch/native.log @@ -0,0 +1,62 @@ +info: prismpm_verify: no previous manifest, creating one from scratch +info: toolchain not updated; no toolchain information found +✔ [0/30] Ran job computation +✔ [1/30] Ran prismpm_verify:extraDep +ℹ [2/30] Built LexLeanRuntime.Collections (3.4s) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/LexLeanRuntime/Collections.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Collections.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Collections.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/LexLeanRuntime/Collections.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/LexLeanRuntime/Collections.setup.json --json +ℹ [3/30] Built LexLeanRuntime.Portable (3.4s) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/LexLeanRuntime/Portable.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Portable.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Portable.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/LexLeanRuntime/Portable.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/LexLeanRuntime/Portable.setup.json --json +ℹ [4/30] Built StitchModel.Foundation.View.Text.V1.Model (235ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Foundation/View/Text/V1/Model.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/View/Text/V1/Model.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/View/Text/V1/Model.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Foundation/View/Text/V1/Model.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Foundation/View/Text/V1/Model.setup.json --json +ℹ [5/30] Built StitchModel.Foundation.Arch (309ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Foundation/Arch.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/Arch.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/Arch.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Foundation/Arch.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Foundation/Arch.setup.json --json +ℹ [6/30] Built StitchModel.Stitch.Authority (277ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Authority.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Authority.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Authority.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Authority.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Authority.setup.json --json +ℹ [7/30] Built StitchModel.Stitch.ChannelFlow (256ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/ChannelFlow.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/ChannelFlow.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/ChannelFlow.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/ChannelFlow.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/ChannelFlow.setup.json --json +ℹ [8/30] Built StitchModel.Product.Experience (665ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Product/Experience.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Experience.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Experience.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Product/Experience.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Product/Experience.setup.json --json +ℹ [9/30] Built StitchModel.Stitch.Signaling (201ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Signaling.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Signaling.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Signaling.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Signaling.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Signaling.setup.json --json +ℹ [10/30] Built StitchModel.Stitch.VmAdministration (226ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/VmAdministration.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/VmAdministration.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/VmAdministration.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/VmAdministration.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/VmAdministration.setup.json --json +ℹ [11/30] Built StitchModel.Stitch.Relay (336ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Relay.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Relay.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Relay.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Relay.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Relay.setup.json --json +ℹ [12/30] Built StitchModel.Foundation.Bytes (249ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Foundation/Bytes.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/Bytes.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Foundation/Bytes.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Foundation/Bytes.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Foundation/Bytes.setup.json --json +ℹ [13/30] Built LexLeanRuntime.Laws (3.4s) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/LexLeanRuntime/Laws.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Laws.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Laws.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/LexLeanRuntime/Laws.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/LexLeanRuntime/Laws.setup.json --json +ℹ [14/30] Built StitchModel.Product.Model (3.0s) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Product/Model.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Model.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Model.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Product/Model.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Product/Model.setup.json --json +ℹ [15/30] Built StitchModel.Product.Architecture (278ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Product/Architecture.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Architecture.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Architecture.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Product/Architecture.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Product/Architecture.setup.json --json +ℹ [16/30] Built StitchModel.Stitch.Recovery (280ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Recovery.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Recovery.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Recovery.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Recovery.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Recovery.setup.json --json +ℹ [17/30] Built StitchModel.Stitch.Effects (817ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Effects.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Effects.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Effects.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Effects.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Effects.setup.json --json +ℹ [18/30] Built StitchModel.Stitch.Observation (390ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Observation.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Observation.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Observation.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Observation.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Observation.setup.json --json +ℹ [19/30] Built StitchModel.Stitch.Identity (265ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Identity.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Identity.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Identity.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Identity.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Identity.setup.json --json +ℹ [20/30] Built StitchModel.Stitch.Encoding (317ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Encoding.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Encoding.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Encoding.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Encoding.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Encoding.setup.json --json +ℹ [21/30] Built StitchModel.Stitch.Compute (1.3s) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Compute.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Compute.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Compute.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Compute.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Compute.setup.json --json +ℹ [22/30] Built StitchModel.Stitch.Pointer (329ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Pointer.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Pointer.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Pointer.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Pointer.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Pointer.setup.json --json +ℹ [23/30] Built StitchModel.Stitch.Fragments (570ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Fragments.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Fragments.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Fragments.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Fragments.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Fragments.setup.json --json +ℹ [24/30] Built StitchModel.Stitch.Evidence (533ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Evidence.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Evidence.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Evidence.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Evidence.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Evidence.setup.json --json +ℹ [25/30] Built StitchModel.Stitch.Budget (4.1s) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Budget.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Budget.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Budget.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Budget.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Budget.setup.json --json +ℹ [26/30] Built StitchModel.Stitch.Custody (2.0s) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/Custody.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Custody.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/Custody.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Custody.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/Custody.setup.json --json +ℹ [27/30] Built StitchModel.Product.Host (495ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Product/Host.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Host.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Product/Host.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Product/Host.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Product/Host.setup.json --json +ℹ [28/30] Built StitchModel.Stitch.System (470ms) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/Stitch/System.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/System.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/Stitch/System.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/System.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/Stitch/System.setup.json --json +ℹ [29/30] Built StitchModel.StitchApp (1.4s) +trace: .> LEAN_PATH=/tmp/stitch-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/stitch-466-diagnostic/native/StitchModel/StitchApp.lean -o /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/StitchApp.olean -i /tmp/stitch-466-diagnostic/native/.lake/build/lib/lean/StitchModel/StitchApp.ilean -c /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/StitchApp.c --setup /tmp/stitch-466-diagnostic/native/.lake/build/ir/StitchModel/StitchApp.setup.json --json +✔ [30/30] Ran prismpm_verify/PrismGenerated:default +Build completed successfully (30 jobs). diff --git a/docs/evidence/native-candidate-466/stitch/remote-app-comparison.json b/docs/evidence/native-candidate-466/stitch/remote-app-comparison.json new file mode 100644 index 0000000..73982a7 --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch/remote-app-comparison.json @@ -0,0 +1,271 @@ +{ + "remote_commit": "2f1fde828fea0d07cb4fca36c3241702e29e193f", + "local_commit": "dad91e429ffbf8248ae6ed9f9319dd90e229a299", + "remote_entries": [ + { + "path": "app/.gitignore", + "sha": "96c6dd485a56eb2d76eb4121c49168ded37afed7" + }, + { + "path": "app/README.md", + "sha": "fa5060a2c69331ecfbe0fdc8176192f54c7a9dba" + }, + { + "path": "app/lake-manifest.json", + "sha": "b6674e4968f648b1f30ef92fe75005adcd66f128" + }, + { + "path": "app/lakefile.toml", + "sha": "9f91cb7a4270496f15be58c3096f0cdb0c6f8fa0" + }, + { + "path": "app/language/prism.arch/entries/arch-component-kind.toml", + "sha": "dbd4780fd730208aef8e37d8085cb89a4fe03a86" + }, + { + "path": "app/language/prism.arch/entries/arch-component.toml", + "sha": "af43c9c8e28f20c9d00ca0c69448c39a0e7407a5" + }, + { + "path": "app/language/prism.arch/entries/arch-concern.toml", + "sha": "75fc2dfb50fc795b0a63b772d8e98905a822a96a" + }, + { + "path": "app/language/prism.arch/entries/arch-edge-kind.toml", + "sha": "ff413a4bcb2c3ff6d7bd54c6cfd9739a570f6252" + }, + { + "path": "app/language/prism.arch/entries/arch-edge.toml", + "sha": "64cf40e85e5ff5aef253d79bf9e0216136587606" + }, + { + "path": "app/language/prism.arch/entries/arch-model-kind.toml", + "sha": "0414bacc7c4927a00815933a216c3f444c9d9cb8" + }, + { + "path": "app/language/prism.arch/entries/arch-stakeholder.toml", + "sha": "c3ff77d92a25e11ca9aad4326fe6f20d1c8d4c54" + }, + { + "path": "app/language/prism.arch/entries/arch-standard-reference.toml", + "sha": "1eac4a3efa14810e0f74148cb729f22e74dc3cf0" + }, + { + "path": "app/language/prism.arch/entries/arch-text-application-model.toml", + "sha": "23ca3d904d7557f9076974190ce72c80b79d3a9c" + }, + { + "path": "app/language/prism.arch/entries/arch-view-class.toml", + "sha": "a49493d642a696ed6fbca9b7418500befcca7e14" + }, + { + "path": "app/language/prism.arch/entries/arch-view.toml", + "sha": "b75ebfa3acd6cc5b975bbda727db32c53785a747" + }, + { + "path": "app/language/prism.arch/entries/arch-viewpoint-class.toml", + "sha": "fb12ac479ebb2d15daa60d1aeebfe1a10b9016cc" + }, + { + "path": "app/language/prism.arch/entries/arch-viewpoint.toml", + "sha": "005fb8730c47248d21ab623e8211307908dea2d2" + }, + { + "path": "app/language/prism.arch/entries/holo-flat-validation-input.toml", + "sha": "9489644b73398c326d7be1f0d955c46677100a36" + }, + { + "path": "app/language/prism.arch/entries/holo-normalized-model.toml", + "sha": "919f2c8aa55dacde44861bf35b691f29b19a5670" + }, + { + "path": "app/language/prism.arch/entries/holo-standards-profile.toml", + "sha": "dfe904272b687b4a49cb4731f8151e52639a339b" + }, + { + "path": "app/language/prism.arch/entries/prism-bounded-byte-buffer.toml", + "sha": "745b919c7869c61729bd3604ee917443b676715a" + }, + { + "path": "app/language/prism.arch/entries/prism-browser-system-model.toml", + "sha": "8c88467aeba35af5f73fb54f2a50e69f6bcd8e61" + }, + { + "path": "app/language/prism.arch/entries/prism-production-system-model.toml", + "sha": "534ab287adecb2af7e9cbb740fe2ca334693acd5" + }, + { + "path": "app/language/prism.arch/entries/prism-unicode-text-codec.toml", + "sha": "ad3af5c179c87edc1f2d9d12336d65c7783f8fee" + }, + { + "path": "app/language/prism.arch/lexicon.toml", + "sha": "7639a320c7eb3d9ffd1d2ca4646e4bb8321d692e" + }, + { + "path": "app/language/stitch.domain/entries/stitch-budget.toml", + "sha": "3416ea366c19483c62a7e04b5a31d9ecbddc980b" + }, + { + "path": "app/language/stitch.domain/entries/stitch-checkpoint.toml", + "sha": "4733926d787752f6b4eee128a7dd71f324671de0" + }, + { + "path": "app/language/stitch.domain/entries/stitch-encoding.toml", + "sha": "4cc43d01c762fb669933d3519cf229c82804f696" + }, + { + "path": "app/language/stitch.domain/entries/stitch-evidence.toml", + "sha": "686b63d4314766ca348b713c5f2e36d40bb79a37" + }, + { + "path": "app/language/stitch.domain/entries/stitch-fragment.toml", + "sha": "2bc52c1358d176259f758b95a0a5d485e149a67e" + }, + { + "path": "app/language/stitch.domain/entries/stitch-object.toml", + "sha": "f3729522dad7b700863e87c922eb5b9847a7999a" + }, + { + "path": "app/language/stitch.domain/entries/stitch-observation.toml", + "sha": "a5d4bf567d777e50d59ac25b16db58c08facfa3b" + }, + { + "path": "app/language/stitch.domain/entries/stitch-placement.toml", + "sha": "bc37a711baed6de4899ff0038554e500392808ca" + }, + { + "path": "app/language/stitch.domain/entries/stitch-pointer.toml", + "sha": "2ea13ee92f4471faf1385e99c17ef4a5fda8b3f5" + }, + { + "path": "app/language/stitch.domain/entries/stitch-service-model.toml", + "sha": "fdfa706677fcf967fe4ec9e235a0ab2e9bb8cf53" + }, + { + "path": "app/language/stitch.domain/lexicon.toml", + "sha": "4e5dcc50d9ce92777427f3dd03039e3d71cbcbe6" + }, + { + "path": "app/lean-toolchain", + "sha": "2b61957be5f4986fcc464cb4f62322f2d6ca3dfc" + }, + { + "path": "app/lexlean.lock", + "sha": "16f78c4044a729ed98498e7732b98fa2154187ff" + }, + { + "path": "app/lexlean.toml", + "sha": "fb29a839ec338b08d974479b466f7354f491e886" + }, + { + "path": "app/prism.toml", + "sha": "bfea9f23cdb485f5aff16e86a8a342f7590e5bac" + }, + { + "path": "app/prismpm.toml", + "sha": "1fa19ff1f3ddf7afede5e001b0e5566284af41cc" + }, + { + "path": "app/src/Foundation/Arch.lex.tex", + "sha": "e015d2169476370a57852dcd5eccd9c5732871fa" + }, + { + "path": "app/src/Foundation/Bytes.lex.tex", + "sha": "f54f9c0266f082c693e9b3c7086e0bca8259a6e2" + }, + { + "path": "app/src/Foundation/View/Text/V1/Model.lex.tex", + "sha": "dcd17faef2d6f91476efa6538c426ffa9d879921" + }, + { + "path": "app/src/Product/Architecture.lex.tex", + "sha": "6fd6a58d4f9bc2cf96e43b55514371ab934ea0e3" + }, + { + "path": "app/src/Product/Experience.lex.tex", + "sha": "7528922c7fd28a3ce563420915017bade9604aca" + }, + { + "path": "app/src/Product/Host.lex.tex", + "sha": "aee958d0c2264cc4419df44de74dda40642d04ab" + }, + { + "path": "app/src/Product/Model.lex.tex", + "sha": "5c75095b83668d2572b80d43249d1a235518416f" + }, + { + "path": "app/src/Stitch/Authority.lex.tex", + "sha": "e97309e9b0716eb407d1754a7dd1dc0a3229e892" + }, + { + "path": "app/src/Stitch/Budget.lex.tex", + "sha": "f8ba012e466bdba0f803c2dccf6c1db6418e5c77" + }, + { + "path": "app/src/Stitch/ChannelFlow.lex.tex", + "sha": "3eef6132e89b3e9636a714f7cb82c153c8dbecd6" + }, + { + "path": "app/src/Stitch/Compute.lex.tex", + "sha": "b8811b8b18145ed2b84f66f7501d78300ddb59c9" + }, + { + "path": "app/src/Stitch/Custody.lex.tex", + "sha": "23ad86330f4e4bb3e3bf788fdadbf5410977f6a7" + }, + { + "path": "app/src/Stitch/Effects.lex.tex", + "sha": "a4f961ed6f9dcd8cee490e92728db4c37ee12483" + }, + { + "path": "app/src/Stitch/Encoding.lex.tex", + "sha": "940ba10d0ba0e4f3976f4fe5b4719b6f8ff58c6c" + }, + { + "path": "app/src/Stitch/Evidence.lex.tex", + "sha": "425496ff62efc5efeaee5a14bb67a09642e72232" + }, + { + "path": "app/src/Stitch/Fragments.lex.tex", + "sha": "9b74db6cb7ae82570800afc72c6deee545c62440" + }, + { + "path": "app/src/Stitch/Identity.lex.tex", + "sha": "1218eb2d4b7143dee74e50592ce8b2ef90f1e769" + }, + { + "path": "app/src/Stitch/Observation.lex.tex", + "sha": "66af6258a6fc7e2633ee04e508dead76e022dc98" + }, + { + "path": "app/src/Stitch/Pointer.lex.tex", + "sha": "c21fc6fedd2a58fa5ed5eaa4b02bb0f0bb0c905c" + }, + { + "path": "app/src/Stitch/Recovery.lex.tex", + "sha": "ef5374794c701226e45720163230abbe8e88feeb" + }, + { + "path": "app/src/Stitch/Relay.lex.tex", + "sha": "99a45d33b000f920300195ede85a03855c3ddc89" + }, + { + "path": "app/src/Stitch/Signaling.lex.tex", + "sha": "34733f48e450db7f0557606824aaba90cc0e4aae" + }, + { + "path": "app/src/Stitch/System.lex.tex", + "sha": "b1c6a3d66c2c52a1140f800e7bcf829025e75dc7" + }, + { + "path": "app/src/Stitch/VmAdministration.lex.tex", + "sha": "f5f6cdec0d75689d68277834bd51eaf643b722b9" + }, + { + "path": "app/src/StitchApp.lex.tex", + "sha": "448dfbcfe52c06565b270956f1203e5e6a582178" + } + ], + "differences": [] +}\n \ No newline at end of file diff --git a/docs/evidence/native-candidate-466/stitch/source-provenance.json b/docs/evidence/native-candidate-466/stitch/source-provenance.json new file mode 100644 index 0000000..4e5d5c7 --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch/source-provenance.json @@ -0,0 +1,105 @@ +{ + "source_commit": "dad91e429ffbf8248ae6ed9f9319dd90e229a299", + "files": [ + { + "path": "app/src/Foundation/Arch.lex.tex", + "sha256": "54fdc8eb15c46707e445ff99814d6cbd1731967f801bf064a6c1f4cc01c45394" + }, + { + "path": "app/src/Foundation/Bytes.lex.tex", + "sha256": "ce16e5b439128db3231979381f4599d3ff0617f62c2bf00c348bba35393abcd6" + }, + { + "path": "app/src/Foundation/View/Text/V1/Model.lex.tex", + "sha256": "db124343ad8fe1295bc8eb305c7f59f83cf6ad76d46a5cabea500fe66f3ad5dc" + }, + { + "path": "app/src/Product/Architecture.lex.tex", + "sha256": "d5cc5fd4e64070bddd5c0edc8cb3a318a0965b5e1574efe9a9dfa483b12e8d6d" + }, + { + "path": "app/src/Product/Experience.lex.tex", + "sha256": "9db08ad24811bc6078c3c9def03464fbbd4262ec817c3feffd50cc40f182a664" + }, + { + "path": "app/src/Product/Host.lex.tex", + "sha256": "3bb2a621868dc683e776c9b65c58cc60cc2b89e5d007d54c4c152bedd4878871" + }, + { + "path": "app/src/Product/Model.lex.tex", + "sha256": "a811754e08b17292e45f049b9822d7d8d53625a1efdc516687bf8c14aeb44cdb" + }, + { + "path": "app/src/Stitch/Authority.lex.tex", + "sha256": "10afc7af1503f08fe7806dbab24d93f565f34370e3b7d18135f48297e64ee573" + }, + { + "path": "app/src/Stitch/Budget.lex.tex", + "sha256": "581ae188297e3e03e69869a3cfbcdae9554706e007cbeb238d97c8ad30229911" + }, + { + "path": "app/src/Stitch/ChannelFlow.lex.tex", + "sha256": "7f4356ddd38fc94b32a2d6af237ce7382c34bdc7db43c8e8d6ab94cd94fc3e63" + }, + { + "path": "app/src/Stitch/Compute.lex.tex", + "sha256": "ef0f1b8dcf15a8ff26a206b7bd8fa51736bb54ae14e7b6e71a4296deeb4528b7" + }, + { + "path": "app/src/Stitch/Custody.lex.tex", + "sha256": "30347fda486b2c4c643dbc6bb8030e9aec0586ded3bb81b5e7cd8ca9bb9745b7" + }, + { + "path": "app/src/Stitch/Effects.lex.tex", + "sha256": "7ccc2c30cca7df663541ceece0c85226f921160f56f4ec681703a8d5b589263b" + }, + { + "path": "app/src/Stitch/Encoding.lex.tex", + "sha256": "75b412ab0ed56dea3aa41cc77705fb6233991ea1c2e600a7cf509c3b84e5a95f" + }, + { + "path": "app/src/Stitch/Evidence.lex.tex", + "sha256": "39011e1cf70295427f716d328b1ab754242d3667f0e70a8a48dffa735465c79e" + }, + { + "path": "app/src/Stitch/Fragments.lex.tex", + "sha256": "5cd8d0602cbe501ae4ffc5c18dde17fc6e5766d930ac1d9277545d1ef8d88b83" + }, + { + "path": "app/src/Stitch/Identity.lex.tex", + "sha256": "c4c159234e1623b8f339e86cf47da55c89d197bf21fe334bd893f575ba053870" + }, + { + "path": "app/src/Stitch/Observation.lex.tex", + "sha256": "fe3205a68576d8c7d82f86b45b78f8b6c8b49a873f00c448cccb2eb459749ae8" + }, + { + "path": "app/src/Stitch/Pointer.lex.tex", + "sha256": "10239748c402cdadfc36b150a7a103dfe5124d81fa27bb276575810470c89c46" + }, + { + "path": "app/src/Stitch/Recovery.lex.tex", + "sha256": "4a29e91526ffd1c5aa9fcfc8d990ca1b89d5129813742d9ae55e688eeb6a9121" + }, + { + "path": "app/src/Stitch/Relay.lex.tex", + "sha256": "26a3b5c7f8af3cb058800716a5b73111adbe0188436ae1ad87e1a0e6ce118a03" + }, + { + "path": "app/src/Stitch/Signaling.lex.tex", + "sha256": "97bdfb5160e41a4ed3ab30788f2e3a558836f622c237e4bd3496536212b330c9" + }, + { + "path": "app/src/Stitch/System.lex.tex", + "sha256": "b05a639514a2c56f40b8e960c6cf31023aec8b20d1c18c5ed68a0a936a9d7119" + }, + { + "path": "app/src/Stitch/VmAdministration.lex.tex", + "sha256": "4e578e7e5c9a4f1c83d0181acae555a1c184dd72777473465448a7675b2bb32c" + }, + { + "path": "app/src/StitchApp.lex.tex", + "sha256": "ffd8a4b6b9072b27b06d67d61e1c11d085a6b82e84be4610f27f3805d87f675b" + } + ] +} diff --git a/docs/evidence/native-candidate-466/stitch/verify.log b/docs/evidence/native-candidate-466/stitch/verify.log new file mode 100644 index 0000000..6b26063 --- /dev/null +++ b/docs/evidence/native-candidate-466/stitch/verify.log @@ -0,0 +1 @@ +verified 25 modules; attestation f8a8f3cde75f310721acf22c24e4cdf8f8594dbc105cbef144d4422d229382e4 diff --git a/docs/evidence/native-candidate-466/template/build.log b/docs/evidence/native-candidate-466/template/build.log new file mode 100644 index 0000000..ac1f757 --- /dev/null +++ b/docs/evidence/native-candidate-466/template/build.log @@ -0,0 +1 @@ +built 3 modules at .lexlean/build/73325d95c8673e962b5a7ad9a3eb9a8b99128271f9dbfb68b5e502c7d0b6b22d diff --git a/docs/evidence/native-candidate-466/template/generated-native-inputs.json b/docs/evidence/native-candidate-466/template/generated-native-inputs.json new file mode 100644 index 0000000..f0d5054 --- /dev/null +++ b/docs/evidence/native-candidate-466/template/generated-native-inputs.json @@ -0,0 +1,18 @@ +[ + { + "path": "LexLeanRuntime/Portable.lean", + "sha256": "9a081b865659a3c13a6721ef7c5c93aec0b1ae2ce63bbd38286ec6d28483f8de" + }, + { + "path": "PrismTemplateContract/Contract.lean", + "sha256": "84af5e952d4d71385ccfb68a9504698309a2a86600654b6cd2932750e1c15909" + }, + { + "path": "PrismTemplateContract/Foundation/Bytes.lean", + "sha256": "c94b21a09161a40b314baddaeb68329b8fad4ebf0060ac7160338f94a1bd679e" + }, + { + "path": "PrismTemplateContract/Foundation/View/Text/V1/Model.lean", + "sha256": "26c14f6e6ad7391233a0979848ff2650d38a3792f9f268ce0e8646ed2b0d5b74" + } +] diff --git a/docs/evidence/native-candidate-466/template/lakefile.toml b/docs/evidence/native-candidate-466/template/lakefile.toml new file mode 100644 index 0000000..55cf2a2 --- /dev/null +++ b/docs/evidence/native-candidate-466/template/lakefile.toml @@ -0,0 +1,7 @@ +name = "prismpm_verify" +version = "0.1.0" + +[[lean_lib]] +name = "PrismGenerated" +roots = ["LexLeanRuntime.Portable", "PrismTemplateContract.Contract", "PrismTemplateContract.Foundation.Bytes", "PrismTemplateContract.Foundation.View.Text.V1.Model"] +moreLeanArgs = ["-j2"] diff --git a/docs/evidence/native-candidate-466/template/native-result.json b/docs/evidence/native-candidate-466/template/native-result.json new file mode 100644 index 0000000..9857721 --- /dev/null +++ b/docs/evidence/native-candidate-466/template/native-result.json @@ -0,0 +1 @@ +{"seconds": 11.096880868077278, "exit": 0} \ No newline at end of file diff --git a/docs/evidence/native-candidate-466/template/native.log b/docs/evidence/native-candidate-466/template/native.log new file mode 100644 index 0000000..495885c --- /dev/null +++ b/docs/evidence/native-candidate-466/template/native.log @@ -0,0 +1,14 @@ +info: prismpm_verify: no previous manifest, creating one from scratch +info: toolchain not updated; no toolchain information found +✔ [0/6] Ran job computation +✔ [1/6] Ran prismpm_verify:extraDep +ℹ [2/6] Built PrismTemplateContract.Foundation.View.Text.V1.Model (233ms) +trace: .> LEAN_PATH=/tmp/template-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/template-466-diagnostic/native/PrismTemplateContract/Foundation/View/Text/V1/Model.lean -o /tmp/template-466-diagnostic/native/.lake/build/lib/lean/PrismTemplateContract/Foundation/View/Text/V1/Model.olean -i /tmp/template-466-diagnostic/native/.lake/build/lib/lean/PrismTemplateContract/Foundation/View/Text/V1/Model.ilean -c /tmp/template-466-diagnostic/native/.lake/build/ir/PrismTemplateContract/Foundation/View/Text/V1/Model.c --setup /tmp/template-466-diagnostic/native/.lake/build/ir/PrismTemplateContract/Foundation/View/Text/V1/Model.setup.json --json +ℹ [3/6] Built LexLeanRuntime.Portable (3.2s) +trace: .> LEAN_PATH=/tmp/template-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/template-466-diagnostic/native/LexLeanRuntime/Portable.lean -o /tmp/template-466-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Portable.olean -i /tmp/template-466-diagnostic/native/.lake/build/lib/lean/LexLeanRuntime/Portable.ilean -c /tmp/template-466-diagnostic/native/.lake/build/ir/LexLeanRuntime/Portable.c --setup /tmp/template-466-diagnostic/native/.lake/build/ir/LexLeanRuntime/Portable.setup.json --json +ℹ [4/6] Built PrismTemplateContract.Foundation.Bytes (191ms) +trace: .> LEAN_PATH=/tmp/template-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/template-466-diagnostic/native/PrismTemplateContract/Foundation/Bytes.lean -o /tmp/template-466-diagnostic/native/.lake/build/lib/lean/PrismTemplateContract/Foundation/Bytes.olean -i /tmp/template-466-diagnostic/native/.lake/build/lib/lean/PrismTemplateContract/Foundation/Bytes.ilean -c /tmp/template-466-diagnostic/native/.lake/build/ir/PrismTemplateContract/Foundation/Bytes.c --setup /tmp/template-466-diagnostic/native/.lake/build/ir/PrismTemplateContract/Foundation/Bytes.setup.json --json +ℹ [5/6] Built PrismTemplateContract.Contract (7.6s) +trace: .> LEAN_PATH=/tmp/template-466-diagnostic/native/.lake/build/lib/lean /tmp/stitch-lean/lean-4.32.1-linux/bin/lean -j2 /tmp/template-466-diagnostic/native/PrismTemplateContract/Contract.lean -o /tmp/template-466-diagnostic/native/.lake/build/lib/lean/PrismTemplateContract/Contract.olean -i /tmp/template-466-diagnostic/native/.lake/build/lib/lean/PrismTemplateContract/Contract.ilean -c /tmp/template-466-diagnostic/native/.lake/build/ir/PrismTemplateContract/Contract.c --setup /tmp/template-466-diagnostic/native/.lake/build/ir/PrismTemplateContract/Contract.setup.json --json +✔ [6/6] Ran prismpm_verify/PrismGenerated:default +Build completed successfully (6 jobs). diff --git a/docs/evidence/native-candidate-466/template/source-provenance.json b/docs/evidence/native-candidate-466/template/source-provenance.json new file mode 100644 index 0000000..5a9cf0b --- /dev/null +++ b/docs/evidence/native-candidate-466/template/source-provenance.json @@ -0,0 +1,17 @@ +{ + "source_commit": "a7a3041cd85d745bb2d6dfc7ee72513185fa48be", + "files": [ + { + "path": "app/src/Contract.lex.tex", + "sha256": "9b5e120204c51602fc783cc2f6bea7456ec64882877528341b523a4f4a580fb3" + }, + { + "path": "app/src/Foundation/Bytes.lex.tex", + "sha256": "ce16e5b439128db3231979381f4599d3ff0617f62c2bf00c348bba35393abcd6" + }, + { + "path": "app/src/Foundation/View/Text/V1/Model.lex.tex", + "sha256": "db124343ad8fe1295bc8eb305c7f59f83cf6ad76d46a5cabea500fe66f3ad5dc" + } + ] +} diff --git a/docs/evidence/native-candidate-466/template/verify.log b/docs/evidence/native-candidate-466/template/verify.log new file mode 100644 index 0000000..2828678 --- /dev/null +++ b/docs/evidence/native-candidate-466/template/verify.log @@ -0,0 +1 @@ +verified 3 modules; attestation 8467b85f3a910a0991610b9999fb8d8285d3ef954e4ee3029d7c49dea2ae3164 diff --git a/docs/evidence/native-fixture-writer-466/README.md b/docs/evidence/native-fixture-writer-466/README.md new file mode 100644 index 0000000..188a1eb --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/README.md @@ -0,0 +1,28 @@ +# Actual regeneration of two LexLean fixture expectations + +The [fork diagnostic run](https://github.com/afflom/stitch/actions/runs/42938289470) +passed at Stitch diagnostic commit `42127189e465c0056ae3416468f44289c48431f3`. +It checked out unchanged LexLean source `cc5561203de8fa5594d573904147a306b2b8bbbf`, +tree `c2bbc659b3cea7d58f2a2d0557579d8b2e92ff9e`, with Rust 1.97.1 and Lean 4.32.1. + +The public `repo_conformance::fixtures::write` implementation used by the normal +fixture writer regenerated exactly `certificate-resource-exhausted` and +`preservation-drift`. Each then passed a fresh `fixtures::check` observation. +The helper did not serialize expected output itself or alter either fixture. + +The preserved patch changes only four JSON files. Both command and diagnostic +records reflect generated module size 274972 → 275460 or Core.lean location +806:8 → 820:8. Comparison with the exact upstream source confirms no other byte +change. Codes LLS8002/LLV7014, exit statuses 4/3, unsuccessful verification and +empty artifacts remain unchanged. `review.json` records the exact output hashes. + +Artifact `13819487356` was downloaded and verified against SHA-256 +`5c585acedcddc986254f438b35a239b863cab610a3e2c8ebebe0824e6b7efa8a`. +Its original patch, generated files, writer log and toolchain/source records are +preserved here. These observations do not establish which earlier change caused +the drift. They also do not replace full EX-07, final PR acceptance or qualified +SDK construction. No upstream LexLean branch or PR was changed by this run. + +The earlier diagnostic run stopped before generation because its temporary +helper lacked crate documentation. The passing run added that documentation; +the existing lint, writer and fixture checks remained enabled. diff --git a/docs/evidence/native-fixture-writer-466/README.txt b/docs/evidence/native-fixture-writer-466/README.txt new file mode 100644 index 0000000..1317755 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/README.txt @@ -0,0 +1 @@ +Generated by the unchanged repo_conformance::fixtures::write owning implementation used by cargo xtask check-fixtures --write, selected to the two actual failing fixture directories. Each was checked by an independent fixtures::check run. No custom serialization or manual oracle editing. This is generation evidence, not a replacement for full EX07 or final acceptance. diff --git a/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/artifacts.json b/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/artifacts.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/artifacts.json @@ -0,0 +1 @@ +[] diff --git a/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/command.json b/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/command.json new file mode 100644 index 0000000..6fe3aa1 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/command.json @@ -0,0 +1 @@ +{"artifacts":[],"command":"verify","diagnostics":[{"causes":[],"code":"LLS8002","help":[],"labels":[],"message":"the pinned Lean exhausted a resource checking `LexLeanPreserve.Cafc7144f8603badcdadce463a7faf8c3.R0` (maximum number of heartbeats): the generated module is 275460 bytes, at least a quarter of max_file_bytes 262144, and is beyond what the machine checks","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}],"exit_code":4,"modules":[],"spec":"lexlean/command-result/1","success":false} diff --git a/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/diagnostics.json b/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/diagnostics.json new file mode 100644 index 0000000..9c20c26 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/diagnostics.json @@ -0,0 +1 @@ +[{"causes":[],"code":"LLS8002","help":[],"labels":[],"message":"the pinned Lean exhausted a resource checking `LexLeanPreserve.Cafc7144f8603badcdadce463a7faf8c3.R0` (maximum number of heartbeats): the generated module is 275460 bytes, at least a quarter of max_file_bytes 262144, and is beyond what the machine checks","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}] diff --git a/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/hashes.toml b/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/hashes.toml new file mode 100644 index 0000000..a8f66a2 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/hashes.toml @@ -0,0 +1,8 @@ +# Platform-independent artifact hashes (compared exactly) and the +# process-bound files whose bytes vary per host, toolchain build, and +# compiler executable (presence only). SPEC.md §28.2, §28.4. + +[platform_independent] + +[process_bound] +files = [] diff --git a/docs/evidence/native-fixture-writer-466/changed-paths.txt b/docs/evidence/native-fixture-writer-466/changed-paths.txt new file mode 100644 index 0000000..d5eab68 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/changed-paths.txt @@ -0,0 +1,4 @@ +tests/negative/certificate-resource-exhausted/expected/command.json +tests/negative/certificate-resource-exhausted/expected/diagnostics.json +tests/negative/preservation-drift/expected/command.json +tests/negative/preservation-drift/expected/diagnostics.json diff --git a/docs/evidence/native-fixture-writer-466/generated-fixtures.patch b/docs/evidence/native-fixture-writer-466/generated-fixtures.patch new file mode 100644 index 0000000..d9c09c3 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/generated-fixtures.patch @@ -0,0 +1,28 @@ +diff --git a/tests/negative/certificate-resource-exhausted/expected/command.json b/tests/negative/certificate-resource-exhausted/expected/command.json +index ac21098..6fe3aa1 100644 +--- a/tests/negative/certificate-resource-exhausted/expected/command.json ++++ b/tests/negative/certificate-resource-exhausted/expected/command.json +@@ -1 +1 @@ +-{"artifacts":[],"command":"verify","diagnostics":[{"causes":[],"code":"LLS8002","help":[],"labels":[],"message":"the pinned Lean exhausted a resource checking `LexLeanPreserve.Cafc7144f8603badcdadce463a7faf8c3.R0` (maximum number of heartbeats): the generated module is 274972 bytes, at least a quarter of max_file_bytes 262144, and is beyond what the machine checks","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}],"exit_code":4,"modules":[],"spec":"lexlean/command-result/1","success":false} ++{"artifacts":[],"command":"verify","diagnostics":[{"causes":[],"code":"LLS8002","help":[],"labels":[],"message":"the pinned Lean exhausted a resource checking `LexLeanPreserve.Cafc7144f8603badcdadce463a7faf8c3.R0` (maximum number of heartbeats): the generated module is 275460 bytes, at least a quarter of max_file_bytes 262144, and is beyond what the machine checks","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}],"exit_code":4,"modules":[],"spec":"lexlean/command-result/1","success":false} +diff --git a/tests/negative/certificate-resource-exhausted/expected/diagnostics.json b/tests/negative/certificate-resource-exhausted/expected/diagnostics.json +index 2a8dc51..9c20c26 100644 +--- a/tests/negative/certificate-resource-exhausted/expected/diagnostics.json ++++ b/tests/negative/certificate-resource-exhausted/expected/diagnostics.json +@@ -1 +1 @@ +-[{"causes":[],"code":"LLS8002","help":[],"labels":[],"message":"the pinned Lean exhausted a resource checking `LexLeanPreserve.Cafc7144f8603badcdadce463a7faf8c3.R0` (maximum number of heartbeats): the generated module is 274972 bytes, at least a quarter of max_file_bytes 262144, and is beyond what the machine checks","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}] ++[{"causes":[],"code":"LLS8002","help":[],"labels":[],"message":"the pinned Lean exhausted a resource checking `LexLeanPreserve.Cafc7144f8603badcdadce463a7faf8c3.R0` (maximum number of heartbeats): the generated module is 275460 bytes, at least a quarter of max_file_bytes 262144, and is beyond what the machine checks","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}] +diff --git a/tests/negative/preservation-drift/expected/command.json b/tests/negative/preservation-drift/expected/command.json +index a54aa25..a966671 100644 +--- a/tests/negative/preservation-drift/expected/command.json ++++ b/tests/negative/preservation-drift/expected/command.json +@@ -1 +1 @@ +-{"artifacts":[],"command":"verify","diagnostics":[{"causes":[],"code":"LLV7014","help":[],"labels":[],"message":"preservation environment: `LexLeanPreservation.Core` does not compile silently under the pinned Lean: error: Type mismatch\n rfl\nhas type\n ?m.8 = ?m.8\nbut is expected to have type\n 1 = 2\n$STAGING/preserve-src/LexLeanPreservation/Core.lean:806:8: error: Not a definitional equality: the left-hand side\n 1\nis not definitionally equal to the right-hand side\n 2\n","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}],"exit_code":3,"modules":[],"spec":"lexlean/command-result/1","success":false} ++{"artifacts":[],"command":"verify","diagnostics":[{"causes":[],"code":"LLV7014","help":[],"labels":[],"message":"preservation environment: `LexLeanPreservation.Core` does not compile silently under the pinned Lean: error: Type mismatch\n rfl\nhas type\n ?m.8 = ?m.8\nbut is expected to have type\n 1 = 2\n$STAGING/preserve-src/LexLeanPreservation/Core.lean:820:8: error: Not a definitional equality: the left-hand side\n 1\nis not definitionally equal to the right-hand side\n 2\n","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}],"exit_code":3,"modules":[],"spec":"lexlean/command-result/1","success":false} +diff --git a/tests/negative/preservation-drift/expected/diagnostics.json b/tests/negative/preservation-drift/expected/diagnostics.json +index cc112b5..5e607b8 100644 +--- a/tests/negative/preservation-drift/expected/diagnostics.json ++++ b/tests/negative/preservation-drift/expected/diagnostics.json +@@ -1 +1 @@ +-[{"causes":[],"code":"LLV7014","help":[],"labels":[],"message":"preservation environment: `LexLeanPreservation.Core` does not compile silently under the pinned Lean: error: Type mismatch\n rfl\nhas type\n ?m.8 = ?m.8\nbut is expected to have type\n 1 = 2\n$STAGING/preserve-src/LexLeanPreservation/Core.lean:806:8: error: Not a definitional equality: the left-hand side\n 1\nis not definitionally equal to the right-hand side\n 2\n","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}] ++[{"causes":[],"code":"LLV7014","help":[],"labels":[],"message":"preservation environment: `LexLeanPreservation.Core` does not compile silently under the pinned Lean: error: Type mismatch\n rfl\nhas type\n ?m.8 = ?m.8\nbut is expected to have type\n 1 = 2\n$STAGING/preserve-src/LexLeanPreservation/Core.lean:820:8: error: Not a definitional equality: the left-hand side\n 1\nis not definitionally equal to the right-hand side\n 2\n","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}] diff --git a/docs/evidence/native-fixture-writer-466/lean-version.txt b/docs/evidence/native-fixture-writer-466/lean-version.txt new file mode 100644 index 0000000..63c062a --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/lean-version.txt @@ -0,0 +1 @@ +Lean (version 4.32.1, x86_64-unknown-linux-gnu, commit f054605aea4b840552cca2e725580bffd1e1b704, Release) diff --git a/docs/evidence/native-fixture-writer-466/preservation-drift/artifacts.json b/docs/evidence/native-fixture-writer-466/preservation-drift/artifacts.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/preservation-drift/artifacts.json @@ -0,0 +1 @@ +[] diff --git a/docs/evidence/native-fixture-writer-466/preservation-drift/command.json b/docs/evidence/native-fixture-writer-466/preservation-drift/command.json new file mode 100644 index 0000000..a966671 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/preservation-drift/command.json @@ -0,0 +1 @@ +{"artifacts":[],"command":"verify","diagnostics":[{"causes":[],"code":"LLV7014","help":[],"labels":[],"message":"preservation environment: `LexLeanPreservation.Core` does not compile silently under the pinned Lean: error: Type mismatch\n rfl\nhas type\n ?m.8 = ?m.8\nbut is expected to have type\n 1 = 2\n$STAGING/preserve-src/LexLeanPreservation/Core.lean:820:8: error: Not a definitional equality: the left-hand side\n 1\nis not definitionally equal to the right-hand side\n 2\n","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}],"exit_code":3,"modules":[],"spec":"lexlean/command-result/1","success":false} diff --git a/docs/evidence/native-fixture-writer-466/preservation-drift/diagnostics.json b/docs/evidence/native-fixture-writer-466/preservation-drift/diagnostics.json new file mode 100644 index 0000000..5e607b8 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/preservation-drift/diagnostics.json @@ -0,0 +1 @@ +[{"causes":[],"code":"LLV7014","help":[],"labels":[],"message":"preservation environment: `LexLeanPreservation.Core` does not compile silently under the pinned Lean: error: Type mismatch\n rfl\nhas type\n ?m.8 = ?m.8\nbut is expected to have type\n 1 = 2\n$STAGING/preserve-src/LexLeanPreservation/Core.lean:820:8: error: Not a definitional equality: the left-hand side\n 1\nis not definitionally equal to the right-hand side\n 2\n","notes":[],"primary":{"byte_end":0,"byte_start":0,"column_end":1,"column_start":1,"line_end":1,"line_start":1,"path":"lexlean.toml"},"severity":"error","spec":"lexlean/diagnostic/1"}] diff --git a/docs/evidence/native-fixture-writer-466/preservation-drift/hashes.toml b/docs/evidence/native-fixture-writer-466/preservation-drift/hashes.toml new file mode 100644 index 0000000..a8f66a2 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/preservation-drift/hashes.toml @@ -0,0 +1,8 @@ +# Platform-independent artifact hashes (compared exactly) and the +# process-bound files whose bytes vary per host, toolchain build, and +# compiler executable (presence only). SPEC.md §28.2, §28.4. + +[platform_independent] + +[process_bound] +files = [] diff --git a/docs/evidence/native-fixture-writer-466/review.json b/docs/evidence/native-fixture-writer-466/review.json new file mode 100644 index 0000000..eb568c5 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/review.json @@ -0,0 +1,28 @@ +{ + "source_commit": "cc5561203de8fa5594d573904147a306b2b8bbbf", + "source_tree": "c2bbc659b3cea7d58f2a2d0557579d8b2e92ff9e", + "diagnostic_head": "42127189e465c0056ae3416468f44289c48431f3", + "run": 42938289470, + "job": 130253666946, + "artifact": 13819487356, + "artifact_sha256": "5c585acedcddc986254f438b35a239b863cab610a3e2c8ebebe0824e6b7efa8a", + "changed_files": { + "certificate-resource-exhausted/command.json": { + "sha256": "9e1ee2607766df4009cf8f23918fc1ea61a17bd4975c7bfbd55d12843e6f8e1b", + "bytes": 630 + }, + "certificate-resource-exhausted/diagnostics.json": { + "sha256": "daf6c392ca007ccc5e0d2524491b9c47fa84c38f7b71412f42a1326491e8b0d1", + "bytes": 503 + }, + "preservation-drift/command.json": { + "sha256": "63f28680a9a084d5a6987e0a1af80e0dd91e1eee73a9dc84f9d212467dfa6650", + "bytes": 749 + }, + "preservation-drift/diagnostics.json": { + "sha256": "f09ac081407dd4c451b26c5db700fb2d03d9f7ca44087f59f5fb7e49b2a85123", + "bytes": 622 + } + }, + "finding": "Exactly the two observed diagnostic metadata shifts, each in command and diagnostics JSON. No other byte change, error code, exit status, success flag, artifact policy or test weakening." +} diff --git a/docs/evidence/native-fixture-writer-466/rust-version.txt b/docs/evidence/native-fixture-writer-466/rust-version.txt new file mode 100644 index 0000000..e6706a0 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/rust-version.txt @@ -0,0 +1,7 @@ +rustc 1.97.1 (8bab26f4f 2026-07-14) +binary: rustc +commit-hash: 8bab26f4f68e0e26f0bb7960be334d5b520ea452 +commit-date: 2026-07-14 +host: x86_64-unknown-linux-gnu +release: 1.97.1 +LLVM version: 22.1.6 diff --git a/docs/evidence/native-fixture-writer-466/source-commit.txt b/docs/evidence/native-fixture-writer-466/source-commit.txt new file mode 100644 index 0000000..5aa8435 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/source-commit.txt @@ -0,0 +1 @@ +cc5561203de8fa5594d573904147a306b2b8bbbf diff --git a/docs/evidence/native-fixture-writer-466/source-tree.txt b/docs/evidence/native-fixture-writer-466/source-tree.txt new file mode 100644 index 0000000..0c0cc2a --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/source-tree.txt @@ -0,0 +1 @@ +c2bbc659b3cea7d58f2a2d0557579d8b2e92ff9e diff --git a/docs/evidence/native-fixture-writer-466/writer.log b/docs/evidence/native-fixture-writer-466/writer.log new file mode 100644 index 0000000..0f2b4d7 --- /dev/null +++ b/docs/evidence/native-fixture-writer-466/writer.log @@ -0,0 +1,131 @@ + Updating crates.io index + Downloading crates ... + Downloaded anstyle-query v1.1.5 + Downloaded anstyle v1.0.14 + Downloaded anstream v1.0.0 + Downloaded anstyle-parse v1.0.0 + Downloaded bitflags v2.13.1 + Downloaded generic-array v0.14.7 + Downloaded is_terminal_polyfill v1.70.2 + Downloaded itoa v1.0.18 + Downloaded same-file v1.0.6 + Downloaded strsim v0.11.1 + Downloaded equivalent v1.0.2 + Downloaded errno v0.3.14 + Downloaded toml_write v0.1.2 + Downloaded version_check v0.9.5 + Downloaded utf8parse v0.2.2 + Downloaded crypto-common v0.1.7 + Downloaded serde_spanned v0.6.9 + Downloaded fs4 v0.13.1 + Downloaded tinyvec_macros v0.1.1 + Downloaded clap_lex v1.1.0 + Downloaded cpufeatures v0.2.17 + Downloaded toml_datetime v0.6.11 + Downloaded colorchoice v1.0.5 + Downloaded cfg-if v1.0.4 + Downloaded heck v0.5.0 + Downloaded block-buffer v0.10.4 + Downloaded quote v1.0.47 + Downloaded sha2 v0.10.9 + Downloaded zmij v1.0.23 + Downloaded signal-hook-registry v1.4.8 + Downloaded fastrand v2.5.0 + Downloaded semver v1.0.28 + Downloaded camino v1.2.5 + Downloaded getrandom v0.4.3 + Downloaded serde_derive v1.0.229 + Downloaded tinyvec v1.12.0 + Downloaded digest v0.10.7 + Downloaded toml v0.8.23 + Downloaded walkdir v2.5.0 + Downloaded once_cell v1.21.4 + Downloaded signal-hook v0.3.18 + Downloaded tempfile v3.27.0 + Downloaded proc-macro2 v1.0.107 + Downloaded clap_derive v4.6.4 + Downloaded serde_core v1.0.229 + Downloaded unicode-ident v1.0.24 + Downloaded memchr v2.8.3 + Downloaded toml_edit v0.22.27 + Downloaded clap v4.6.6 + Downloaded typenum v1.20.1 + Downloaded serde v1.0.229 + Downloaded indexmap v2.14.0 + Downloaded hashbrown v0.17.1 + Downloaded unicode-normalization v0.1.25 + Downloaded serde_json v1.0.151 + Downloaded winnow v0.7.15 + Downloaded clap_builder v4.6.6 + Downloaded syn v3.0.3 + Downloaded rustix v1.1.4 + Downloaded libc v0.2.189 + Downloaded linux-raw-sys v0.12.1 + Compiling proc-macro2 v1.0.107 + Compiling quote v1.0.47 + Compiling unicode-ident v1.0.24 + Compiling serde_core v1.0.229 + Compiling version_check v0.9.5 + Compiling serde v1.0.229 + Compiling generic-array v0.14.7 + Compiling libc v0.2.189 + Compiling typenum v1.20.1 + Compiling syn v3.0.3 + Compiling utf8parse v0.2.2 + Compiling rustix v1.1.4 + Compiling hashbrown v0.17.1 + Compiling cfg-if v1.0.4 + Compiling equivalent v1.0.2 + Compiling anstyle-parse v1.0.0 + Compiling crypto-common v0.1.7 + Compiling block-buffer v0.10.4 + Compiling winnow v0.7.15 + Compiling anstyle v1.0.14 + Compiling indexmap v2.14.0 + Compiling anstyle-query v1.1.5 + Compiling linux-raw-sys v0.12.1 + Compiling getrandom v0.4.3 + Compiling zmij v1.0.23 + Compiling bitflags v2.13.1 + Compiling colorchoice v1.0.5 + Compiling is_terminal_polyfill v1.70.2 + Compiling toml_write v0.1.2 + Compiling anstream v1.0.0 + Compiling digest v0.10.7 + Compiling errno v0.3.14 + Compiling cpufeatures v0.2.17 + Compiling serde_json v1.0.151 + Compiling strsim v0.11.1 + Compiling camino v1.2.5 + Compiling signal-hook v0.3.18 + Compiling clap_lex v1.1.0 + Compiling heck v0.5.0 + Compiling serde_derive v1.0.229 + Compiling tinyvec_macros v0.1.1 + Compiling clap_derive v4.6.4 + Compiling tinyvec v1.12.0 + Compiling clap_builder v4.6.6 + Compiling sha2 v0.10.9 + Compiling signal-hook-registry v1.4.8 + Compiling fastrand v2.5.0 + Compiling lexlean v0.4.0 (/home/runner/work/stitch/stitch/crates/lexlean) + Compiling memchr v2.8.3 + Compiling once_cell v1.21.4 + Compiling same-file v1.0.6 + Compiling itoa v1.0.18 + Compiling walkdir v2.5.0 + Compiling serde_spanned v0.6.9 + Compiling toml_datetime v0.6.11 + Compiling tempfile v3.27.0 + Compiling toml_edit v0.22.27 + Compiling clap v4.6.6 + Compiling fs4 v0.13.1 + Compiling unicode-normalization v0.1.25 + Compiling semver v1.0.28 + Compiling toml v0.8.23 + Compiling repo-model v0.4.0 (/home/runner/work/stitch/stitch/crates/model) + Compiling repo-conformance v0.4.0 (/home/runner/work/stitch/stitch/crates/conformance) + Finished `dev` profile [unoptimized + debuginfo] target(s) in 54.22s + Running `target/debug/native-fixture-writer` +WROTE AND CHECKED certificate-resource-exhausted +WROTE AND CHECKED preservation-drift diff --git a/docs/evidence/source-authoring/5002a66d/budget-audit.process.json b/docs/evidence/source-authoring/5002a66d/budget-audit.process.json new file mode 100644 index 0000000..d649612 --- /dev/null +++ b/docs/evidence/source-authoring/5002a66d/budget-audit.process.json @@ -0,0 +1 @@ +{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Aec976503f7b238e67406ed6378c2a66c.StitchModel.Stitch.Budget.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Aec976503f7b238e67406ed6378c2a66c.StitchModel.Stitch.Budget","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Budget.Budget' does not depend on any axioms\n'StitchModel.Stitch.Budget.Ledger' does not depend on any axioms\n'StitchModel.Stitch.Budget.Reservation' does not depend on any axioms\n'StitchModel.Stitch.Budget.Resources' does not depend on any axioms\n'StitchModel.Stitch.Budget.Selection' does not depend on any axioms\n'StitchModel.Stitch.Budget.SettlementObservation' does not depend on any axioms\n'StitchModel.Stitch.Budget.SettlementOutcome' does not depend on any axioms\n'StitchModel.Stitch.Budget.addResources' does not depend on any axioms\n'StitchModel.Stitch.Budget.admitAction' does not depend on any axioms\n'StitchModel.Stitch.Budget.boolAndFalse' does not depend on any axioms\n'StitchModel.Stitch.Budget.boolFalseAnd' does not depend on any axioms\n'StitchModel.Stitch.Budget.boolImpliesTruth' does not depend on any axioms\n'StitchModel.Stitch.Budget.boolNotTrue' does not depend on any axioms\n'StitchModel.Stitch.Budget.budgetValid' does not depend on any axioms\n'StitchModel.Stitch.Budget.chargeComparisonObserved' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.chargeFourConjunctionFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.chargedAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseBoolFalse' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseBoolTrue' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseNat' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseNatFalse' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseNatTrue' does not depend on any axioms\n'StitchModel.Stitch.Budget.clockRollbackRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.headChargedAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.ledgerBudget' does not depend on any axioms\n'StitchModel.Stitch.Budget.ledgerValid' does not depend on any axioms\n'StitchModel.Stitch.Budget.ledgerValiditySelect' does not depend on any axioms\n'StitchModel.Stitch.Budget.outcomeKnown' does not depend on any axioms\n'StitchModel.Stitch.Budget.recordSettlement' does not depend on any axioms\n'StitchModel.Stitch.Budget.recordSettlementFrom' does not depend on any axioms\n'StitchModel.Stitch.Budget.recordedIdCannotBeReservedAgain' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationCandidate' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationCandidateClock' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationCandidateGuarantee' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.reservationCandidateListGuarantee' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationCandidateNumericGuarantee' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.reservationConjunctionClosure' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationCostValid' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationEpochReflexive' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationFreshCostValidity' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationLedgerClockSelect' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationLedgerParts' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationListAdmissionFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationNumericValidity' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationPreservesLimit' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.reservationSelectNat' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationSelectedClockFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationSelectedSafety' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationTrueAnd' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationUnused' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationValidityOrder' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationsValid' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveAction' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveAllowed' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveAmount' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveLedger' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveLedgerAllowed' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveLedgerClockFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reserveLedgerPreservesValidity' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.reserveLedgerPreservesValidityFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.reservedAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservedTotal' does not depend on any axioms\n'StitchModel.Stitch.Budget.resourceAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.resourceAtBound' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.resourceAtChargeConstraint' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.resourcesAtMost' does not depend on any axioms\n'StitchModel.Stitch.Budget.resourcesWithin' does not depend on any axioms\n'StitchModel.Stitch.Budget.sameResources' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarAccounting' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarAccountingStep' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarAdditionCancellation' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.scalarAdditionMonotone' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarBoolToBound' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.scalarBoundToBool' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.scalarChargeObservation' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarChargeRejected' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarChargeSafe' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarCheckAdditionCancellation' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.scalarCheckComparisonCongruence' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarCheckReflected' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarConsChargeCheck' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.scalarFreshChargeCheck' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarFreshChargeGate' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarSameConsequent' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarSettlementFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarSettlementSafety' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarStepChargeGuarantee' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarStepChargeSafe' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarTrueConsequent' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.scalarTrueConsequentObserved' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.selectBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectBoolFromBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectBoolFromValue' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectBoth' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectLedger' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectNat' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectNatFromBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectRemaining' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedAdmissionSafety' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordCeiling' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordCharge' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordChargeExpanded' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordCostValidity' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordEpoch' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordId' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedSettlementRecord' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectionFromBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectionValue' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectionValueFromBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.settleLedger' does not depend on any axioms\n'StitchModel.Stitch.Budget.settleLedgerAllowed' does not depend on any axioms\n'StitchModel.Stitch.Budget.settleLedgerClockFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settleLedgerPreservesValidity' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.settleLedgerPreservesValidityFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.settleReserved' does not depend on any axioms\n'StitchModel.Stitch.Budget.settleSpent' does not depend on any axioms\n'StitchModel.Stitch.Budget.settledHeadCannotBeChargedAgain' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settledSelectionChargeStep' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementAllowed' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementCandidate' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementCandidateClock' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementCandidateGuarantee' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.settlementCandidateListBoolean' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementCandidateListGuarantee' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementCandidateNumericBoolean' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.settlementCandidateNumericGuarantee' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.settlementCandidateNumericTransferFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.settlementCannotIncreaseLedgerCharge' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.settlementCannotIncreaseLedgerChargeFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.settlementClockRollbackRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.settlementDoesNotIncreaseCharge' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.settlementFromPreservesReservationValidity' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementFromPreservesUnusedIds' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementImplicationObserved' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementImplies' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementListDomainGate' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementListGateBooleanFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementListGateFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementNumericDomainGate' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementNumericGateBooleanFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementNumericGateFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementOldReservationsFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementPreservesReservationValidity' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementPreservesUnusedIds' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementRecorded' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementReservationValidityFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementValidityProjection' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementValidityStep' does not depend on any axioms\n'StitchModel.Stitch.Budget.spentAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.spentTotal' does not depend on any axioms\n'StitchModel.Stitch.Budget.staleEpochCannotSettle' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.unknownOutcomeRetainsLedger' does not depend on any axioms\n'StitchModel.Stitch.Budget.unknownSettlementRetainsReservation' does not depend on any axioms\n'StitchModel.Stitch.Budget.updateSettlementRecord' does not depend on any axioms\n'StitchModel.Stitch.Budget.vectorReservationPreservesBudget' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.zeroResources' does not depend on any axioms\n","stdout_sha256":"2a7cf4c5ead0cc23678c85edfe882855bf746425124dae52af83c2c639ed1855","tool":"lean"} diff --git a/docs/evidence/source-authoring/5002a66d/provenance.json b/docs/evidence/source-authoring/5002a66d/provenance.json new file mode 100644 index 0000000..fc9d29a --- /dev/null +++ b/docs/evidence/source-authoring/5002a66d/provenance.json @@ -0,0 +1,13 @@ +{ + "scope": "Original audit process record for diagnosing a convenience-parser defect; not a verification attestation or native certificate", + "repository": "afflom/stitch", + "revision": "5002a66d01915161049506198b05bbd1ec443b56", + "run": "https://github.com/afflom/stitch/actions/runs/43445915817", + "artifact_id": 14047868120, + "artifact_bytes": 3924126, + "artifact_sha256": "c30544930868cd51ba3dc81b058257777db9478aba303846ce9d47d4399c92e7", + "artifact_member": ".lexlean/axioms/audit/LexLeanAudit.Aec976503f7b238e67406ed6378c2a66c.StitchModel.Stitch.Budget.process.json", + "retained_file": "docs/evidence/source-authoring/5002a66d/budget-audit.process.json", + "retained_bytes": 13911, + "retained_sha256": "48bb5972cbb70022d0cfb9d26abbdd6a41e30e50d42d06987faaeacdf1fbce93" +} diff --git a/docs/guest-browser-qualification.md b/docs/guest-browser-qualification.md new file mode 100644 index 0000000..97ee46e --- /dev/null +++ b/docs/guest-browser-qualification.md @@ -0,0 +1,106 @@ +# Qualified guest candidate and production host evidence + +The exact qualified image is now adopted with a durable corresponding-source +route in [the source notice](../vendor/guest/SOURCE-NOTICE.md). Native Prism acceptance remains a separate +SDK requirement. No product-release or whole-host certification is claimed here. + +## Exact candidate + +- Image SHA-256: `313a6b545290a2b47856b49bfcc4c7577469749b315932ae008d39fe70fc7f07`. +- Image size: 8,053,248 bytes; kernel: Linux 6.18.7. +- Emulator: the repository's existing v86 JS/Wasm/BIOS assets, with 64 MiB RAM. +- Required host boot arguments: `console=tty0 console=ttyS0,115200 rdinit=/init nomodeset`. +- Original image build: [run 42906244489](https://github.com/afflom/stitch/actions/runs/42906244489). + Every qualification below reused that image; none rebuilt the guest/toolchain. + +## Integrated product qualification + +The [combined hosted run](https://github.com/afflom/stitch/actions/runs/42927033321) +at commit `0b0639d61f992bb851ee3e5b2e187d37328b5493` passed the ordinary production +runtime and browser jobs after adoption. Its product files match work checkpoint +`6f7e4d49990bb3a31abcb3328e526f769cc23b56`; only the existing diagnostic workflow +selects these jobs without repeating the separately blocked native SDK gate. +There is no temporary image replacement or host-source patch in this run. + +- 374 JavaScript tests, all five original strata, independent Python wire vectors + and the Rust test passed. +- All 10 actual Chromium scenarios passed in 1.1 minutes, including the permanent + production-image peer Ethernet regression (28.8 seconds) and full VM operator + lifecycle (21.7 seconds). +- The four final screenshots were inspected: ready, stopped, cancelled with + unknown prior effects, and destroyed with configuration unlocked. +- Peer packet/command evidence records natural neighbor recovery on the second + bounded probe, reverse ICMP, denied pre-grant and post-revocation probes, and + unchanged receiver admission count after revocation. + +Browser artifact `13813788967` has ZIP SHA-256 +`7a6bb111def5352b31f9cd1861811f67763a7152b1fc6a9f93fddde8b86e1002`. +The integrated model separately passed actual pinned LexLean/Lean/kernel replay: +25 modules, 1,324 declaration audits and 85 successful processes, retained as +attestation `f85d00e01268644324d3a86938d5270228a14dc7d1ca2a6eaaf0c8fd8011512c`. +This does not turn source proof or host checks into native Prism acceptance; +that remaining SDK gate is still required before declaring the branch ready. + +## Observed production scenarios + +[Final Chromium operator run](https://github.com/afflom/stitch/actions/runs/42923694084/job/130204644360) +at diagnostic commit `d998432925e562577a7559b126af1437e933c0d5` passed in +23.3 seconds. The runner downloaded and SHA-checked the existing image, substituted +it and the exact boot arguments in its temporary checkout, then tested the actual +production UI and VM adapter: + +- VGA and keyboard shell, host/guest 9p readiness nonce, shell output capture and + retained command reconciliation; +- optional network settings initially collapsed, explicit static IPv4/prefix, + correct pending and confirmed-stop/destruction observations; +- stop, destroy, fresh boot and cancellation after actual command dispatch; +- unknown prior command effects retained after confirmed stop/destruction; +- networking and runtime configuration locked while an instance is retained, + then unlocked after confirmed destruction. + +Four screenshots were inspected: ready, stopped, cancelled-command/confirmed-stop, +then destroyed/retained-unknown-command. They distinguish host termination from +command-effect uncertainty and show configuration unlock correctly. Artifact +`13811439946` has ZIP SHA-256 +`51704acb32e72d5b5ac9f99de8865acf582e32b2522541e876909a51141886fc`. + +[Chromium guest peer run](https://github.com/afflom/stitch/actions/runs/42921514892/job/130197253391) +at diagnostic commit `039d30025956b527253bc16c60addb9081976379` passed in +37.6 seconds. Two production VM instances used explicit `10.42.0.2/24` and +`10.42.0.3/24` configurations and a native, authenticated, host-only RTC channel. +The test exercised serial shell, default Ethernet denial, bilateral grants, +bidirectional ICMP, actual ARP/IPv4 packet delivery, receiver revocation and +unchanged filesystem budgets. No public signaling or STUN/TURN was used. + +The intentionally denied first ping left normal guest neighbor-cache state. +The positive phase used at most three genuine bounded ping attempts, without +flushing that state: the first attempt remained FAILED; the second became +REACHABLE and returned a reply. Reverse ping then succeeded. Revocation caused +100% loss while the receiving VM's admitted-frame count stayed unchanged. +Artifact `13812047028` retains exact packet headers, command outputs, neighbor +observations and distinct authenticated routing identities. This is not a +promise of immediate packet delivery or automatic address uniqueness. + +## Reuse and diagnosed deployment requirements + +Buildroot's `/init` wrapper mounts devtmpfs; bypassing it with `/sbin/init` left +console device nodes absent. The candidate's modern graphics driver otherwise +switches v86 away from its legacy text console; `nomodeset` preserves that console. +A probe must recognize a real shell prompt, not a kernel `#1` banner. These are +host/probe corrections, not reasons to repeat an hour-long image build. + +Runtime and source changes are tested by their owning checks. The final operator +fix changed UI settlement refresh, not the image, Ethernet forwarding or source +model; its source proof and previously qualified peer behavior were retained. +The complete feature-branch acceptance still runs after final integration. + +## Distribution boundary + +See [candidate source evidence](guest-candidate-evidence.md) for the verified +398,457,213-byte corresponding-source package, configurations, licenses and +hashes. Actions artifacts expire and are review outputs, not final source +hosting. The complete reviewed package is now preserved at the immutable +repository commit linked by the source notice; retain equivalent source access +alongside the image in every distribution. These checks do not establish cross-device +network availability, guest isolation, exhaustive resource-exhaustion behavior, +or native Prism artifact acceptance. diff --git a/docs/guest-candidate-evidence.md b/docs/guest-candidate-evidence.md new file mode 100644 index 0000000..7c6cbc7 --- /dev/null +++ b/docs/guest-candidate-evidence.md @@ -0,0 +1,97 @@ +# Guest candidate evidence, 2026-11-10 + +This records the build and source review of the subsequently adopted image. +See [hosted qualification](guest-browser-qualification.md) and the durable +[source notice](../vendor/guest/SOURCE-NOTICE.md). It is not native SDK acceptance. + +## Immutable build and inspection + +- Build run: https://github.com/afflom/stitch/actions/runs/42906244489 +- Build commit: `d17aa7f3ffc6944b799ac43f6a5bab04ab3b82ef`. +- Original artifact: `13810385970`, 758474204 bytes; ZIP SHA-256 + `91e8c082de05e97e0781e97f5636ae89a7b0095001192b3019ab9ff7054fc714`. +- Inspection run: https://github.com/afflom/stitch/actions/runs/42917114652 + on isolated diagnostic branch. Original ZIP and internal checksums passed; + source archive partition reassembly matched the unchanged archive digest. +- Candidate image SHA-256: + `313a6b545290a2b47856b49bfcc4c7577469749b315932ae008d39fe70fc7f07`. +- Image artifact `13810002248`; inspection artifact `13809487986`. +- Source parts: `13809457978` and `13809323434`, each below the connector's + 512 MiB limit. Reassemble in aa,ab order and check the supplied digests. +- These artifacts expire 2026-11-24; they are review outputs, not durable + corresponding-source distribution. + +## Exact failure and repair without rebuilding + +The 61-minute image/source build succeeded. Initial qualification failed after +180 seconds. The real guest booted Linux 6.18.7, initialized NE2000 Ethernet and +9p, then repeatedly reported missing `/dev/tty1` and `/dev/ttyS0`. + +The host command line selected `rdinit=/sbin/init`, bypassing Buildroot's +`/init` wrapper. That wrapper mounts devtmpfs before running `/sbin/init`; +initramfs does not automatically mount devtmpfs. In addition, the test's old +byte-stream prompt regex reacted to the `#` in the kernel's `#1` banner and +injected its command before the shell existed. + +The same unmodified candidate image passed after the qualifier supplied +`rdinit=/init` and waited for a newline-anchored, space-terminated shell prompt. +Actual bundled-v86 execution completed in 4.68 seconds with 64 MiB configured +memory, verifying boot, serial command execution, host-to-guest 9p contents, +guest-to-host independent readback and guest eth0 presence/configuration. +No toolchain/image rebuild or runtime asset replacement was needed. The host +must retain `rdinit=/init` for this exact image: its compiled default still +contains the earlier `rdinit=/sbin/init` setting. A future recipe cleanup can +correct that default during a justified image rebuild. + +This does not establish browser VGA/user-interface behavior, peer Ethernet +exchange/consent, administrator resource limits or reset/restart correctness. +Those paths were subsequently exercised in the linked hosted qualification. Do not rerun the full compiler +build merely to change or re-execute the small qualification script. + +## Actual corresponding-source inventory + +The inspection includes resolved Linux/BusyBox configs, Buildroot config, +target/host license manifests, complete source file inventory and build tail. +Target manifests identify Linux 6.18.7, BusyBox 1.38.0, glibc +`2.44-57-g34106fee698c83eb0af71d4d0381e66b399be746`, and GCC runtime components. +The archive includes corresponding package sources, applicable license texts, +BusyBox patches and their ordered series, and host build sources. + +`legal-info/README` reports the standard missing-Buildroot-source warning. This +is addressed by the separately saved `release-materials/buildroot-source.tar.gz` +(SHA-256 `5313d2b5c366ecb6771543a8a587e5fab57d4c254c6c99e575f44466c248dee1`), +plus the exact external-tree archive/configuration and build script. Preserve +those with the package source materials, rather than presenting `legal-info` +alone as complete. Final distribution can deduplicate identical archives; it +must retain actual required source, modifications and instructions, accessible +with the image. A generic upstream link or temporary Actions artifact alone +is not the completed distribution route. + +## Consumable source package prepared after inspection + +The original source archive is 721,901,605 bytes (SHA-256 +`ec0cb061df8f400ec2efbe36e18b9021ae91459c40b046bb9c40585d948d4635`). +It includes unnecessary glibc download-cache Git history: a 271,496,818-byte +pack and 21,747,832-byte index, although the actual 41,528,183-byte glibc source +archive is already present. + +A source-review package was assembled without that redundant cache, preserving +**all** existing `legal-info` target/host sources, license texts and patches, +original `release-materials`, resolved Linux/BusyBox configurations and their +hash inventory. Shared source archives retain hardlinks instead of repeated +copies. The result is 398,457,213 bytes, SHA-256 +`fbc04b0c55f8421ca9bcf9e9dbac1952c07a1a2d82fd644ac67e66415b0106bc`. +All 178 file-path checks and original release-material hashes pass. It fits a +single artifact download. It has now been durably published as verified parts +on a separate source-only Git branch, keeping bulky sources out of the product +feature diff. The immutable commit and reconstruction instructions are in the source notice. + +The necessary release set is the actual image's applicable target sources, +modifications/patches, licenses, configuration and build/install scripts, +including Buildroot and the external tree. General-purpose host tools do not +become a new universal source-disclosure obligation just because they were +used to compile it. This convenient package retains the already-collected host +source materials as well, rather than making further size optimization a +release barrier. Retain the published package with equivalent access +alongside the image and preserve its verified URL/hash notice. No claim +of independent bit-identical image reproduction is required or made. diff --git a/docs/legacy-benchmarks.md b/docs/legacy-benchmarks.md new file mode 100644 index 0000000..ac0a41a --- /dev/null +++ b/docs/legacy-benchmarks.md @@ -0,0 +1,140 @@ +# Historical prototype benchmarks + +This is the upstream README snapshot at `472349ba3df131c47a5116529de453f7d394cd40`, retained for comparison. Its tables are deterministic simulations, not field evidence. Historical wording such as “verified” for traces means structural validation only. Storage strategies have unequal repair opportunities and their result does not isolate coding from scheduling. The current model and guarantees are in [prism-model.md](prism-model.md). + +# stitch + +> **Stratified Routing-Layer Persistence, UOR Content-Addressed Ephemeral Storage, and Distributed Compute** +> Strict functional isolation across 5 testable layers with empirical head-to-head algorithm benchmarks. + +**Browser Benchmark & Telemetry Console (Zero Setup):** [https://syntra-labs.github.io/stitch/](https://syntra-labs.github.io/stitch/) + +--- + +## 1. Stratified Architecture & Isolation Rules + +![stitch 5-Layer Architecture & Public Control-Plane Dataflow](./architecture.svg) +*(Source PlantUML: [`architecture.puml`](./architecture.puml) | Pre-Registered Falsification Contract: [`CONTRACT.json`](./CONTRACT.json))* + +The repository is divided into five strictly isolated strata. Each layer `L_k` may only import from `L_ Bytes) | +| - Tested under 100% node turnover (zero surviving initial nodes) | ++-------------------------------------------------------------------------+ + | ++-------------------------------------------------------------------------+ +| Layer 2: Liveness & Refresh Schedulers (src/layer2-schedulers/) | +| - Failure rate estimation (lambda), survival probability P(t), H(p) | +| - Compares Fixed-Interval, AIMD, Poisson-Survival, Entropy-Hysteresis | ++-------------------------------------------------------------------------+ + | ++-------------------------------------------------------------------------+ +| Layer 1: UOR Content Addressing & Ring Kernel (src/layer1-uor/, lib.rs) | +| - Direct Rust conformance binding to `uor-foundation = "0.5.2"` | +| - Z/(2^n)Z Datum ring ops, Hasher substitution axis, Trace verifier | ++-------------------------------------------------------------------------+ +``` + +--- + +## 2. Layer-by-Layer Candidate Comparisons & Empirical Results + +Run all unit assertions and comparative benchmarks locally with: + +```bash +make test +``` + +### Layer 1 — UOR Content-Addressing (`uor-foundation = "0.5.2"`) + +Directly binds [`uor-foundation = "0.5.2"`](https://github.com/UOR-Foundation/UOR-Framework) in [`src/lib.rs`](src/lib.rs) and verifies bit-identical output with [`src/layer1-uor/index.js`](src/layer1-uor/index.js) (`Fnv1aHasher16` digest of `[1, 2, 3, 4]` = `0x66a5cdda2e757277b806e89ae7615aa5`). + +| Hasher Candidate | Output Width (B) | Samples (64B) | Collisions | Throughput (ops/s) | Throughput (MB/s) | +| :--- | ---: | ---: | ---: | ---: | ---: | +| **`UOR-Fnv1aHasher16`** | 16 | 1,000 | 0 | ~119,700 | ~7.31 | +| **`UOR-Fnv1aHasher32`** | 32 | 1,000 | 0 | ~90,000 | ~5.49 | +| **`SHA-256`** | 32 | 1,000 | 0 | ~85,700 | ~5.23 | + +--- + +### Layer 2 — Pointer & Route Refresh Schedulers (Claim C3/C4 Equal-Budget Protocol) + +Evaluated over a 600-second window with record `TTL = 60s` and an **equal refresh budget cap ($B = 30$ refreshes)** across regime-switching churn ($CV = 1.149$): + +| Scheduler Policy | Refreshes Issued | Staleness Events | Unavailable Time (s) | Availability Ratio | Mean Recovery Lag (s) | +| :--- | ---: | ---: | ---: | ---: | ---: | +| **`Fixed-Interval (TTL/2)`** | 30 | 15 | 203 | 66.17% | 13.53 | +| **`Adaptive-AIMD`** | 30 | 11 | 181 | 69.83% | 3.60 | +| **`Poisson-Survival` (Unpaced — Refuted by C3)** | 30 | 4 | 336 | 44.00% | 1.33 | +| **`Entropy-Hysteresis` (Unpaced — Refuted by C3)** | 30 | 3 | 408 | 32.00% | 2.00 | +| **`Budget-Paced-Survival` (Cauchy-Schwarz $\sqrt{\hat{\lambda}}$)** | **30** | **16** | **175** | **70.83%** | **9.20** | + +*Falsification Finding (C3/C4):* Under an equal refresh budget ($B=30$), unpaced `Poisson-Survival` and `Entropy-Hysteresis` clamp to the 5s minimum floor and exhaust all 30 refreshes in the first 150 seconds, losing to `Fixed-Interval`. Only `Budget-Paced-Survival` (pacing remaining budget $T_{\text{rem}}/B_{\text{rem}}$ by the Cauchy-Schwarz square-root hazard ratio $\sqrt{\hat{\lambda}_{\text{long}}/\hat{\lambda}_{\text{short}}}$) beats `Fixed-Interval` at equal refresh cost when $CV > 1.0$. + +--- + +### Layer 3 — Ephemeral UOR Database Under 100% Node Turnover + +Strict zero-disk persistence test: 24 UOR content-addressed objects (256B each) are written to 5 initial nodes at $t=0$. Over 8 churn generations, 2 new nodes join and the 2 oldest nodes are hard-killed per generation until **0 initial nodes remain alive**: + +| Storage & Repair Strategy | Initial Nodes Remaining | Objects Recovered | Retention Rate | Storage Amplification | Network Bytes | Repair Ops | +| :--- | ---: | ---: | ---: | ---: | ---: | ---: | +| **`Unreplicated (R=1)`** | 0 | 0 / 24 | 0.0% | 1.0x | 6,144 B | 0 | +| **`Reactive Mirror (R=3)`** | 0 | 0 / 24 | 0.0% | 3.0x | 18,432 B | 0 | +| **`Proactive XOR Parity (2-of-3 + Survival)`** | 0 | 24 / 24 | **100.0%** | **1.5x** | 82,944 B | 576 | + +*Finding:* Reactive full mirroring (`3.0x` storage cost) loses blocks when simultaneous node drops occur between scrub cycles, whereas survival-guided proactive migration with 2-of-3 XOR parity (`1.5x` storage cost) retains **100% of objects** across complete cohort replacement. + +--- + +### Layer 4 — Distributed UOR Compute Engine Under Worker Churn + +Executes 20 deterministic programs (each consisting of 24 $\mathbb{Z}/(2^{64})\mathbb{Z}$ `PrimitiveOp` ring instructions) across churning workers that drop every 9 steps, verifying every final output with `verifyTrace`: + +| Execution & Fault-Tolerance Strategy | Tasks Completed | Mean Latency (ticks) | Total Ring Ops | Wasted Ring Ops | Checkpoints Written | Trace Verified Rate | +| :--- | ---: | ---: | ---: | ---: | ---: | ---: | +| **`Single-Worker Restart (No Checkpoint)`** | 20 / 20 | 33.0 | 660 | 180 | 0 | 100.0% | +| **`Speculative 2x Quorum (Active-Active)`** | 20 / 20 | 24.0 | 660 | 180 | 0 | 100.0% | +| **`Survival-Checkpointed UOR Trace`** | 20 / 20 | **24.0** | **480** | **0** | 60 | **100.0%** | + +*Finding:* Checkpointing intermediate `(stepIndex, Datum, TraceEvent[])` into the Layer-3 UOR store when worker survival probability $P(\text{alive at } t) \le 0.60$ achieves the same minimum latency as $2\times$ active-active replication (`24.0` ticks) while eliminating **100% of wasted ring operations** (`480` vs `660` ops). + +--- + +## 3. Repository Layout + +``` +stitch/ +├── Cargo.toml # Official uor-foundation = "0.5.2" Rust dependency +├── Makefile # Runs both Node stratum benchmarks and Cargo conformance tests +├── package.json # ES module manifest +├── index.html # Utilitarian browser benchmark & telemetry console +├── src/ +│ ├── lib.rs # Rust uor-foundation v0.5.2 conformance library & test +│ ├── layer1-uor/index.js # Layer 1: Z/(2^n)Z Datum, PrimitiveOp, Hasher axis, verifyTrace +│ ├── layer2-schedulers/index.js # Layer 2: Fixed, AIMD, Poisson-Survival, Entropy-Hysteresis +│ ├── layer3-storage/index.js # Layer 3: Unreplicated, Reactive R=3, Proactive 2-of-3 Parity DB +│ ├── layer4-compute/index.js # Layer 4: Restart, 2x Quorum, Survival-Checkpointed Compute +│ └── layer5-transport/index.js # Layer 5: RFC 8484 DoH (SRV/TXT) & WebRTC DataChannel +└── tests/ + └── run_all.js # Isolated unit assertions & comparative table runner +``` + +## License + +MIT © [Syntra Labs](https://github.com/Syntra-Labs) diff --git a/docs/lifecycle-effects.md b/docs/lifecycle-effects.md new file mode 100644 index 0000000..fc49b21 --- /dev/null +++ b/docs/lifecycle-effects.md @@ -0,0 +1,177 @@ +# Model-owned host lifecycles + +`app/src/Stitch/Effects.lex.tex` supplies the transition admissions used by the +live transport, DNS publisher and VM. `src/layer1-uor/effects.js` projects their +existing state into source-derived bindings. It does not keep a second effect +journal, allocate substitute identities, infer provider success, or refund +resource charges. + +## State and effect correspondence + +| Runtime | Existing state projected | Source-owned decision | Host observation that remains external | +| --- | --- | --- | --- | +| `WebRtcTransportNode` | Session generation, closed flag, actual topic and local/remote peer IDs | Close/open generation updates, signal admission, peer capacity and callback continuation | Browser peer-entry and DataChannel object identity, RTC events and networking | +| `PointerPublisher` | Scoped retained outcome, exact pointer digest and provider record ID | Candidate/read correlation, create/update/reconcile/wait/refuse, uncertain write completion | Complete provider listing, TXT shape, cryptographic verification and provider response | +| `LinuxVmNode` | Boot generation and one phase: idle, booting, ready or failed | Explicit boot/retry, current-instance callbacks, failure invalidation and readiness transition | Asset loading, emulator instance identity, observed prompt, completed typing, exact guest/9p response and guest execution | + +Identifiers are encoded as exact UTF-16 code units for equality. UTF-8 encoding +would collapse distinct JavaScript strings containing lone surrogates. No +sanitized relay topic, truncated digest, object display name or invented token +substitutes for the identities used by a particular runtime operation. + +## Transport + +Every captured callback binds its generation, topic and local peer. Peer and +channel callbacks additionally bind the remote peer and the captured live object. +The source consumes explicit object-identity facts computed at the adapter +boundary; it cannot inspect or authenticate a browser object itself. A reconnect +increments generation even when joining the same topic. Cleanup invalidates the +session before closing browser objects, which can synchronously invoke callbacks. +Pending offer/answer continuations recheck admission after each asynchronous step. + +These rules do not authenticate a remote peer, implement a signaling standard, +or establish delivery. Peer limits and message/timer bounds are operating policy. + +## DNS + +Publication is scoped by zone, DNS name and independently pinned authority key. +A retained unknown write permits only a read for the same candidate. A complete, +verified read of that exact candidate can reconcile it even after its validity +window. An absent or still-predecessor record never proves that an earlier write +was not applied. New mutations require a current validity window and either a +bootstrap pointer or an exact predecessor with the next revision. A retained +provider record ID cannot silently change. + +The publisher enters unknown before calling the write adapter. The built-in +adapter marks a thrown validation/admission refusal `effectDispatched = false` +only before invoking `fetch`. Such a definite local refusal permits a later +explicit retry without refunding already charged work. An unclassified exception, +lost response, malformed response or mismatched provider ID remains unknown. +Contradictory acknowledged/refused observations also remain unknown in the model. +No write is automatically retried. Provider rejection allows an explicit retry. + +The resolver adapter must establish listing completeness and record shape before +supplying read facts. The pointer verifier must authenticate full pointer bytes +against the pinned authority. Source contracts do neither. The optional session-local publisher is not restart-safe. The browser binds the +origin-local journal described below; neither mode establishes atomic provider CAS, +cross-device serialization, durable retention, DNS propagation, or global order. + +## VM + +A boot or explicit retry increments generation. Missing assets, constructor +failure, download failure and the configured readiness deadline move booting to +failed and invalidate listeners before cleanup. Another boot cannot begin while +booting or ready. Readiness and failure callbacks require the current generation; +readiness also requires the current emulator instance, completed initialization +typing, and an exact fresh bounded bidirectional 9p response. An observed guest +prompt only starts that probe and cannot enable command dispatch. Failed generations cannot resurrect readiness. Object mirrors recheck +the same instance after asynchronous writes. + +The deadline bounds the host's readiness wait, not guest initialization or +correctness. A shell-command timeout reports unknown completion and does not +claim to cancel the guest command. A separate 1–300s whole-VM runtime allowance +continues after observation ends. Explicit cancellation after dispatch, filesystem +quota rejection or result-size refusal requests a whole-VM stop, revokes bridges +and retains unknown prior effects. Guarded local-9p allocation and bounded result +reads are installed before emulator run; see [VM administration](vm-administration.md). +The lifecycle is separate from the deterministic +ring replay model; changing only lifecycle policy preserves that replay execution +identity while changing exact source provenance. + +## Verification boundary + +The source includes universal stale-session, stale-VM and unknown-DNS policy +obligations. Only actual pinned LexLean/Lean verification establishes their proof +status. Generated JavaScript bindings and mutation tests are implementation +conformance evidence, not a compiler or whole-browser proof. + +`tests/effects-model.test.js` checks independent finite lifecycle oracles and +plants source defects, regenerates bindings, and runs the real transport, DNS and +VM regression suites. The planted defects cover stale sessions, replaced channels, +repeating unknown DNS writes, stale VM callbacks and duplicate boot admission. +The existing lifecycle tests cover interrupted continuations, explicit retries, +cleanup reentrancy, exact provider IDs, local refusals and unknown outcomes. + +## Frozen C1 measurement + +The diagnostic connection trial uses the existing frozen contract version 1.1.0: +an ordered channel and ten consecutive heartbeat completions within ten seconds +from connection-attempt start. Source progress tracks only locally issued probes +whose echo matches the current generation, peer entry, channel, sequence, timestamp +and monotonic issue order. Incoming pings, duplicate pongs, old sequences and +after-deadline responses cannot contribute. A sequence gap starts a new run. + +The ordinary five-second heartbeat cadence is unchanged and will normally fail +this diagnostic criterion. The diagnostic deadline records failure without +closing the channel or restricting normal operation. No benchmark traffic is +added. Direct-path success additionally requires observed selected-candidate-pair +stats covering both local and remote candidate types. Missing stats or a relay at +either end is not direct-path success. The local stats wait has a one-second +operating bound; it does not extend the ten-second heartbeat window. + +The logger checks coherent ordered/count/window/setup/path evidence instead of +trusting a success Boolean. Threshold satisfaction is labeled `THRESHOLDS_MET`, +not verified WebRTC conformance. Physical network-pair classification and browser +stats correctness remain external observations. These tests do not establish the +frozen contract's required live trial corpus. + +VM canonical filenames now retain all 64 hex digits of the SHA-256 object root. +Optional human label aliases use a disjoint prefix and also retain the full root, +so shortened root prefixes or sanitized labels cannot overwrite a different +object. Guest file writes snapshot bytes before asynchronous calls. This is not +a proof of guest isolation or a change to the VM's opt-in controls. + +## Origin-local signing authority and publication journal + +The browser now uses `BrowserAuthorityStore` and an IndexedDB `records` store. +Saved authority setup is explicit. The private Ed25519 `CryptoKey` is +nonextractable and stored using the browser's structured-clone algorithm, never +serialized as secret bytes. Restoration validates the key type, usages and +public/private correspondence. Missing or invalid storage never creates or +rotates a key. Concurrent setup transactions keep the first committed authority. +Session-only key creation remains an explicit alternative. There is no private-key +export, import, rotation or backup flow; ordinary recovery bundles exclude keys. +Changing trust anchors remains an independent administrative decision. + +DNS publication in the browser requires this journal even with a session-only +signing key. The prior exact zone/name/pinned-key record is loaded under the Web Lock. +Provider reads, signature/record validation and local resource admission occur +before any unknown claim. Immediately before invoking the write adapter, one +transaction commits the signed candidate, observed provider record ID, owner and +unknown outcome. Failed reads, exhausted admission and aborted intent commits +therefore do not invent an uncertain external write or prevent a repaired explicit +retry. A provably undispatched adapter refusal is settled by its owned transaction; +if saving that refusal fails, the committed intent remains unknown. A scoped browser Web Lock spans each provider operation and journal settlement, +so a live suspended writer cannot be mistaken for an interrupted owner. The browser +releases that lock on context termination; if Web Locks is unavailable publication +is blocked. A competing tab then sees unknown and can only reconcile the retained exact +candidate, not claim a new mutation. No lease timeout or owner-tab interruption +allows another write. A definitive owner result may settle the claim; any tab may +settle an authenticated exact-candidate read. A prior published record cannot be +downgraded by a late refusal. Failure to save completion keeps the earlier unknown +intent. A crash after the write-ahead commit but before dispatch is conservatively +unknown too: absence is not proof that an earlier operation did not execute. + +The setup panel explicitly loads a scoped saved publication after restart. This +allows read-only reconciliation without possession of the private signing key or +live object bytes. It does not automatically import a retained observer head or +assert that a provider record is globally current. Credentials are call-local; +neither tokens nor private keys enter the DNS journal. + +`authorityMayCreate`, `journalMayClaim`, and `journalMayFinish` in +`Stitch.Effects` are bound directly by this runtime; `Product.Experience` owns the +explicit setup/load action descriptions. The transaction adapter and cryptographic +checks are external host observations, not consequences of those Boolean proofs. + +IndexedDB success is origin-local retention, not a durability promise. Quota, +private browsing, eviction, clearing storage, device loss and untrusted same-origin +scripts remain risks. Storage failures block new publication rather than silently +falling back to session-only mutation. Clearing a journal is not reconciliation. +There is no application control to delete unresolved intent. This is not atomic +provider CAS, cross-device coordination, exactly-once provider execution, global +DNS ordering, or a substitute for a recent independently trusted pointer anchor. + +`tests/browser-authority.test.js` uses an isolated synthetic serialized transaction +adapter for crashes, failed commits, concurrent callers and key restoration. It +is not a real browser IndexedDB or quota/eviction qualification. Supported-browser +storage behavior and provider trials remain required before release claims. diff --git a/docs/native-build-diagnosis.md b/docs/native-build-diagnosis.md new file mode 100644 index 0000000..b655f43 --- /dev/null +++ b/docs/native-build-diagnosis.md @@ -0,0 +1,131 @@ +# Native build diagnosis and passing-project comparison + +The source proof and native artifact gate are distinct. A successful Lean kernel +check is not a successful native Prism build. The original pinned SDK and +`scripts/check-model-sdk.sh` acceptance path remain unchanged. + +## Reproduced failure + +The [20-module checkpoint run](https://github.com/afflom/stitch/actions/runs/42843185062) +passed runtime checks but failed the model job with `PP5007: application-lean timed +out`. The SDK is pinned to +`ghcr.io/uor-foundation/prismpm-sdk-candidate@sha256:cd3b47d7a370c4a26b8285f5e9c3bb15e639973c55505c3809ddbe55352fea58`, +using LexLean 0.3.0 and Lean 4.32.1. + +A cold local reproduction used the exact generated 20-module source closure, +PrismPM's Lake configuration, `moreLeanArgs = ["-j2"]` and +`LEAN_NUM_THREADS=2`. Portable, Collections and independent project modules +compiled. `LexLeanRuntime.Laws` emitted its Lean object/IR but stalled during C +emission beyond 600 seconds. + +Post-frontend inspection found 695 declaration-order entries for 689 distinct +local impure declarations. Six matcher-splitter entries from +`LexLeanCollections.lessThan` and `LexLeanLaws.sumNat` had been reconstructed +automatically and then compiled again by the runtime reconstruction loop. +Lean's native declaration ranking consequently asserted while consuming the +longer order list, and C emission repeatedly failed during ranking/sorting. + +A diagnostic-only guard avoiding duplicate reconstruction made the same cold +graph pass all 25 Lake jobs in 15.503 seconds. Every generated Stitch project +module remained byte-identical. This is evidence for the root cause, **not an +accepted runtime patch or release attestation**. A production fix must preserve +mutual-recursion groups, kernel/axiom checking and native exported behavior. + +## Why other Prism projects pass + +- [Template's successful native run](https://github.com/UOR-Foundation/template/actions/runs/42820101494/job/129843150506) + at commit `05855f42dd1186aee9f4907985920514907b255e` uses the same SDK and really + executes `prismpm --project app verify`. Its three generated modules import + `Init` and `LexLeanRuntime.Portable`, not Laws or Collections. An independent + cold native build of that exact source closure passed all six Lake jobs in + about 11 seconds, with no factory seed or warm cache. +- [Rule30's successful proof run](https://github.com/afflom/rule30/actions/runs/42786571256/job/129729166929) + at commit `7e99c8418cade772c10d79be2731c193de7cd31a` uses LexLean 0.4.0 at + `15c667bd36604c94c28e39502edec3fcad38e0ce`. Its build stages Laws as Lean + object/IR without `-c`; Laws is not a native Lake root. That run does not execute + the equivalent `prismpm verify` gate. +- [Verdant's successful web run](https://github.com/afflom/verdant-resonance/actions/runs/42842203896) + at commit `4b5f7fda5c7dac106e11475dc62aaf7147f1cb9f` runs npm, TypeScript, + JavaScript tests and a Vite build. It does not run a native Prism gate. + +Template and Stitch both use a nonroot container user, ephemeral HOME, tmpfs +`/tmp` and `PRISMPM_EPHEMERAL_HOME=1`. Template additionally initializes Docker +buildx and runs earlier checks within the same container. The independent cold +template pass shows that a warm cache is unnecessary for its smaller runtime +closure. This is a specific native reconstruction failure exercised by Stitch, +not evidence that all Prism projects or all uses of this SDK fail. + +## Acceptance of the repair + +Use a corrected immutable upstream SDK, then run the unchanged Stitch source, +kernel, native artifact and vector gates, plus the passing template regression. +Do not remove Laws imports, replace the native gate with object-only compilation, +accept diagnostic artifacts as official outputs, or call a longer timeout a fix. +Full browser/provider/VM qualification and redistribution obligations remain +separate product requirements even after native verification passes. + +## Proposed compiler tested on actual project sources + +The actual compiler built from [LexLean PR #466](https://github.com/UOR-Foundation/LexLean/pull/466) +at `cc5561203de8fa5594d573904147a306b2b8bbbf` passed its integrated native +regression, then generated and verified the unchanged 25-module Stitch +checkpoint at `2f1fde8`. Its cold native graph passed all 30 Lake jobs in +16.355 seconds; the three-module template comparison passed six jobs in +11.097 seconds. [The diagnostic report, original logs and input hashes](evidence/native-candidate-466/README.md) +record the exact scope and reproduction. This used candidate-generated runtime +sources, not edited runtime text. The accepted SDK lock remains unchanged +pending upstream qualification and publication. + +After the placement model changed, the same actual candidate regenerated the +25-module closure at local source checkpoint `c99dc0d` and passed all 30 cold +native jobs again in 16.093 seconds. The separate `stitch-placement/` evidence +records those new input hashes; no earlier source attestation is reused for it. + +## Completion flow and evidence ownership + +Keep the dependency chain explicit instead of rerunning the known broken native +build after unrelated host changes: + +1. **Stitch source → source proof.** The current + [source summary](../product/source-verification.json) binds every declared + source/vocabulary/configuration input to the retained actual + [attestation](../product/source-attestation.json) and + [build manifest](../product/source-build-manifest.json): 25 modules, 1,324 + declaration audits and 85 successful Lean/leanchecker processes. This is + source evidence only, not native acceptance. +2. **LexLean source → repaired compiler.** LexLean owns PR #466's complete + acceptance. The exact compiler candidate and placement-checkpoint native + rehearsal are already retained above. A successful diagnostic does not + authorize a Stitch SDK lock update. +3. **Compiler → qualified SDK.** PrismPM owns reconciliation of the accepted + compiler revision, compiler-pair and SDK qualification, then publication of + an immutable image. Track the existing + [SDK owner coordination](https://github.com/UOR-Foundation/PrismPM/issues/194#issuecomment-6780585108). + The current `prismpm.lock` still selects the reproduced failing compiler; + this dependency is blocked, not a green or skipped native result. +4. **Qualified SDK → Stitch acceptance.** Consume the owner's qualified digest + and matching official locks, regenerate only the authoring outputs required + by that compiler, and run the unchanged + `sh scripts/check-model-sdk.sh --check` in that SDK. Retain its real source, + native artifact and vector evidence. A changed compiler requires new proof + evidence even if the application source is unchanged. + +`node scripts/check-source-evidence.mjs` cheaply checks the retained evidence's +input freshness, existing digest/ID bindings, reported statuses/counts and pinned +proof-tool identities. The normal Node suite includes negative cases for stale, +added, missing and mismatched inputs. Host-only changes leave these exact source +inputs intact, so the same source proof remains useful without another manual +proof build. Discovery includes `.lex.tex` modules and each bound lexicon's +`lexicon.toml` and `entries/` files; other documentation is not a compiler input. +This check authenticates no producer and replays no proof; it is +not a certificate verifier, native gate, workflow router or CI result cache. + +The factory work in [PrismPM #586](https://github.com/UOR-Foundation/PrismPM/pull/586) +describes release-line obligation identities and owner-controlled receipts. It +is draft upstream work, not a qualified consumer receipt API to copy here. +Stitch keeps its existing CI gates. Runtime/browser checks bind their own host +and test inputs; the independent source-complete guest build binds its recipe, +toolchain and resulting image/source/license materials. Neither a passing source +proof nor a passing browser test clears guest redistribution. Do not restart +that long build for unrelated model or host edits, and do not replace the +bundled guest until its actual candidate and accompanying materials qualify. diff --git a/docs/operator-experience.md b/docs/operator-experience.md new file mode 100644 index 0000000..9b55ba1 --- /dev/null +++ b/docs/operator-experience.md @@ -0,0 +1,92 @@ +# Operator experience projection + +`app/src/Product/Experience.lex.tex` owns six browser journeys: mesh disclosure and joining; objects, placement and recovery; deterministic pure jobs; host VM effects; pinned pointers and publication reconciliation; and application resource policy. + +This is the real `index.html` operator interface, not a separate probe. The existing strict project-owned source adapter explicitly selects `Product.Experience` alongside the Stitch domain modules. Its generated definitions in `src/layer1-uor/generated-model.js` supply the actual journey metadata, view selectors, evidence labels, action guards, named evidence palette, navigation visibility, focus policy and explanation-disclosure policy. Unsupported source syntax and stale generated bytes fail the source check. This adapter is not LexLean, a proof compiler or a host certificate. + +`src/product-experience.js` is the handwritten DOM adapter. It reads existing domain/runtime observations; it does not add an effect ledger, resource ledger, custody history or publication journal. `index.html` binds the same model action predicates both to disabled buttons and to the handlers, so a forced click cannot bypass readiness. The real adapters still enforce exact resource costs and domain preconditions before effects. + +## Information in context + +- Only the selected journey panel is visible. Moving between journeys retains form edits and runtime state. Native navigation buttons support Enter/Space, move focus only on explicit navigation and never overwrite the URL's mesh-key hash. Scrolling is nonanimated, including for reduced-motion users. +- Every input has a persistent associated visible label. Instructions describe byte/step bounds, scope, trust and disclosure beside the relevant controls. Contextual polite result/error regions retain the wire log and its details rather than replacing evidence with color. Action descriptions preserve authored explanation references. View summaries use polite, atomic live announcements. Unchanged status does not announce again on every timer tick. Named status colors have tested text contrast on the current dark panel surface; the status wording carries meaning without color. +- Detailed evidence explanations are disclosures. The model initially opens them when first-use signaling disclosure, unknown publication or resource-policy review needs attention. Other explanations remain available on request. Asynchronous observations do not steal navigation or focus. +- Public signaling requires explicit disclosure acceptance and an explicit join. Acceptance alone does not connect; withdrawing it closes the mesh. Public object/job relay disclosure is a separate opt-in. +- Provider publication setup appears after a pinned authority, including after a reload with no object or observer-head RAM. Loading a saved write must not require volatile object state. A separate reconciliation action replaces new publication while an exact scoped candidate is unresolved. Unknown state opens its explanation and reconciliation controls. +- Guest command controls appear only after an observed ready VM lifecycle. Captured stdout/stderr has a bounded, keyboard-scrollable UTF-8 text preview before object storage is attempted. A command selector exposes every retained handle, including an earlier unknown result, through the same per-command admission predicates. Selection never dispatches or replays a command. Forgetting resolved evidence also clears its displayed preview. A guest-output object digest is not execution certification. Pure-job replay evidence remains distinct. +- Scheduler estimates, external inspection commands and experimental benchmarks are contextual diagnostics, not first-use readiness gates. Benchmarks do not run on startup. +- Resource attention is not a second admission system. Exhausting one dimension or refusing an expensive operation does not globally prohibit later cheaper work. The exact runtime vector remains authoritative. Expired epochs, full reservation capacity and clock regression block global application admission; inspection/export/explicit renewal remain available. + +## Evidence scope + +Local object integrity is distinct from conditional, digest-checked peer assertions. Peer identifiers do not establish independent machines, honest retention or reachability. Pure-job aggregate replay status requires every relevant unfinished job to have replay evidence; a completed replayed job cannot mask an unverified unfinished job. A retained local pointer head is not a DNS publication receipt. A confirmed provider record is not global DNS ordering or resolver propagation. An open peer channel is not full WebRTC/NAT certification. Neither a successful join nor a C1 benchmark is a barrier to ordinary local use. + +The module includes finite, kernel-checkable safety witnesses and universally quantified Boolean gate properties for disclosure, guest readiness, unknown publication and blocked budgets. The project-owned projection tests are separate implementation-conformance checks, including a mutation test proving that changing Experience source changes the real generated labels and guards. Neither kind of evidence certifies the whole browser, OS, network, VM or physical host. + +## Checks and remaining boundaries + +Focused checks: + +- `node --test tests/product-experience.test.js tests/runtime-admission.test.js` +- `node scripts/check-model.mjs` +- `node scripts/check-product.mjs --check` +- Actual `lexlean fmt`, `lock`, `check` and `verify` against the official pinned toolchain. The final project closure, not this projection, owns release assurance. + +The surrounding DOM snapshot extraction, markup, layout, spacing, typography, input grouping, advanced-diagnostic copy and table rendering remain handwritten. Do not infer full presentation correspondence or a complete standards implementation from this journey model. The executed-script test harness exercises the actual inline browser script but is not a real graphical browser or physical WebRTC/provider trial. + +## Restart, scope and recovery + +Saved authority setup/restore and the write-ahead publication journal are origin-local mechanisms. They are not backups, key rotation, or private-key export/import. After a reload, explicitly pin the original saved key, use the exact DNS name and Cloudflare zone, then load saved publication. A token is needed for reconciliation reads, not for loading the journal. Unknown writes retain the exact candidate; changing name, key or zone selects another scope rather than resolving an earlier write. Journal/store failures do not establish absence or authorize another candidate. The interface explains scoped token replacement without retaining its value. + +Object/job export/import and explicitly accepted recent-anchor evidence are available through the recovery journey. Import and acceptance do not restore signing keys, provider-write journals or a live observer head. A separate Restore Accepted Live Head action requires the selected exact accepted anchor, matching independently pinned live name/key, current signature/validity and an empty or identical retained head. Normal strict succession then resumes. Different retained heads are never overwritten; even a newer independently accepted anchor cannot replace them. Export selection is retained across panel reopening; new entries are not silently added to a previous selection. Imported selectors retain an available choice and explicitly identify empty evidence sets. Editing the selected anchor, independently trusted key or digest clears the corresponding acceptance checkbox. Editing these inputs or the live scope, or closing recovery, cancels an in-flight restoration before commit. Reopening never repeats an action. The recovery view distinguishes accepted vault evidence from an accepted anchor that is the live local head. + +## Qualification still required + +The new label/instruction checks are static markup checks. Executed-script and synthetic-DOM tests cover refusal feedback, interrupted storage, replay/import state, saved-write access with no object RAM, retained-command selection and text output when caching fails. They do not establish WCAG compliance, browser accessibility-tree correctness, visual reflow, screen-reader announcements, native file/download or clipboard behavior, or real IndexedDB/Web Locks interoperability. The graphical VM display can contain graphics-only applications with no equivalent text. The shell command/output path is a text alternative for the operations this UI exposes, not an accessibility certification of arbitrary guest software. + +A prior Chromium launch was blocked by the execution environment's Unix-socket restriction. No browser launch or alternative bypass was attempted in this change. Real graphical/browser and assistive-technology qualification remains outstanding, along with provider/WebRTC/physical-host trials and the final exact-source/native-artifact gates. Local recent-anchor restoration now has a source-owned admission predicate and explicit operator journey; it remains session-only and cannot establish global latest state, durable trust or key rotation. + +## Repairing a retained object's placement + +Store commits local bytes even before peers join. In the objects journey, select +one exact full verified object, then use **Repair Selected Placement** after +peers join, an ACK lease expires or a data channel is replaced. Repeated Store +for those same bytes runs the same maintenance. Fetch Reachable Fragments stays +a retrieval operation and does not invent writer assignments or remote custody. +The selection is explicit and stable across status updates; a partial fragment +cache cannot authorize repair. The selected-object evidence reports current +route/lease-qualified receipts, pending ACKs, uncertain requests, retained copy +assertions and pending release observations separately. Elapsed time updates the +evidence without dispatching maintenance or changing navigation. + +Repair fills missing indices on distinct current peer routes. A pending transfer +is not repeated while its exact route, lease and resource reservation remain +current. Once those observations lapse, it becomes uncertain, retains its +history and charges, and a later explicit repair can issue a fresh request. +Expired or disconnected committed assertions become superseded, not deleted. +A fresh checked receipt can renew the same physical holder/index assertion +without counting two copies there. No surviving local bytes means repair is +unavailable; recovery still needs enough retained information elsewhere. + +To move an unexpired live fragment, choose its current holder in **Holder to +replace** before repair. The old committed source stays until the new exact +receipt commits. Activation checks the actual dispatch's frame/envelope +reservation IDs in their still-live original epoch, the exact request and +manifest, target route, lease and current source. A changed epoch, replaced +channel, forged/stale receipt or failed/unknown send cannot activate the target. + +Once at least two current fragments and a current replacement for that index +exist, Stitch requests release of the exact superseded sender/request/index +assignment. Only its correlated route-bound release ACK permits retirement from +the sender's accounting. The holder checks that the request is still its current +assignment; old releases cannot erase renewals or other writers' assignments. +Lost release ACKs retain the old assertion and can be retried idempotently by a +later explicit repair after the 15-second local observation deadline. Neither +that deadline nor lease expiry proves remote deletion or refunds resource use. +Local read/full-byte caches and other writers' custody remain additional copies. + +These are bounded session-local observations: at most 256 transfer-history +records and 64 retained copy assertions per placement. Reaching a bound refuses +more transitions rather than discarding unknown custody. Peer assertions and +release assertions still depend on truthful peers; distinct route identities do +not prove independent machines, durable storage or future reachability. diff --git a/docs/prism-id-threat-model.md b/docs/prism-id-threat-model.md new file mode 100644 index 0000000..2c441d3 --- /dev/null +++ b/docs/prism-id-threat-model.md @@ -0,0 +1,208 @@ +# Prism id threat and security model + +This is the threat model for prism id: `Stitch.PrismId` (`app/src/Stitch/PrismId.lex.tex`), the runtime `src/prism-id.js`, and the protocol in `docs/prism-id.md`. It covers browser, native, mobile and embedded devices. + +Each threat is also a row in the official Security facet (`Product.Security`, generated by `scripts/check-facets.mjs`). The row names the threat's asset, its STRIDE category, a qualitative likelihood and impact, the control, the executable test, this document, and the Lean theorems in `Stitch.PrismId` that the control rests on. + +Likelihood and impact are conservative engineering judgements, not measured probabilities. A theorem proves the stated rule about the model. It does not prove the cryptography, the browser, or the platform. + +## 1. Scope and security objectives + +| Id | Objective | +| --- | --- | +| O1 | Only devices the person linked can act for their prism. | +| O2 | Only member devices can read the private boundary. After a member is revoked, it cannot read anything sealed later. | +| O3 | Linking a device needs the person's presence at both devices: an out-of-band channel plus a confirmation they make. | +| O4 | A host can verify, on its own, that an action came from an active device of a prism, within that device's scope, once, for that host. | +| O5 | No account, server, registration, payment or third party is required. A failed component cannot take over the identity. | +| O6 | Every runtime computes the same κ and the same authorization result from the same records. | +| O7 | Observers learn as little as the protocol allows. What they can still learn is stated (section 8). | + +**Out of scope for this milestone:** the substrate transport (M2) and foundry frame integration (M3). Recovery after every member device is lost, per-host personas, hardened devices, padding, hybrid post-quantum wraps and attestation admission are in scope since the "close the gaps" change (section 10). + +## 2. System decomposition + +| Element | Kind | Holds | Trust | +| --- | --- | --- | --- | +| Member device | Process: browser tab, native app, mobile app | Non-extractable signing and agreement keys; boundary keyring; prism log | Trusted while linked and not revoked | +| Delegate device | Process, typically embedded | Non-extractable keys, scoped role; no boundary key | Trusted only inside its scope | +| Hardened member | Process, typically a browser | Non-extractable keys; non-extractable derived boundary keys only | Trusted while linked; cannot link members or set up recovery | +| Recovery device | Virtual: exists only as threshold shares | Its private keys and a boundary keyring snapshot, split k-of-n | Can link and revoke; never acts at a host; its revocations take precedence | +| Guardian | Device of another prism, a spare device, or paper | One share, sealed to the guardian device | Trusted not to collude above the threshold | +| Persona | A prism of its own, one per host | Per-device persona keys; persona recovery key wrapped to the main recovery device | What a host sees instead of the main prism | +| Prism log | Data store, replicated | Signed genesis, bind and revoke records | Integrity from signatures and κ; any holder may relay it | +| Link offer | Data flow over an out-of-band channel | Prism id, role, scope, one-time secret, ephemeral ECDH key, expiry | Confidential until used; integrity from the channel | +| Rendezvous and sync topics | Data flow over the substrate bus | Link request and response; sealed sync messages | Untrusted transport | +| Host | External entity: foundry page, native service, data sink | Replay set, policy | Verifies actions; trusts nothing else | +| Relay or federation node | External entity | Bytes in transit | Untrusted | + +### Trust boundaries + +- **TB1 Device boundary.** Key handles and keyring stay inside the device process. For browsers, that boundary is the origin (section 7). +- **TB2 Out-of-band channel.** QR code, NFC, USB or serial line, or typed text. It carries the link secret, which is the only secret ever moved this way. +- **TB3 Substrate bus.** Everything that crosses it is either public (signed records) or sealed (AES-GCM). +- **TB4 Host boundary.** A host sees signed actions and the prism log, never boundary keys. +- **TB5 Private boundary.** The set of member devices holding the current boundary key, the "real object" (RO) in OOO terms. Delegates sit outside it. +- **TB6 Guardian boundary.** Shares cross into other prisms or onto paper. Below the threshold they carry no information about the recovery secret (Shamir over GF(256)). +- **TB7 Persona boundary.** Each host sees one persona prism. The main prism log and the persona-to-host map travel only sealed between members. + +## 3. Adversaries + +| Id | Adversary | Capabilities assumed | Not assumed | +| --- | --- | --- | --- | +| A1 | Network and relay | Reads, drops, delays, replays, reorders and injects bus traffic; runs federation nodes | Breaking P-256, SHA-256, HMAC or AES-GCM | +| A2 | Shoulder surfer | Sees or photographs a link QR code; may answer it from its own device | Seeing the confirmation code on the person's own new device and entering it on the offering device | +| A3 | Device thief | Holds an unlocked member device and every key handle on it | Extracting keys from hardware-backed stores (section 6) | +| A4 | Compromised delegate | Full control of an embedded device and its keys | Member keys | +| A5 | Origin attacker | Runs script in the prism's web origin (XSS, compromised dependency or static host) | Script in a native app or a hardware key store | +| A6 | Malicious host | Receives actions and logs; may collude with other hosts | Breaking signatures | +| A7 | Malicious member prism | A different prism sharing a boundary with this one | Membership in this prism's private boundary | +| A8 | Divergent implementation | A runtime with a canonicalization or validation bug | n/a | +| A9 | Guardian | Holds one share; may be deceived by an impostor or collude with other guardians | More than threshold minus one guardians colluding | +| A10 | Quantum adversary | Records wraps today and runs a quantum computer later; later forges P-256 signatures | Breaking ML-KEM-768, ML-DSA-65 or AES-256 | + +## 4. Assets + +| Asset | C | I | A | Notes | +| --- | --- | --- | --- | --- | +| Device signing key | n/a | Critical | High | Non-extractable. Use equals authority. | +| Device agreement key | High | High | Medium | Unwraps boundary keys during linking and rotation. | +| Boundary keyring | Critical | High | High | Raw bytes kept only on sharing devices, which wrap it for the next member. A hardened device keeps only non-extractable derived seal and topic keys. | +| Recovery secret | Critical | Critical | High | Recovery device keys plus a keyring snapshot. Exists whole only during setup and recovery; otherwise as shares. | +| Persona map | High | High | Medium | Which persona belongs to which host. Inside the private boundary only. | +| Prism log | Low | Critical | High | Public by design. Its integrity is authority. | +| Link secret | High until used | High | Low | Single use, expires in 5 minutes by default. | +| Sealed private content | Critical | High | High | Addressed by κ, bound to the prism id. | +| Host replay set | n/a | High | Medium | Host-local. | + +## 5. STRIDE per element, with controls and evidence + +Every row below is a Security facet row. The tests are in `tests/prism-id.test.js`. The proofs are theorems of `Stitch.PrismId`, verified by `lexlean verify --all` under the pinned SDK. + +| Threat | STRIDE | Adversary | Control | Proofs | +| --- | --- | --- | --- | --- | +| PrismLinkHijack | Spoofing | A2 | One-time secret, expiry, single use. A six-digit code is derived from the secret and the joining device's κ. The person confirms it on the offering device; a hijacker's device shows a different code. | unconfirmedLinkRefused, usedOfferRefused, wrongSecretRefused, expiredOfferRefused | +| PrismRogueBind | Elevation | A1, A3, A4 | A bind counts only from a linked member that is not revoked (or whose revoker kept the bind), with a valid signature, for this prism. Revocation wins over a concurrent bind. | unlinkedSignerCannotBind, delegateCannotBind, invalidBindSignatureRefused | +| PrismGenesisConfusion | Spoofing | A1, A6 | prism id is the κ of exactly one self-signed genesis. The prism id travels in the link offer (TB2), and every record names it. | foreignPrismBindRefused | +| PrismStolenDevice | Information disclosure | A3 | Revocation carries a new boundary key, wrapped only to the remaining members, and the sync topic moves. A device without the current key refuses to seal. | revokedDeviceCannotSign, revokedDeviceActionRefused, staleBoundaryKeyRefused | +| PrismActionReplay | Spoofing | A1, A6 | An action names its audience and carries a nonce and a time. The host refuses another audience, a seen nonce, or a time outside its window. | replayedActionRefused, wrongAudienceActionRefused, staleActionRefused | +| PrismDelegateOverreach | Elevation | A4 | Scope is checked on every action. A delegate never receives the private boundary and cannot bind or revoke. | delegateOutsideScopeRefused, delegateNeverReceivesPrivateBoundary, delegateCannotBind | +| PrismKeyClaimForgery | Spoofing | A4, A8 | The `protection` field is a claim. `admitDevice` admits a hardware-requiring device only when a host-pinned verifier attests hardware protection of exactly that device's signing key. | unattestedDeviceRefusedWhenRequired, attestationForOtherKeyRefused | +| PrismLogTampering | Tampering | A1 | Each record is signed and keyed by the κ of its envelope. Merge is an order-independent set union. Invalid and foreign records are ignored. | invalidBindSignatureRefused, unlinkedSignerCannotBind | +| PrismLogFlooding | Denial of service | A1 | At most 4 MiB per sync message and 4096 records per log, checked before parsing and before any signature work. | (bound in code, test) | +| PrismMutualRevocation | Denial of service | A3 | Recovery revocations take precedence: a device the recovery device revoked has no revocations that count. Members cannot revoke or replace the recovery device. Recovery binds a new device and revokes every other device ever linked. | revokedByRecoveryCannotRevoke, memberCannotRevokeRecovery, memberCannotReplaceRecovery | +| PrismRekeyWithholding | Denial of service | A1 | A device without the current key refuses to seal rather than sealing to the old key. A publish under the previous key delivers the rotation. | staleBoundaryKeyRefused | +| PrismSyncObservation | Information disclosure | A1 | The sync topic is an HMAC under a derived boundary key. Messages are sealed with AES-GCM bound to the prism id and padded (ISO 7816-4) to a power-of-two bucket of at least 1 KiB. Constant-cadence sync (`createSyncCadence`) sends one message of one size per interval, a real sync or a cover message. Network addresses remain observable. | (crypto, test) | +| PrismLinkability | Information disclosure (LINDDUN: linkability) | A6 | Each host sees only its own persona: a separate prism with per-device persona keys. The main prism log travels sealed between members and is never given to a host. | nonMemberSeesOnlyPublished, singleIdentityBoundaryPrivate | +| PrismOriginScript | Elevation | A5 | Device keys are non-extractable. A hardened device (`hardenSession`) keeps only non-extractable derived boundary keys and cannot link members or set up recovery, so script can copy no key out. Actions a host marks (`requirePresence`) need a user-verified WebAuthn assertion whose challenge is the SHA-256 of exactly that action body, bound to the passkey, rp id and origin in the device record. | hardenedDeviceCannotShare, unverifiedApprovalRefused, approvalOfOtherActionRefused, forgedApprovalRefused | +| PrismCanonicalDivergence | Tampering | A8 | uor-addr canonical form with explicit refusals, published vectors (`tests/fixtures/prism-id-vectors.json`), and an independent Python implementation (`scripts/verify-prism-id-vectors.py`). | (vectors, test) | +| PrismRepudiation | Repudiation | n/a | Every action and administrative record is signed by a device bound in the log. | (signature, test) | +| PrismRecoveryLoss | Denial of service | loss | Threshold recovery: the recovery key exists only as shares sealed to guardians. With no surviving copy of the log, recovery rebuilds it from sealed sync the substrate retained, following the rotations wrapped to the recovery device. It binds a new device, revokes the rest, carries personas over, and rotates itself. | belowThresholdRefused, memberCannotRevokeRecovery | +| PrismGuardianCollusion | Elevation | A9 | Shares combine only at the threshold (at least 1). Guardians are prisms or devices the person chose. A recovery is visible to every remaining device as revocations. | belowThresholdRefused, zeroThresholdRefused | +| PrismGuardianDeception | Spoofing | A9 | A guardian releases a share only re-wrapped to the requesting device, after confirming the person out of band and comparing a code bound to that device. One deceived guardian is below the threshold. | belowThresholdRefused | +| PrismPersonaHijack | Elevation | A3 | Revoking a device revokes its persona keys at every host on the next sync. Persona recovery keys are wrapped to the main recovery device, and no member keeps them. | revokedDeviceActionRefused, revokedDeviceCannotSign | +| PrismQuantumForgery | Spoofing | A10 | Every record and action from a device with an ML-DSA-65 key also carries an ML-DSA signature (FIPS 204). A verifier with ML-DSA refuses a missing or invalid one; a host can refuse verifiers without ML-DSA (`requirePostQuantum`). The P-256 signature is always required too. | postQuantumSignatureStripRefused, classicalSignatureAlwaysRequired | +| PrismQuantumHarvest | Information disclosure | A10 | Every wrap to a device that advertises ML-KEM-768 is hybrid ECDH plus ML-KEM (both secrets feed HKDF). A classical wrap to such a device is refused. Content keys are AES-256. | postQuantumDowngradeRefused | + +## 6. Attack trees + +**G1. Act as the person at a host.** This requires an accepted action (O4). Paths: + +1. **Forge a device signature.** Requires breaking P-256 (assumption C1). +2. **Use a linked device's key.** + - 2a. Steal an unlocked device (A3). Bounded by revocation and the host time window; residual until revocation propagates. + - 2b. Origin script (A5). Online use only while the script runs; a hardened device yields no copyable key (R1). +3. **Get a rogue device bound.** + - 3a. Answer a link offer. Needs the secret (A2) and the person's confirmation of the hijacker's code. Blocked by PrismLinkHijack. + - 3b. Inject a bind. Blocked by PrismRogueBind. + - 3c. Present a forged genesis. Blocked by PrismGenesisConfusion. +4. **Replay a captured action.** Blocked by PrismActionReplay. +5. **Use a delegate beyond its scope.** Blocked by PrismDelegateOverreach. + +**G2. Read the private boundary.** Paths: + +1. **Be a member device.** See G1 path 3. +2. **Hold an old member device after revocation.** It reads nothing sealed after the rotation. Content it already held, or content sealed under keys it held, stays readable. That is residual R2. +3. **Read sync traffic.** Sync messages are sealed (C1, C3). +4. **Compromise a delegate.** A delegate holds no boundary key. +5. **Unwrap a rotation or link wrap.** Needs the member's agreement key, or the ephemeral key together with the secret. + +**G3. Lock the person out.** Paths: + +1. **Revoke every device.** Needs a member device (A3). The thief cannot revoke or replace the recovery device. Guardians release shares, recovery revokes the thief, and the thief's revocations stop counting. +4. **Lose every device.** Threshold recovery (PrismRecoveryLoss). +5. **Deceive or corrupt guardians (A9).** Below the threshold, nothing is learned. At the threshold, takeover is visible to every remaining device. + +**G4. Link the person across hosts (A6).** Each host holds a different persona prism with different device keys. Hosts that collude still see unrelated prism ids and keys. What remains is network-level correlation (addresses, timing), which the protocol does not address. +2. **Flood or withhold sync.** Bounds apply. Devices stay authoritative offline, and merge converges once traffic resumes. +3. **Withhold a rotation.** The device refuses to seal and keeps reading old content. + +## 7. Device classes and their specific threats + +All classes speak the same records with the same primitives: P-256 ECDSA and ECDH, HKDF-SHA-256, HMAC-SHA-256, AES-256-GCM, SHA-256. That choice is what lets every class take part: P-256 is the curve that Apple Secure Enclave, Android Keystore/StrongBox, TPM 2.0, WebCrypto and common secure elements (ATECC608, SE050, OPTIGA) all support. + +| Class | Typical role | Key store | Link channel | Class-specific threats | Mitigations | +| --- | --- | --- | --- | --- | --- | +| Browser | Member | WebCrypto non-extractable keys in IndexedDB; origin-scoped | Displays or scans QR | Origin script (A5); storage eviction; shared machines | Prefer a native or mobile member as an anchor; revoke on a shared machine; boundary keyring is the residual | +| Native install (desktop) | Member, or always-on federation peer | TPM 2.0, macOS Keychain or Secure Enclave, Windows CNG | Displays or scans QR; typed code | Malware running as the user; backups that copy key stores | Hardware-bound keys (`protection: platform`); exclude key stores from backup; host attestation policy | +| Mobile app | Member | Secure Enclave or Android Keystore/StrongBox, with user presence | Camera QR; NFC | Device theft with the screen unlocked; malicious accessibility services | User-presence gating on signing; fast revocation from any other member; attestation (App Attest, key attestation) when a host requires it | +| Embedded | Delegate | Secure element, or flash on low-end parts | NFC, USB or serial provisioning, or a QR printed on the device that the member scans | Physical extraction; firmware substitution; no screen to show the code | Delegate role only, with a narrow scope; never a boundary key; secure-element keys; the confirmation code is shown on the member device, compared with a code the device prints or emits on its provisioning line | + +**Linking without a camera.** The offer URI is plain text. Any channel that reaches the joining device carries it: NFC NDEF, a USB serial line, or typed base64url. The confirmation code always shows where a person can read it. For a headless delegate that means the code it emits on its provisioning line. + +## 8. Privacy (LINDDUN) + +| Category | Exposure | Status | +| --- | --- | --- | +| Linkability | Each host sees its own persona prism and persona keys. | Holds at the protocol layer. Network addresses and timing remain (R3). | +| Identifiability | The prism id is pseudonymous. Content in the private boundary never reaches hosts. | Holds. | +| Non-repudiation (privacy harm) | Signed actions are attributable to the prism. | By design for authority; hosts should not publish them. | +| Detectability | Relays see a topic exists, message timing and bucketed sizes. | Reduced: exact sizes are hidden by padding (R5). | +| Disclosure | Sealed content needs a member key. | Holds, under C1 to C3. | +| Unawareness | The person must understand a QR code links a device. | The confirmation code makes the step explicit. | +| Non-compliance | No personal data is required to create a prism. | Holds. | + +## 9. Assumptions + +- **C1.** P-256 ECDSA and ECDH, SHA-256, HMAC-SHA-256, HKDF and AES-256-GCM are secure at their usual strengths. +- **C2.** The platform's random source is sound. +- **C3.** Non-extractable keys cannot be exported by the platform API. Hardware stores resist extraction as their vendors state. +- **C4.** The out-of-band channel reaches the device the person intends. Its confidentiality only needs to hold until the code is confirmed. +- **C5.** Hosts keep a replay set for at least their time window, and their clocks are within that window. +- **C6.** Fewer than the threshold of guardians collude, and a guardian confirms the person out of band before releasing a share. +- **C7.** ML-KEM-768 and ML-DSA-65 are secure, so a hybrid wrap holds if either ECDH or ML-KEM holds, and a hybrid signature holds if either P-256 or ML-DSA holds. +- **C8.** The platform authenticator asks for user verification before it signs a WebAuthn assertion, and the substrate retains sealed sync messages per topic (`retained`) for as long as recovery may need them. + +## 10. Residual risks + +| Id | Residual | Status | +| --- | --- | --- | +| R1 | Origin script can use browser key handles while it runs. | Reduced twice. No key can be copied out (hardened devices), and every action a host marks needs the person's user-verified passkey approval of that exact action. Open: a WebAuthn prompt does not show what is being approved, so a person can be tricked into approving script's action at the moment they expect a prompt (section 12, D1). | +| R2 | A revoked device keeps everything it already held, and any content sealed under keys it held. | Inherent for what it already read. Rotation on revocation already gives post-compromise security for later content. Forward secrecy inside an epoch is section 12, D2. | +| R3 | A host can link the person across hosts. | Closed at the protocol layer by per-host personas, each with its own passkey. Network addresses remain (section 12, D3). | +| R4 | Losing every member device loses the prism. A thief can race revocations. | Closed. Recovery needs no surviving device and no copy of the log: it rebuilds the log from sealed sync the substrate retained. Recovery precedence defeats the thief. Open: guardians colluding at the threshold (C6), mitigated by section 12, D4. | +| R5 | Relays see topic existence, timing, sizes and addresses. | Sizes and timing closed by bucket padding and constant-cadence cover traffic, at the cost of one message per interval. The bucket grows once when the log outgrows it. Addresses remain (D3). | +| R6 | Classical primitives fall to a future quantum adversary. | Closed where the platform has ML-KEM-768 and ML-DSA-65 (Node 24 WebCrypto today; browsers as they ship the WICG modern-algorithms work): hybrid wraps and hybrid signatures, with stripping and downgrade refused. A verifier without ML-DSA checks P-256 alone; hosts refuse such verifiers with `requirePostQuantum`. | +| R7 | The protection claim is unverified without attestation. | Closed in the protocol (`admitDevice`). Per-platform verifiers are host code (section 12, D5). | + +## 11. Verification map + +| Layer | Evidence | +| --- | --- | +| Rules | `Stitch.PrismId` theorems, attested by `lexlean verify --all` (`product/source-attestation.json`) | +| Runtime | `tests/prism-id.test.js`: 37 executable tests, each named after the behavior it shows | +| Cross-runtime | `tests/fixtures/prism-id-vectors.json` and `scripts/verify-prism-id-vectors.py` | +| Facet | `Product.Security` rows `Prism*`, each with gate, review and proof evidence | + +## 12. Designed next closures, extrapolated from current industry work + +These are designs, not yet code. Each names the model rule it would add. + +| Id | Gap | Design | Prior art it builds on | +| --- | --- | --- | --- | +| D1 | A WebAuthn prompt does not show what it approves (R1). | Approve through a surface script cannot draw: the browser-rendered transaction dialog of Secure Payment Confirmation where available, otherwise a second member device (phone) that shows the decoded action and signs the approval. The model rule is the same `presenceSatisfied`, with the evidence coming from a device outside the origin. | W3C Secure Payment Confirmation; WebAuthn L3 cross-device (hybrid) authenticators | +| D2 | No forward secrecy inside an epoch (R2). | Ratchet the sync key per message and delete each key after use, and treat each linked device as an MLS leaf so that a member update rotates the group secret without a revocation. Rule: `messageKeyUsable(epoch, counter, deleted)`. | MLS (RFC 9420); Signal double ratchet | +| D3 | Relays and colluding hosts see network addresses (R3, R5). | Send persona actions and sync through Oblivious HTTP relays run by different federation members, so no single node sees both the address and the topic or host. Where a stronger guarantee is wanted, route sync through a mixnet with Poisson cover traffic, which the cadence already provides. | Oblivious HTTP (RFC 9458) with HPKE (RFC 9180); Loopix and Nym mixnets; Tor | +| D4 | Guardians colluding at the threshold (R4, C6). | Make a recovery take effect only after a delay, during which any member device can veto it with a user-verified approval (D1). A delay needs time no single party asserts: recovery records carry timestamps cosigned by a quorum of federation witnesses, which kappa-registry's append-only directory and transparency checkpoints can provide. Rules: `recoveryEffective(witnessedAt, now, delay, vetoed)` and `vetoCounts(activeMember, userVerified)`. | Social-recovery wallets with security periods; Apple Recovery Contacts; key transparency (AKD) and witness cosigning | +| D5 | Hosts need verifiers for each platform's attestation (R7). | Ship verifiers for WebAuthn attestation statements (packed, tpm, android-key, apple), Android Key Attestation and Apple App Attest, each with roots the host pins, as plug-ins to `admitDevice`. | WebAuthn attestation formats; FIDO Metadata Service | + diff --git a/docs/prism-id.md b/docs/prism-id.md new file mode 100644 index 0000000..633597e --- /dev/null +++ b/docs/prism-id.md @@ -0,0 +1,250 @@ +# Prism id + +Prism id is a login-free identity. A prism comes into being in the browser the +first time it is used, and its id is the kappa of its genesis record. No +account, password, email, OAuth provider or server is involved. + +- Model: `app/src/Stitch/PrismId.lex.tex` (`Stitch.PrismId`). Every + authorization decision in the runtime calls its generated binding. +- Runtime: `src/prism-id.js`. +- Tests: `tests/prism-id.test.js`; the substrate bus, `tests/prism-bus.test.js`. + +## Kappa + +kappa = `sha256:` + lowercase hex SHA-256 of uor-addr canonical JSON: RFC 8785 +shape, strings must already be NFC (they are refused, not normalized), integers +only, object members ordered by the UTF-8 bytes of their names. This matches +LexLean's `kappa` package and PrismPM ADR-017. It differs from the older +`docs/canonical-json.md` form, which sorts by UTF-16 and does not check NFC. + +## Records + +| Kind | Signed by | Meaning | +| --- | --- | --- | +| `prism/device/1` | none (public record) | A device's class (`browser`, `native`, `mobile`, `embedded`, `recovery`), its claimed key protection (`software`, `platform`, `secure-element`, `threshold-shares`), its P-256 signing and agreement public keys, an optional ML-KEM-768 public key (`kem`), an optional ML-DSA-65 public key (`pqsign`), and an optional passkey binding (`presence`: rp id, origin, P-256 credential key). Its kappa is the device id. Private keys are non-extractable. | +| `prism/genesis/1` | the first device | Creates the prism. prism id = kappa of this body. The first device is a member. | +| `prism/bind/1` | an active member | Links a device as a `member` (no scope), a `delegate` (a non-empty list of actions), or the `recovery` device. Once a recovery device exists, only it may bind a new one. | +| `prism/revoke/1` | a linked member | Removes a device. `keep` lists the binds the revoked device made that stay valid. `epoch` and `wraps` carry a new private boundary key wrapped to each remaining member. | +| `prism/action/1` | an active device | An action for a host: `action`, `audience`, `payload`, `at`, `nonce`. A recovery device never signs one. | +| `prism/persona/1` | an active member | Names the persona prism for one host, and carries its recovery key wrapped to the main recovery device. Main log only. | +| `prism/persona-key/1` | an active device | Asks for this device's persona key for one host to be bound in that persona. Main log only. | + +The prism log is a set of signed records keyed by the kappa of each envelope, so +merging two logs is set union: commutative, associative and idempotent. +`resolvePrism` decides which devices are active, using +`Stitch.PrismId.bindAllowed` and `deviceMaySign`. + +Revocation wins over a concurrent bind: a bind made by a revoked device counts +only if the revocation lists it in `keep`. Rotating away from the genesis device +keeps every device that was already linked. Two members that revoke each other +are both revoked. The recovery device's revocations take precedence: a device it +revoked has no revocations that count (`Stitch.PrismId.revocationCounts`), and a +member can neither revoke it nor replace it (`recoveryBindAllowed`). + +## Device classes and roles + +Every device, whether a browser tab, a native install, a mobile app or an embedded device, uses the same records and the same primitives: P-256 ECDSA and ECDH, HKDF-SHA-256, HMAC-SHA-256, AES-256-GCM and SHA-256. P-256 is the curve that WebCrypto, Apple Secure Enclave, Android Keystore, TPM 2.0 and common secure elements all support, so a native implementation can keep its keys in hardware. + +A **member** holds the private boundary and can link and revoke devices. A **delegate** is scoped: it may sign only the actions in its scope, never receives the private boundary, and cannot link or revoke (`Stitch.PrismId.mayAdminister`, `receivesPrivateBoundary`, `actionAllowed`). Embedded devices join as delegates. + +The `protection` field is the device's own claim. A host that requires hardware-held keys admits a device only through `admitDevice(policy, record, evidence, verifiers)`: a verifier the host pinned for the evidence format must confirm hardware protection of exactly this device's signing key (`Stitch.PrismId.attestationBinds`, `hostAdmitsDevice`). Platform verifiers (App Attest, Android key attestation, TPM) plug in as host code. + +A **hardened** device (`hardenSession`) keeps only non-extractable seal and topic keys derived from each boundary key, never the raw bytes. Script in its origin can use them while it runs but cannot copy them out. A hardened device can sync, seal, link delegates and revoke; it cannot link members or set up recovery (`Stitch.PrismId.mayShareBoundary`). Hardening every browser and keeping one native or mobile member as the sharing device is the recommended layout. + +A native implementation checks itself against `tests/fixtures/prism-id-vectors.json`. `scripts/verify-prism-id-vectors.py` is an independent implementation of the canonical form that does exactly that. + +## Linking a device out of band + +1. An active device creates a link offer: prism id, a one-time 32-byte secret, + an ephemeral ECDH public key, and an expiry. `uri` is what a QR code carries. +2. The new device scans it, and posts a link request to the rendezvous topic + derived from the secret. The request carries its device record and an HMAC + under the secret. +3. Both devices show a six-digit code derived from the secret and the joining + device's kappa. The person confirms that the codes match. Someone who + photographed the QR code and answered first gets a different code. +4. The offering device accepts only if `Stitch.PrismId.linkOfferAccepted` + holds (code confirmed, secret matches, not yet used, not expired). It signs + a bind. For a member, it wraps the boundary keyring to the new device's + keys: ephemeral ECDH, plus ML-KEM-768 when the device advertises it, into + HKDF (salt = secret) and AES-GCM. A delegate gets no wrap. +5. The new device checks that the prism lists it with the offered role, + unwraps the keyring if it is a member, and holds the full log. + +The offer URI is plain text, so any channel works: a QR code, NFC, a USB or +serial provisioning line, or typed text. `linkQr(uri)` gives its QR code +(ISO/IEC 18004, byte mode, level M, the smallest version and the mask with the +lowest penalty) as `{ size, modules }`, `modules[y][x]` true for dark; a host +draws it with a four-module quiet zone. + +## Revocation rotates the private boundary + +Every revocation carries a new boundary key, wrapped to each remaining member +with a fresh ephemeral ECDH key. The current key is the one with the highest +epoch, and ties go to the smaller kappa. A device without the current key +refuses to seal (`Stitch.PrismId.boundaryKeyAdmitted`). The sync topic is +derived from the current key, so a revoked device loses the topic too. After a +rotation, publish once under the previous key so that devices still listening +there take up the new key. Content sealed under earlier keys stays readable to +the devices that hold them. + +## Post-quantum wraps and signatures + +Every key wrap (linking, rotation, recovery shares, persona recovery) is +hybrid when the recipient's device record carries `kem`: both the ECDH and the +ML-KEM-768 shared secrets feed HKDF, so the wrap holds if either does. A wrap to +such a device without the KEM part is refused, and so is a sender that cannot +encapsulate (`Stitch.PrismId.hybridWrapRequired`). Devices advertise `kem` when +their WebCrypto has ML-KEM (Node 24 does). + +A device whose record carries `pqsign` signs every record and action twice: +P-256 ECDSA in `signature` and ML-DSA-65 in `pqsignature`, both over the same +canonical body. A verifier with ML-DSA requires both +(`Stitch.PrismId.hybridSignatureAccepted`), so stripping the ML-DSA signature +is refused. A verifier without ML-DSA checks P-256 alone; a host that must +resist a quantum forger passes `requirePostQuantum: true`. + +## Recovery + +`createRecovery(session, { threshold, guardians })` binds a recovery device +whose private keys, together with a snapshot of the boundary keyring, exist only +as Shamir shares over GF(256). Each share is wrapped to one guardian: a device +of another prism the person trusts, a spare device of their own, or +`{ paper: true }` for a share to print. Every later rotation also wraps the new +boundary key to the recovery device. + +After losing every device, the person creates a new device. Each guardian +confirms the person out of band, compares `recoveryCode(prism, record)` on both +screens, and calls `releaseShare`, which re-wraps the share to the new device. +`recoverPrism` refuses below the threshold (`Stitch.PrismId.thresholdMet`), +binds the new device as a member, revokes every other device ever linked +(including a thief's, whose revocations then stop counting), carries personas +over, and with `rotateRecovery` replaces the recovery device with fresh shares +so the recovered secret is retired. + +A retired recovery device stays retired. Its retirement lists in `keep` every +bind and revocation it made, and nothing else it signs counts +(`revocationCounts`, with the retirement as the keep list). So the old shares, +still combining after a recovery, replayed against a log from before it, bind +and revoke nothing: the retirement in the current log never listed the +replay's records. A replay that also signs a second retirement of the old +recovery device, keeping its own records, is a fork. A recovery device is +retired once, so a log holding two retirements that keep different records +does not resolve (`fork`): a host that hears both acts for neither side, and +the replay never acts as the person. Devices never hold a fork: +`receiveSync`, and `heardLog(..., { own: true })` for a device checking its +own log, admit records through `admitRecords`, which refuses a retirement of +a recovery device the held log already retires. Recovering again with the +newer kit leaves the retired recovery device as it is. + +Recovery needs no copy of the log. Given `bus` instead of `records`, it reads +the sync messages the substrate retained (`bus.retained(topic)`), opening them +with the keyring snapshot in the recovery secret. Every rotation wraps the next +boundary key to the recovery device, and devices publish once under the +previous key after a rotation, so recovery follows the chain of rotations to +the current key and rebuilds the log and the persona logs. + +## Personas: one id per host + +A host never sees the main prism. `ensurePersona(session, audience)` creates a +persona for that host: a prism of its own, with a non-extractable persona key on +each device. Two hosts see unrelated prism ids and keys, so they cannot link the +person. The persona-to-host map lives only in the main log, which travels sealed +between members. Members keep personas in step on sync: they bind persona keys +requested by active devices with the same role and scope, and revoke persona +keys of devices the main prism revoked. A persona's recovery key is wrapped to +the main recovery device, so recovery restores every persona whose log the host +supplies. `personaFor` returns what a host needs, and `signPersonaAction` signs +under the persona. `ensurePersona(session, audience, { presence })` binds that +host's passkey to the persona device, since a passkey belongs to one relying +party. + +## Actions at a host + +A device signs an action for one `audience` (a host), with a nonce and a time. +The host verifies it against the prism log: it must be fresh, unseen and for +this audience (`Stitch.PrismId.actionFresh`), and it must come from an active +device inside its scope (`Stitch.PrismId.actionAllowed`). This is how foundry +grants a stakeholder the permissions of their prism context. Hosts are given +the persona for their audience, not the main prism. + +A host also hears revocations the signing device does not present. Every +prism has a public log topic (`logTopic(prism)`, derived from the prism id +alone) where devices publish the signed public records (`publishLog`) after a +bind or revocation and on the refresh cadence. `verifyAction(..., { bus })` +merges what that topic retains (`heardLog`) before deciding, so a stolen +device that never syncs is refused once any other device has published its +removal. Only signed records count, so anything else on the topic is ignored. + +## Actions the person approves + +A host can require the person's approval for chosen actions: +`verifyAction(..., { requirePresence: ['payments/send'] })`. The device signs +the action as usual and passes `presence`, a function that calls +`navigator.credentials.get` with the challenge it is given and +`userVerification: 'required'`. The challenge is the SHA-256 of the canonical +action body (`presenceChallenge`), so the approval covers exactly this action. +The host checks the assertion against the passkey bound in the device record: +type, challenge, origin, rp id hash, the user-present and user-verified flags, +and the signature (`Stitch.PrismId.presenceSatisfied`). Script running in the +origin can still sign with the device key, but it cannot produce that approval +without the person. + +## Boundaries + +A prism has a private boundary (a key held only by its linked devices) and then +everyone else. A boundary with two or more identities is shared, and is public +to its members (`Stitch.PrismId.boundaryShared`). A published boundary is public +to all. `sealPrivate` and `openPrivate` keep content in the private boundary; +the sealed object's kappa is its address. + +## Sync over the substrate + +Linked devices sync on a topic derived from the private boundary key, so only +they can find it. Each message is the log and the persona logs, sealed in the +private boundary, bound to the prism id, and padded (ISO 7816-4) to a +power-of-two bucket of at least 1 KiB so relays learn only the bucket. +`createSyncCadence` goes further: called on a fixed timer, its `tick` sends a +pending sync or else a cover message (`publishCover`) padded to the same +bucket, so relays see one message of one size per interval either way. +Receivers ignore cover messages. With `refresh: n`, every n-th tick sends a +real sync and the public log even when nothing changed, so a substrate that +keeps messages only for a while always holds a recent one while any member +is online. Messages over 4 MiB and logs over 4096 records are refused +before any parsing or signature work. The bus contract is `publish(topic, bytes)` and +`subscribe(topic, fn)`, and `retained(topic)` returns the messages the +substrate kept for that topic, which offline devices and recovery read. +`createMemoryBus` implements it for tests. `createRelayBus` implements it on +stitch's substrate: stitch's warm relay with its relay framing across devices +and origins, and BroadcastChannel within one origin. The relay sees a name +hashed from the prism topic and the sealed or HMAC-bound bytes. It retains a +message for the warm lifetime (30 minutes) and promises nothing longer; a +cadence whose refresh is shorter keeps a recent sync there while a member is +online. A device away longer, or a log-free recovery after every member has +been offline that long, catches up only from the next message a member +publishes. Link offers use the same bus +on their `prism-rendezvous:` topic. + +The threat and security model is in `docs/prism-id-threat-model.md`. + +## Open + +These belong in the threat model's residuals (section 10) and designs +(section 12) when its next revision is attested; they are kept here so that +change does not invalidate the retained proof evidence. + +- **A replayed old recovery, forked.** A replayed old kit binds and revokes + nothing (see Recovery), but whoever holds it can still sign a second + retirement and publish it on the public log topic. Hosts that hear it then + act for neither side until the person stops using that prism id: the old + kit cannot take the id over, but it can deny it at hosts. Set union has no + order, so only an outside witness tells the two retirements apart; ordering + by the witnessed time of threat-model D4 closes it, and keeping an old kit + as secret as the current one keeps it from arising. +- **Retention when every member is offline.** The refresh cadence keeps a + recent sync and public log on the warm relay while a member is online. After + every member has been offline longer than the relay keeps messages, log-free + recovery and hosts wait for the next publish, until a colder tier of the + substrate retains them. +- **Hosts that do not read the public log** hear a removal only from the log + the signing device presents (threat-model G1 2a). diff --git a/docs/prism-model.md b/docs/prism-model.md new file mode 100644 index 0000000..55dae39 --- /dev/null +++ b/docs/prism-model.md @@ -0,0 +1,85 @@ +# Stitch model and implementation contract + +## Authority and scope + +The project-owned LexLean modules under `app/src/Stitch/` define pure domain semantics. A project vocabulary extension names the domain; Foundation byte/application modules supply Prism interfaces. This is not a fixed-choice classifier. Integrity, authority, reconstructibility, execution, resources, evidence and observed availability are distinct. + +The modeled surface covers objects, encodings, fragments, custody, observations, resource admission, pointer succession, pure computation, checkpoint linkage, evidence and their composition. Completeness means coverage of these contracts and explicit boundaries, not a proof of the internet or browser/VM implementation. + +The official skill was discovered through https://uor.foundation/agents.md and its skill index. The website snapshot describes 0.2.0; this repository pins published `prism-code` 0.7.2 and uses its current bundled skill/API. The SDK is separately digest-pinned. `afflom/verdant-resonance` informed modeling depth, without importing garden-specific constants, controllers or Rule 30 mechanisms into a network protocol. + +## Domain map + +| Domain | Invariant / boundary | +|---|---| +| Identity | Distinct immutable object/encoding/manifest commitments; SHA-256 collision resistance is assumed | +| Encoding | Exact decoding and indexed compatible 2-of-3 XOR fragments; every external basis must be declared | +| Custody | Requested/acknowledged/committed/failed/superseded copies; a peer retention assertion is not a storage oracle | +| Observation | Time-bounded observer evidence; timeout means reachability loss, not death or an omniscient global view | +| Budget | Independent resource bounds, reservation before effects, no refund for unknown outcomes | +| Pointer | Pinned writer, exact successor/predecessor, half-open validity interval; retained observer head is required | +| Compute | Identified program/input/model, bounded step, semantic replay and checkpoint links; no VM effects | +| Evidence | Evidence reuse binds model/artifact/subject roots, exact claims, assumptions, ordered dependencies, permitted effects and finite observation horizons | +| System | Composition preserves admission conditions and never treats an attempted effect as completed | + +## Object wire contract + +`src/layer1-uor/custody.js` implements RFC 8785 JCS canonicalization over finite IEEE 754 binary64 numbers, Unicode scalar strings and UTF-16-sorted object names, with UTF-8 output. Negative zero serializes as zero; NaN and infinities are refused. `parseCanonicalJson` rejects duplicate names (including escape-equivalent names) before signature processing. Accessors, custom prototypes, hidden fields, invalid Unicode and explicit resource-budget excess are refused. Application schemas independently reject unknown fields, fractional revisions and malformed digests. See [canonical JSON](canonical-json.md) for standard coverage, compatibility and evidence boundaries. + +Each hash frames a versioned ASCII domain, unsigned 64-bit big-endian payload length and exact bytes. Object, encoding, fragment and manifest domains differ. A fragment binds its encoding digest and unsigned index. A manifest never hashes its own digest field. Initial encoding is raw, self-contained bytes; unsupported dependencies/encodings fail closed. + +XOR splits bytes into two equal-sized halves, padding only the last half, with their XOR as the third fragment. Recovery validates two different compatible indices and full fragment commitments, reconstructs the declared length, then checks object and encoding digests. Empty/odd-length inputs and every pair are covered independently in Node/Python vectors. + +The sender may retain the full original while remote peers hold distinct fragments. Thus 1.5× is a nominal coding ratio, not total physical storage. A placement carries a typed receipt per copy. Recovery is evaluated at the stated time from live, authenticated, exact-manifest/exact-fragment receipts on distinct holders, not a caller-supplied committed flag. Migration activation requires its still-live current-epoch ledger reservation and the exact request root. Superseded copies remain accounted until an exact route-bound release acknowledgement. The live selected-object repair path binds each actual dispatch reservation and its unique local epoch, expires lost ACKs conservatively, and refreshes same-holder/index assertions only after a fresh checked receipt. Expiry or local route loss supersedes reachability without asserting physical deletion. Retrieval copies and public-relay copies are additional. Peer IDs do not prove physical failure-domain independence. + +## Mutable pointers + +The v1 body contains `version`, `name`, `authorityKey`, `revision`, `previousDigest`, `objectRoot`, `validFromMs` and `validUntilMs`. Signature bytes cover a domain label and canonical body. The pointer digest covers body and signature. Bootstrap requires revision zero, no predecessor and an independently supplied trusted authority. A successor is exactly current revision plus one and binds the retained pointer digest. Validity is `from <= now < until`. + +Conflicts/stale updates are refused. A client that loses its trusted head needs a separate independently trusted exact recent anchor to prevent rollback. Import and acceptance alone never change a live head. Explicit local restoration reads only the accepted vault anchor, rechecks signature/validity and exact pinned name/key/digest, and restores only an empty or identical head. Restoration shares ordinary admission's serialized CAS; any different retained head refuses, even a newer accepted anchor. Normal exact successor admission then resumes. Key rotation/revocation are explicit origin-local administrative operations; they never transfer independent trust or provide multi-writer ordering. See [browser authority](browser-authority.md). The DNS UI requires explicit authority pinning, keeps an observer head for strict successor checks, and uses multipart Cloudflare TXT records for full pointers. Saved nonextractable signers and independently accepted exact name anchors can be retained origin-locally. Saved heads advance transactionally on strict succession and restore only through an explicit exact-scope action. Independent retention is still required because browser storage can be lost. The legacy single-255-byte DuckDNS path is refused for full pointers. Publication retains provider record identity and reconciles uncertain writes by bounded exact reads. An unresolved create/update is not repeated blindly; an exact signed match resolves uncertainty. Successors update the existing record. This is not provider-atomic compare-and-swap or global ordering. + +## Pure jobs and checkpoints + +Version 1 programs specify width (8/16/32/64/128), exact input and all instructions. Values use canonical lowercase unsigned hex. The full-width ring operations include modular POW. Version 1 DIV/MOD by zero yield zero, preserving the legacy interpreter. Version 2 adds explicitly capacity-bound, width-tracked byte-sequence CONCAT, all byte-aligned result widths, empty sequences, mixed-width arithmetic and 8-bit comparisons. Version 2 DIV/MOD by zero are refused. Source semantics, upstream profile differences and exact versioned records are documented in [UOR primitives](uor-primitives.md). + +Local policy bounds programs to 1,024 instructions and 1,000,000 abstract work units. Version 2 terms additionally have a tested 32768-bit parsing/memory envelope and explicit program capacity. These are resource bounds, not upstream semantic limits. Work counts modular multiplication rounds, bitwise width, limb complexity and CONCAT bytes rather than treating wide POW as one cheap instruction. Program/input identity, model identity, step, state and predecessor bind checkpoints. Every checkpoint is replayed from input, including when network checkpoints were missed. Direct successors bind the retained predecessor. An independently replayed snapshot with an unavailable predecessor reports its chain link unchecked. + +Checkpoint `modelDigest` identifies the reachable ring/checkpoint definitions and types, the generated evaluator, and the transitive JavaScript replay adapters under `stitch/execution-semantics/v1`. Canonical syntax determines the model portion, so proof formatting or unrelated product changes do not invalidate the same execution. Adapter bytes are deliberately conservative: any adapter change invalidates that execution identity. `MODEL_SOURCE` separately retains exact whole-source/vocabulary provenance. Legacy whole-source checkpoint roots are not implicitly accepted. + +Typed digest observations bind every exact program, input, job, state and checkpoint field to its distinct domain and an independently supplied expected model root. This assumes the host hashes the exact typed input using the declared versioned canonical encoding. The model does not implement SHA-256, prove collision resistance or authenticate an observation producer; wire-byte-to-record correspondence remains a host contract. Legacy root-only predicates check replay, not commitment admission. + +Partitions can cause duplicate pure computation. There is no exclusive execution or exactly-once external effect claim. VM output can be stored as an object but is not a semantically verified ring job. + +## Policies and effects + +Budgets keep request count, transfer bytes, stored bytes and compute steps separate. The caller supplies epoch/time interval/nonnegative limits. The ledger is the sole modeled resource authority, with immutable action IDs, epoch-bound reservations and per-resource aggregate validation. Reservations are immutable; duplicate action IDs fail. Unknown outcomes remain charged. Settlement reduces cost only when actual expenditure is known and within the reservation. A known expenditure observation permits settlement only within the ceiling, and is not proof of delivery or storage. The host must durably retain and serialize the ledger; scalar helpers are compatibility arithmetic, not effectful admission. Clock regression and expired epochs fail closed; a new epoch requires a deliberate new budget. + +The browser exposes all operational limits and duration. Only the explicit Start New Epoch action grants another allowance; prior reservation ledgers remain retained and exportable. Renewal preserves stored objects, jobs, authority pins and trusted pointer heads and does not retry pending work. The browser shares one explicit admission controller across transport, storage, computation, and DNS. It bounds application requests and UTF-8 payload ceilings, cumulative cache allocation, and replayed abstract compute work. It does not meter TLS, ICE/STUN, VM, browser or operating-system overhead. The default ten-minute epoch is configurable and never resets or refunds automatically; exhaustion is an explicit refusal, not evidence of indefinite service. + +The survival heuristic remains an experimental proposal. Browser evaluation uses monotonic elapsed time and an internal cap. One favorable churn schedule does not establish optimality or a universal Poisson model. + +## Evidence register + +| ID | Claim | Required evidence | +|---|---|---| +| ST-OBJ | Compatible fragment pairs recover committed bytes | Formal XOR relation, independent vectors, tamper refusals | +| ST-CUSTODY | Unacknowledged transfer is not committed; a live bound receipt and exact ledger reservation are required before replacement activation | Admission predicates, transition/expiry/superseded-copy tests | +| ST-BUDGET | Admitted reservations stay within every bound | Nat arithmetic theorem, boundary/duplicate/clock/settlement tests | +| ST-POINTER | Accepted successor is fresh, ordered and authorized under a supplied anchor | Successor theorem, signatures/wrong-key/replay/conflict tests | +| ST-JOB | Accepted checkpoints match replay; resume equals uninterrupted execution | Transition/link theorems, all-op/all-width/every-cut tests | +| ST-HOST | Evidence reuse requires exact typed scope and dependency bindings | Modeled boundary and concrete receipts; field trials remain required | +| ST-BINDING | Runtime functions match their source | Strict extractor, source digest, freshness and independent differential tests | + +Evidence labels are not attestations: comparing KernelChecked or HostAssumptions fields does not prove the producer authenticated them. Exact dependency-root and ordered-snapshot checks do not discover unknown dependencies. + +Formal status comes from the actual exact-revision SDK job, not this table. Node/Python conformance proves neither the browser nor a live network. The gate must publish the exact model lock, verification report and built artifact identity before a release proof claim. Handcrafted holos and invented attestations are prohibited. + +## Reproduction and negative tests + +`npm test` checks generated freshness, baseline regressions and adversarial contracts. `python3 scripts/verify-custody.py` independently checks wire vectors. `cargo test --locked` checks original UOR conformance. `sh scripts/check-model-sdk.sh` runs formal acceptance inside the locked SDK. CI uses the same source revision. + +Tests alter fragment bytes, manifests, checkpoint states with recomputed digests, links, signers, revisions and budgets. Correctly hashing a forged state is not enough: semantic replay must reject it. Generated drift must fail before execution. These are deterministic tests, not physical three-peer reliability measurements. + +## Extending Stitch + +New encodings specify exact decoding and all dependencies. New effects expose request/acknowledgment/commit/unknown states. Policies may propose choices but cannot bypass resource/safety admission. Extend LexLean semantics first, add positive and negative vectors, regenerate bindings and pass SDK/runtime gates. Do not introduce random weights or unrelated cellular automata merely to make a model appear richer. diff --git a/docs/product-projection.md b/docs/product-projection.md new file mode 100644 index 0000000..e566418 --- /dev/null +++ b/docs/product-projection.md @@ -0,0 +1,220 @@ +# Complete Stitch product projection + +## What is represented + +`app/src/Product/Model.lex.tex` is the project-owned typed product graph. Its +`product` value contains the component, capability, external-assumption, +dependency, deployment and artifact declarations listed in +`product/contracts.json`. `valid` checks identity uniqueness, component-to-asset +closure, capability ownership and assumption closure, dependency consumers and +deployment capability references. `productGraphIsClosed` states the concrete +structural acceptance obligation. The register is derived from these declarations; its counts are not policy +scores, reliability measurements or limits on extension. + +The graph covers all five Stitch layers and the actual browser product: + +- Canonical objects, encodings, XOR fragments, local cache, conditional peer + custody, migrations and recovery. +- Experimental scheduling proposals under independent resource admission. +- Deterministic programs, checkpoint replay, transfer and resumption. +- Independently pinned pointer authority, full pointer DNS serialization, + DoH reads and scoped DNS writes. +- Browser DOM, WebCrypto, elapsed and wall clocks, session RAM, WebRTC, + same-origin BroadcastChannel and public signaling. +- Separately enabled public payload relay and its disclosure boundary. +- v86, WebAssembly, BIOS, Linux guest image, 9p object-file mirroring, shell + output and Ethernet forwarding. +- Same-origin static publication and every currently loaded local asset. +- Historical simulation/Rust conformance, distinguished from the live product. +- Native Linux routing as an explicitly unsupported browser boundary. + +`Product.Host` defines typed requests, destination/content/session-bound grants, +pending effects and matching terminal host observations. Admission reserves the +existing action-ID budget ledger before appending a pending request. Pending +requests do not create observations. Observation binding checks the action ID, +capability, subject, destination, session and non-regressing observation time. +Repeated or wrong-session completions are refused; recording a success, failure +or unknown outcome never refunds the ledger. These are pure contracts, not a +new browser driver or a claim the handwritten runtime already implements this +entire journal. Domain acceptance remains necessary after a host response. + +The host contract does not accept an arbitrary boolean as proof of storage, +cryptography, propagation, guest execution or retention. Its authorization flag +is an externally supplied grant observation with an explicit exact scope. The +host is responsible for obtaining that grant, serializing transitions and +retaining its journal. A source theorem cannot authenticate a host assertion. + +## Tested host-transition correspondence + +The implementation uses existing component state rather than a second generic +budget or journal. Focused interruption tests now exercise these refinements: + +- Transport fences signaling, ICE, sockets, peer replacement and data-channel + callbacks with exact channel and generation identity. Switching or reconnecting + a mesh invalidates old asynchronous work before cleanup. +- DNS publication retains destination/pinned-authority-scoped candidates and + provider record identity. Bounded exact reads precede writes. An uncertain + create or update permits reconciliation reads, not a blind repeat; signed + matching content confirms the observed result. Tokens are not retained in + publication state. Provider acknowledgement is neither DNS propagation nor + atomic compare-and-swap. +- VM startup has constructor/download/readiness failure transitions and a + configurable finite deadline (60 seconds by default). Cleanup permits explicit + retry, and generation identity fences old callbacks. Cleanup is best-effort, + not proof that host downloads stopped. A command timeout means its completion + is unknown, not that the command was cancelled. Whole-VM runtime expiry and + explicit cancellation after dispatch separately request a stop; local-9p + pre-allocation limits and bounded range reads are installed before run. The + retained-command selector can observe earlier available handles without replay. +- `Stitch.Pointer.restoreAllowed` admits only a separately accepted exact vault + anchor in its independently pinned live scope, with current signature/validity + and an empty or identical retained head. `PointerObserver` shares restoration + and succession's serialized CAS; no different retained head can be overwritten. + `Product.Experience` separately exposes import, exact acceptance and explicit + restoration, with checked/accepted/live-head evidence and busy/scope guards. + The branded vault read, cryptographic result, clock and DOM facts remain host + observations; no imported evidence automatically establishes trust. +- Serialized storage/compute ingress, immutable reservations, retained pointer + heads and explicit resource-epoch renewal implement their corresponding local + admission boundaries. Unknown effects do not refund previous charges. + +`tests/transport-generation.test.js`, `tests/dns-publication.test.js`, +`tests/vm-lifecycle.test.js`, `tests/pointer-recovery.test.js`, recovery UI tests and the browser-script harness in +`tests/runtime-admission.test.js` cover these concrete paths. They do not prove +universal runtime refinement of `Product.Host`, physical browser/NAT behavior, +or the host's cryptographic/grant attestations. The full contract's typed grant +roots and complete terminal-observation journal remain specification boundaries, +not claims about mechanisms absent from the runtime. + +## Official Prism representation and the supported route + +The official `Foundation.Arch` facet represents the complete component and flow +view through `app/src/Product/Architecture.lex.tex`: 18 components, 31 directed +flows, four stakeholder groups (operator, reader, reviewer and system integrator), +four concerns, and four corresponding viewpoints and views. All +indexes are derived contiguous positions in sorted declaration-identifier order. +There are no invented quality scores, thresholds or measured availability rows. + +The original architecture-only type subset was derived from the official +[PrismPM Foundation.Arch source](https://github.com/UOR-Foundation/PrismPM/blob/fe5b8b73a94134c316329a8d1b09ebc97b555c5f/stdlib/src/Foundation/Arch.lex.tex). +The complete product facets extend those types with the pinned +[UORust type source](https://github.com/afflom/UORust/tree/1d531dfe0120d1cbdac2dd599f6cde513118f0ce/app/src), +including the design-view types and related security, quality, threat-model and +experience records. Exact upstream source hashes, derived type-file hashes, +retained declaration counts and derivation scope are recorded in +[`product/facet-type-provenance.json`](../product/facet-type-provenance.json). +The old architecture-source hash is historical provenance, not the identity of +the expanded current type file. + +These are type-only declarations: examples, instances and upstream proof claims +are not copied as acceptance evidence. Titles use available glossary terms. +Qualified type names remain intact; the SDK projection mapping is unchanged. +The original PrismPM MIT notice remains in `product/PRISMPM-LICENSE-MIT.txt` and +UORust notices in `product/UORUST-LICENSE-MIT.txt`. The application still uses its +existing digest-pinned SDK. Type-reference inspection neither upgrades that SDK +nor claims the expanded source has passed its formal gate. + +The official +[specification sections 2 and 11](https://github.com/UOR-Foundation/PrismPM/blob/fe5b8b73a94134c316329a8d1b09ebc97b555c5f/SPEC.md) +explain the limit of the currently supported containing-system profiles: + +- `prismpm/system-model/2` is a static generated DOM/WebAssembly browser + application with **no persistent storage and no external application + services**. The specification explicitly says empty Holo capabilities do not + admit browser-effect requirements. It cannot truthfully contain full Stitch. +- `system-model/1` is the transactional production-service profile, not an + arbitrary browser product graph. +- `system-model/3` is a separate host-effect server service with loopback-only + Linux/Compose deployment. It is not a WebRTC browser profile and does not + automatically supply whole-product release/replay or deployment acceptance. + +Accordingly, the supported implementation is the project-owned complete typed +product contract plus the official architecture facet projection, with the +existing pure `StitchApp` as the selected TextApplication conformance probe. +No field claims a browser capability grant, and no custom `system-model` JSON +or fabricated product release is introduced. The probe's kernel/artifact +acceptance, when actually obtained, covers that selected pure core and its +stated source obligations, **not the complete live browser implementation**. + +## Exact local assets, dependencies and unresolved provenance + +`product/contracts.json` is an application-owned contract register, not an +SDK input schema, Holo, signed attestation, build receipt or certificate. +`scripts/check-product.mjs` reads closed literal rows from the model and binds +all formal source, local vocabulary/configuration, SDK and npm locks, and the +exact byte length/SHA-256 of every declared local product asset. It checks +cross-reference closure and refuses omitted browser assets. It does not compile +LexLean or prove the runtime implements a contract. + +The inventory records existing v86 JavaScript/Wasm, SeaBIOS, VGA BIOS and Linux +image bytes. [The provenance review](vendor-provenance.md) establishes official +v86 distribution identity, actual JavaScript reconstruction and complete +applicable notices, plus the BIOS origin and corresponding source/configuration. +The four resolved assets require their accompanying `vendor/v86` or +`vendor/seabios` materials in distributions. `vendor/distribution.json` binds the +reviewed asset and companion bytes; the existing product-register check refuses +changed assets or missing/substituted required materials. +The adopted Linux 6.18.7 guest has a verified immutable source-distribution tree, +linked by `vendor/guest/SOURCE-NOTICE.md`. `vendorDistributionMaterialsRecorded` +states the model register now records accompanying materials for every asset; +it is not a legal conclusion, remote-availability proof or native SDK acceptance. +Independent byte-identical compiler reconstruction is useful evidence, not a +new licensing condition for every asset. +An asset digest proves identity of the inventoried local bytes, not ownership, +license, security or that a remote static host served those bytes. The current +browser does not verify every dependency against this inventory at load time. +A production redistribution release needs the original source/license notices +and provenance review for each vendor artifact. + +External dependencies are API/host trust boundaries rather than fictional +immutable hashes: browser APIs, Cloudflare DoH/API, Google/Cloudflare STUN, +public ntfy signaling and optional cache, and the selected static origin. +Cloudflare tokens are secret references only; no token value belongs in the +model, inventory, evidence or repository. A provider's current availability, +API policy, DNS propagation or peer retention needs independent observation. + +## Deployment and lifecycle contracts + +The browser deployment is an ordinary same-origin static product, with the +complete local asset set and explicitly enabled network functions. A valid +static publication is not a successful browser readiness test. Probe-only +publication cannot replace the multi-panel Stitch UI. Rollback retains an +entire prior asset set. Reloading loses RAM, session-local budget state and +unpersisted trusted anchors. Explicitly saved origin-local signing keys and +publication journals survive an ordinary reload when browser storage remains +available; that is not an eviction-proof backup or persistent object-custody +guarantee. Unknown provider outcomes remain unresolved until reconciled. + +VM memory sizes and request ceilings already in the implementation are host +configuration, not derived kernel guarantees. VM boot/shell/Ethernet operations +are outside deterministic ring-job semantics and its compute-work accounting. +DNS provider acknowledgement is not resolver-wide freshness. A timeout is a +local observation, not peer death. Different peer identifiers are not evidence +of independent failure domains. Public signaling/relay topics are not access +controls, and sufficient relayed fragments reveal the object. + +## Reproduce and evaluate + +After an intentional model, runtime or configuration edit: + +```sh +node scripts/check-product.mjs --write +node scripts/check-product.mjs --check +node --test tests/product-model.test.js +``` + +Review register diffs alongside the source changes. The checks cover stale +source/asset hashes, unknown capability owners and assumptions, missing assets, +unknown deployment capabilities, dangling architecture flows, noncanonical +indexes, relay opt-in removal, unsupported browser routing claims, literal +substitution and changed vendor bytes. Mutation tests do not establish network, +VM, browser or cryptographic correctness. + +The sorted LexLean entrypoints include the original Product modules and all nine +generated facets in the same source graph as the domain and probe. +Run canonical formatting, source locking, LexLean check, Lean/leanchecker with +actual exact observed axiom policies, and the pinned PrismPM gate. Report each +stage separately. Neither the generated register nor `lexlean check` is a Lean +proof result; real kernel acceptance is distinct from full Prism artifact and +oracle acceptance. No external hosted verifier upload is required or authorized +by this documentation. diff --git a/docs/reader-experience.md b/docs/reader-experience.md new file mode 100644 index 0000000..9920f40 --- /dev/null +++ b/docs/reader-experience.md @@ -0,0 +1,31 @@ +# Reader experience and local protocol explorer + +The published `index.html` keeps the live Stitch implementation and all six model-derived operator journeys. A reader-facing surface introduces the object/recovery problem before advanced operations: + +1. A resolution-independent SVG traces an object through three XOR fragments and reconstruction with one unavailable route. +2. A local interactive example uses the actual `createObject` and `recoverObject` implementations. It accepts up to 256 UTF-8 bytes, supports all fragment pairs, absent fragments and deliberate single-byte mutation, and exposes the complete object commitment. +3. A five-layer map separates commitments, scheduling, custody, pure computation and transport. +4. A generated facet inventory links to source, shows declaration counts and explicitly identifies inventory rather than proof evidence. +5. The existing live operator console retains every control ID, model-derived guard, network opt-in and evidence label. + +The explorer never calls transport or writes live objects. Its sample and state exist only in page memory. It sends no input text, does not save data or keys, and does not renew or consume the live network resource ledger. The existing console's external diagnostics are separate from this local example. + +## Evidence and failure semantics + +A successful local reconstruction is a real cryptographic check of supplied bytes. It is not remote custody, independent peer identity, availability or durable retention evidence. Fewer than two fragments yields no accepted output. A changed supplied fragment is rejected even if two other supplied fragments are valid, matching the runtime's verify-every-input behavior. Withhold the altered fragment to test recovery from the two remaining intact fragments. + +The object input ceiling is measured in UTF-8 bytes, not JavaScript character count. An invalid new input hides the previous result. Generation checks reject stale asynchronous completions. New encoding hides prior controls and results until the exact new input is committed. Empty objects remain valid; their zero-byte fragments cannot be meaningfully byte-mutated, so mutation controls are disabled. + +The explorer runs real commitments for its bounded example. It does not prove browser cryptography. The facet catalog's counts are source inventory and its evidence labels are not a native acceptance certificate. Retained proof evidence applies only to the exact source and tool identities recorded by its producing verifier. + +## Navigation and accessibility + +Reader navigation uses native buttons and nonanimated scroll/focus changes. It never changes the URL fragment because Stitch already uses that fragment as the mesh key. All original operator navigation remains source-owned. The example uses native controls, visible labels, state descriptions in text, polite status updates, sufficient contrast and a reduced-motion fallback. No information is conveyed only by color. The SVG has a descriptive equivalent in text. Layouts adapt to phone screens; dense operator tables scroll within their panels. + +## Checks + +- `node --test tests/site-explorer.test.js`: every fragment pair, empty/odd/Unicode objects, mutation refusal, immutable original bytes, UTF-8 limits, safe source navigation, renderer schema validation, interrupted encodes and stale inspection results. +- `npx playwright test --config tests/browser/playwright.config.mjs site.spec.mjs`: shipped-page interaction, loss/tamper/reset, encoding updates, interruption handling, hash preservation, desktop/mobile overflow and screenshots. +- Existing operator and product suites continue to cover the live console. + +Browser tests block non-local requests. Their results qualify the tested local scenario, not public-provider interoperability or physical peer networks. diff --git a/docs/recovery.md b/docs/recovery.md new file mode 100644 index 0000000..3e07482 --- /dev/null +++ b/docs/recovery.md @@ -0,0 +1,41 @@ +# Operator-controlled recovery evidence + +The object journey's **Export and restore recovery evidence** controls provide a real local backup/restore path. Export copies complete live objects, replay checkpoints and retained signed pointer heads into canonical JSON. Import reconstructs and verifies every object, replays every supplied checkpoint against its exact current execution identity, and verifies supplied pointer signatures. Unknown fields (including keys, grants and journals) are refused. + +Import commits an entire checked candidate to a separate session-only recovery vault. It does not call mesh transport, mount guest files, resume live coordinators, mutate a DNS observer, retry pending writes, or restore authority keys. Download a recovered object or explicitly finish an imported pure ring job locally. The result is volatile until saved externally. Losing all bytes, keys or independently trusted recent anchors cannot be repaired by this feature. + +## Wire and resource contract + +Version 1 has exactly `version`, `objects`, `jobs`, `anchors` fields. Each object contains its complete manifest and two or three `{index, hex}` fragments. Jobs contain the exact program and checkpoint. Anchors are complete signed pointers. Canonical UTF-8 JSON is required; duplicate names, noncanonical spelling, malformed Unicode, unknown schemas and trailing bytes fail closed. + +The default envelope supports up to 32 entries and each object's full live 128 KiB maximum. Hex carries twice the decoded bytes. The wire ceiling is derived as 32 × (2 × 128 KiB + 64 KiB), allowing fragment data and program/manifest overhead. The default replay ceiling is 32,768 abstract work units. The retained `replaySteps` field name measures the source-owned work calculation, including POW and typed-width arithmetic costs, rather than merely counting instructions. This preserves the cost of original version-1 instructions while charging new, more expensive operations explicitly. Operators can lower the wire and replay allowances. Both import preflight and explicit local continuation check work before evaluating a supplied program. These are bounded operation/storage admission limits, not a measurement or guarantee of total browser memory. JSON depth, string and parsed-value counts are separately bounded. The local canonical codec accepts explicit caller bounds while preserving its previous default bounds and exact JCS bytes. + +Preflight checks the aggregate replay work before executing supplied programs. Only incoming jobs are replayed, not all retained history on every import. Canonical serialization of the merged bounded vault is linear in retained wire size. Concurrent imports use a generation comparison at commit; a stale operation fails instead of losing another update. Exact already-retained entries are idempotent. Conflicting object representations, rollback and same-step forks are refused. Strictly later checkpoints of the same exact program replace older replay evidence; an adjacent step must bind the retained predecessor. Newer same-authority signed anchors can update supplied evidence, with adjacent revision linkage checked. Previously accepted trust stays unchanged until the operator independently confirms the exact newer anchor. Missing intermediate links are not claimed verified. No unknown predecessor checkpoint is represented as a checked chain link: checkpoint verification remains independent replay. + +All imported evidence is snapshotted. No retained vault mutation occurs until validation, conflict checks, bounds and generation checks succeed. Failed checks leave existing vault and accepted anchors unchanged. SHA-256 of canonical merged evidence binds the modeled state root; cryptographic verification and exact host-to-model correspondence remain explicit host assumptions. + +## Trust is not transferred by a backup + +A bundle's signed anchor is **untrusted supplied evidence**, even if its self-declared key verifies its signature. The operator must separately supply an independently trusted writer key and exact recent pointer digest, explicitly accept that decision, and satisfy the pointer validity interval at the supplied wall-clock observation. Exact retained-anchor conflicts and revision rollback fail closed. Signature validity or a file timestamp does not establish freshness or a globally latest state. + +Acceptance records that decision in this vault only; existing DNS observers do not change. Export never serializes accepted trust status. Re-importing a previously accepted anchor requires a new independent decision. + +### Explicit live observer restoration + +1. Import the retained evidence file. Its signatures establish internal consistency, not trusted authority or freshness. +2. Independently obtain and enter the exact recent digest and trusted writer key. Accept that exact anchor explicitly. +3. In **Pin, discover and publish pointers**, independently set the live query name and pinned writer key. The recovery panel reports that scope; it never copies an imported key into the live pin. +4. Return to recovery and choose **Restore Accepted Live Head**. The selected supplied anchor must match the separately accepted digest, writer and exact live name. Restoration rechecks the signature, current validity and still-current acceptance after asynchronous crypto, then uses `Stitch.Pointer.restoreAllowed`. +5. Admit only its exact next successor through normal pointer admission. The restored local head is not evidence that any DNS record was published. + +`PointerObserver.restoreFromRecovery` reads accepted provenance through the vault's private-field brand, not a caller-supplied `accepted` flag or bundle snapshot. Restoration and ordinary admission share one serialized compare-and-swap queue. Only an empty observer or the exact same retained digest qualifies. Any different retained head refuses, including a newer accepted anchor, a rollback, a same-revision fork or an otherwise valid direct successor. Advance an existing live head by normal succession instead. Duplicate restoration is idempotent and does not reserve storage twice. A failed validation or local storage reservation leaves the head unchanged and does not poison the queue. + +Changing selected recovery inputs or the live pin, or closing the panel, cancels an in-flight UI restoration before commit. Reopening does not repeat it. There is no DNS, mesh or VM call, journal retry, signing-key restoration, key rotation or automatic takeover. Head and accepted trust remain session-only. Recency and the independently pinned writer are explicit operator assumptions; timestamps, self-signatures and restoration do not prove globally latest state. + +## Verification and boundaries + +`tests/recovery.test.js` covers exact round trips, the live maximum object size, corruption, incomplete fragments, duplicate/unknown fields, recomputed forged checkpoints, foreign execution identity, conflicting snapshots, aggregate limits, stale/untrusted anchors and concurrent imports. `Stitch.Recovery` models atomic accepted bundle-root/capacity/generation transitions and recent-anchor admission. `tests/pointer-recovery.test.js` covers the restore predicate and concrete CAS/trust/expiry races; UI and executed-inline-script tests cover the separate import, accept, restore and strict-successor journey without effects. `Stitch.Pointer` states unaccepted/different-head/expired restoration refusal obligations. Kernel results apply only to the exact source verified by the release workflow, not to browser effects or cryptography. + +The canonical-codec adapter change conservatively changes the execution identity. Checkpoints from earlier execution identities are refused; there is no silent migration or claim that changing a model digest revalidates an old checkpoint. A future migration must explicitly revalidate and generate a new identified pure checkpoint. + +Origin-local saved signing authority and unknown-write journals are separate implemented mechanisms, not recoverable from this bundle. The separate [browser authority controls](browser-authority.md) implement explicit local signer rotation/revocation, trusted-anchor migration, quota inspection, persistence requests and conservative journal export/cleanup. Remaining operational requirements include independent key/recent-head retention and real supported-browser/field qualification. Exporting a local file is not a durability certificate or a cleared whole-product release. diff --git a/docs/relay-framing.md b/docs/relay-framing.md new file mode 100644 index 0000000..c934de3 --- /dev/null +++ b/docs/relay-framing.md @@ -0,0 +1,65 @@ +# Bounded ntfy application framing + +Stitch uses ntfy's HTTP publish, WebSocket text notifications and newline-delimited JSON poll APIs. The provider documents a 4096-byte message limit; a longer publish body may become an attachment. Stitch therefore frames logical messages itself. It never follows attachment URLs, and it rejects old unframed ntfy packets. All peers sharing a topic must use this framing version. BroadcastChannel remains a local logical-message transport. + +The application policy and admission/assembly transitions are defined in `app/src/Stitch/Relay.lex.tex` and consumed through the existing generated model projection by `src/layer5-transport/relay-framing.js`. The projection is not a new compiler or verification receipt. Parsing, SHA-256, clocks, allocation and browser/provider effects remain explicit host facts. Source theorem acceptance requires the project's pinned SDK checks. + +## Wire format + +Each ntfy message is a JSON object with exactly these fields: + +- `v`: `stitch/1`. +- `p`: `signal` or `warm`. The two purposes cannot be concatenated. +- `c`: domain-separated SHA-256 of the JSON-encoded exact channel-key string. The channel and peer identity strings must be valid I-JSON Unicode; malformed local identities are refused before an existing session is closed. JSON-encoded hashing preserves exact code-unit distinctions without normalization. +- `s`: a 128-bit cryptographically random sender-session identifier, lowercase hexadecimal. Reconnect replaces the session. +- `m`: domain-separated SHA-256 of the complete logical message's original UTF-8 bytes. +- `t`: sender creation time, integer milliseconds. It is an untrusted freshness hint, not authority. +- `b`: complete UTF-8 byte length. +- `n`: chunk count. +- `i`: zero-based chunk index. +- `x`: unpadded RFC4648 base64url chunk bytes. Noncanonical padding, alphabet and nonzero pad bits are rejected. + +The existing `sha256Bytes` domain framing is used with domains `relay-channel` and `relay-message`. This framing preserves the enclosed manifest, object, program and checkpoint identities. It does not replace their validation or authenticate the sender. + +A chunk contains 2700 bytes except for the last chunk, which has the exact remaining length. The count must be exactly the ceiling of `b / 2700`. Every serialized provider body, including all framing metadata, is checked against the 4096-byte UTF-8 limit. UTF-8 characters may span binary chunks; strict decoding occurs only after complete reassembly and digest verification. The strict shared JSON parser rejects duplicate names, invalid Unicode, nonfinite values and malformed syntax before an application envelope is admitted. + +## Resource and retention policy + +- The complete logical JSON limit is 512 KiB, matching the existing application message ceiling. The obsolete2048-byte public-object demonstration cap is removed: the full128KiB live-object range fits the512KiB logical envelope ceiling, including worst-case decimal byte-array encoding. JSON entry capacity derives from the byte ceiling rather than an independent limit that rejects a valid maximum-sized fragment. +- At most 256 frames are declared per message. Actual 512 KiB messages require at most 195 frames. +- An assembler admits at most 16 active messages and reserves their full declared lengths before allocating a payload buffer, with a total 2 MiB retained-payload ceiling. Independent pending input work is limited to 256 frames of at most 4096 bytes each. Decoded chunks, bounded parser objects, digest copies and browser/runtime overhead are additional bounded application work, not measurements of total browser memory. +- Completed, rejected and expired identities are kept in at most 256 tombstones. Active entries also reserve a future tombstone slot. Saturation refuses new work instead of evicting unrelated data or weakening duplicate suppression. +- An incomplete assembly has a 30-second local monotonic deadline from its first accepted frame. Receiving duplicates never extends it. One cleanup timer releases expired buffers even with no further traffic. Closing/rejoining cancels live assemblies and fences pending verification. If a host digest still owns its input buffer, that buffer remains charged until the digest settles; cancellation cannot pretend it has been freed. A transport-shared verification pool also counts such buffers from older generations in new-message admission. At most16 pending verification buffers and 2 MiB of their payload bytes can be held, independently of additional bounded digest copies. +- Signaling accepts sender timestamps within a 60-second application lifetime; warm messages use 30 minutes. A timestamp more than 5 seconds in the future is refused. Local retention never exceeds its own receive-time horizon, even if the sender supplies a future timestamp. Clock regression refuses work. +- A warm poll has a 2 MiB provider-body limit, 16 KiB per notification envelope and one in-flight poll per transport. Only complete messages from that snapshot are returned. Incomplete buffers are discarded when the poll finishes. A later poll can retrieve a complete copy. This is an application window, not a promise about ntfy retention. +- Outbound work shares at most 16 pending batches and 2 MiB snapshotted logical bytes across reconnects. Source-derived 30-second abort deadlines cover outbound batches and warm polls. Browser fetch cancellation is best effort; it cannot establish that a publisher-side effect did not occur. + +The existing ResourceAdmission ledger is reused. Before the first external effect, one batch reservation charges the actual serialized frame count and UTF-8 body bytes, including framing overhead, plus any local broadcast destination. Local reassembly separately charges declared storage bytes and conservative validation work. Ingress WebSocket bytes are charged; a poll already reserves its bounded response ceiling. Expiring or completing an assembly releases its resident payload buffer, but does not refund the cumulative resource budget or unknown network effects. + +## Tested host representation relation + +The adapter maintains these relations between concrete browser state and the source projection: + +- Capacity entries equal the active map size; retained bytes equal the sum of active declared `header.b`; tombstones equal the retired-key map size. Cancelled entries with a pending digest remain in the map and retain their charge until settlement. New-message admission additionally includes retained verification entries from other generations sharing the transport pool. +- An active buffer has exactly `header.b` bytes. Its bitmap has exactly `header.n` slots. A seen slot stores the received chunk at `i * chunkBytes` with the exact model-admitted length. Peer identities are limited to 128 code units by the transport adapter. +- Assembly received-frame count equals the bitmap population count; received-byte count equals the sum of exact chunk lengths for those seen indices. Only unseen indices advance either counter. An existing slot is a duplicate, and a conflicting byte is refused and retires that exact assembly. +- Identity agreement includes purpose, exact channel digest, sender session, message digest, creation time, count and declared length. Different sessions never share a buffer. +- Delivery requires complete counters, whole-buffer domain-separated SHA-256 verification, strict UTF-8 and JSON validation, the matching current transport generation, and current payload consent. + +These are adapter representation relations exercised by independent runtime tests. The source does not contain an indexed byte-buffer implementation, a formal SHA-256 or UTF-8 implementation, or a kernel proof that handwritten host operations refine that representation relation. It owns admission, identity correlation, counters, effect fencing and completion gates. Browser allocation, byte placement, parsing, hashing and effects remain named host boundaries. + +## Consent, sessions and outcomes + +`publishWarmEnvelope(value, { publicData: true, consentCurrent })` and `fetchWarmEnvelopes(window, { publicData: true, consentCurrent })` require explicit action-scoped opt-in. The optional live callback and transport-level `publicRelayConsent` callback are checked before every external payload frame and before exposing recovered data. The browser binds the transport callback to its current disclosure checkbox. Withdrawn consent prevents remaining frames but cannot recall frames already posted. Compute also supplies its current relay permission. Private object/job bytes are never published by default. + +`sendSignal` returns a synchronous boolean indicating whether local bounded work was queued. It does not report publication or recipient delivery. Every asynchronous operation captures exact transport generation, channel, sender session and consent, then rechecks them before each effect. Reconnect, Close and replacement callbacks cannot dispatch old-session continuations. + +`relay_publish_result` reports planned, attempted and HTTP-acknowledged frame counts, HTTP status, timeout state and outcome. `acknowledged` means all provider POSTs returned success. `partial`, `refused`, `unknown`, `cancelled`, `timeout`, `unavailable` and `local-only` distinguish incomplete or unavailable publication. A transport generation that is no longer current cannot emit a stale completion into the new session. The warm boolean is true only if all frames were acknowledged and the captured session/consent is still current. Neither result promises durable cache storage or delivery to another peer. + +There is no automatic retry, attachment fallback or background publication. A non-success status, including 429, stops the batch. Earlier acknowledgements and every reservation remain accounted for. ntfy's public quotas and rate limits can make a multi-frame message fail; operators should inspect outcomes, keep public workloads small, and use a suitably provisioned provider for larger workloads. A retained complete copy and subsequent full object/checkpoint validation are still required for recovery. + +## Verification + +`tests/relay-framing.test.js` uses only synthetic fixtures and mocked provider effects. It covers both the original2048-byte all-255 object and a maximum128KiB all-255 object through the real cold database recovery path, large SDP through the actual WebSocket receive path, a full 512 KiB message, UTF-8 splits, reordered/duplicate/conflicting/corrupt/mixed/expired/incomplete messages, malformed JSON and base64url, resource saturation, consent withdrawal, reconnect during digest work, stalled verification across expiry/disposal with shared admission, exact batch charges, 429 and partial outcomes. No real ntfy requests or user payloads are used. + +Provider reference: https://docs.ntfy.sh/publish/ (Limitations and caching), https://docs.ntfy.sh/subscribe/api/ (JSON/WebSocket subscriptions). These are provider contracts, not substitutes for the referenced IETF protocol standards. diff --git a/docs/standards-and-operations.md b/docs/standards-and-operations.md new file mode 100644 index 0000000..50a9ce9 --- /dev/null +++ b/docs/standards-and-operations.md @@ -0,0 +1,32 @@ +# Standards and operational completion + +Stitch's model must describe the delivered product, not merely its pure probe or a collection of claims. Referenced standards are implemented for the actual selected role, including applicable error, lifecycle and interoperability requirements. A runtime test, a source theorem and an external-provider observation answer different questions. + +## Standards roles + +| Reference | Stitch's role and evidence boundary | +|---|---| +| RFC8831 / RFC8825 | Browser WebRTC application. The browser supplies ICE, DTLS and SCTP; Stitch owns signaling, channel lifecycle, message framing, flow control and qualified connection evidence. No independent peer identity or NAT success is inferred from a channel event. | +| RFC8656 | TURN is an optional browser/provider dependency, not a Stitch TURN server. The frozen direct-connect experiment disallows TURN success; that experiment does not block ordinary connectivity. | +| RFC8484 | Real application/dns-message stub client, with HTTP/DNS response/error handling and bounded DNS decoding. See dns-client.md. Authoritative/recursive server and local DNSSEC-validation roles are not claimed. | +| RFC8032 | Ed25519 is delegated to WebCrypto, while Stitch owns signed bytes, exact field validation and trusted-authority/revision admission. No Ed448 or unused signature variant is claimed. | +| RFC8785 | JCS encoding and strict I-JSON input validation. See canonical-json.md. Application integer schema constraints are distinct from the complete binary64 codec. | +| RFC9162 | The original concept cited an optional Merkle-pattern inspiration. Stitch does not claim to operate a Certificate Transparency v2 log merely because that reference exists. | +| ntfy and Cloudflare API v4 | Provider protocols with explicit quotas, disclosure and outcome uncertainty. They are not interchangeable with an IETF standard or a permanent retention guarantee. | +| Prism/LexLean and the SDK standard lock | Exact selected compiler/profile/oracle obligations remain required. The 44 locked authorities and 18 SDK oracle entries are available toolchain metadata, not 44 application compliance certificates or a request to add unrelated Kubernetes/OIDC features. | + +Primary sources: [RFC8831](https://www.rfc-editor.org/rfc/rfc8831.html), [RFC8825](https://www.rfc-editor.org/rfc/rfc8825.html), [RFC8656](https://www.rfc-editor.org/rfc/rfc8656.html), [RFC8484](https://www.rfc-editor.org/rfc/rfc8484.html), [RFC8032](https://www.rfc-editor.org/rfc/rfc8032.html), [RFC8785](https://www.rfc-editor.org/rfc/rfc8785.html), [RFC9162](https://www.rfc-editor.org/rfc/rfc9162.html), [ntfy publishing](https://docs.ntfy.sh/publish/), [Cloudflare DNS API](https://developers.cloudflare.com/api/resources/dns/subresources/records/). + +## Operational work still required + +These are actual unfinished implementation/qualification items, not ceremonial gates or a declaration that the product is complete: + +1. **Retain and restore the right information.** Validated object/job evidence export/import and explicit recent-anchor recovery are now implemented in the recovery journey. Explicit origin-local nonextractable signing-key setup/restoration and transactionally claimed unknown-write journals are now implemented. Actual Chromium persistence/reload, nonextractable signing, multi-tab exclusion and unknown-write retention passed [the hosted browser suite](https://github.com/afflom/stitch/actions/runs/42909486101/job/130156053948). Other browser/eviction behavior is not inferred from that result; there is no private-key backup or cross-device recovery. A zero-disk peer remains possible, but recoverability cannot survive loss of every required byte, key and anchor. Browser storage needs quota/eviction/backup handling rather than a durability promise. +2. **Complete channel interoperability.** Negotiated DataChannel sizing, versioned fragmentation, bounded queues and backpressure are implemented. Ed25519 key-bound session signaling, replay rejection and arrival-ordered RTC admission are implemented; actual Chromium fragmented payload, custody, exact-byte recovery after writer RAM loss and reconnect passed the linked suite. Other browser and physical-network qualification remains outside that evidence. Neither the DataChannel adapter nor ntfy framing certifies all SCTP/browser behavior. +3. **Qualify guest administration.** Explicit object/Ethernet grants, stop/destroy quarantine, instance-bound command handles, unknown-outcome reconciliation and resolved-evidence disposal are implemented. Actual bundled-guest boot, bidirectional 9p readiness, shell result capture, command reconciliation and stop/destroy passed in Chromium. Replacement guests require their own qualification. The browser cannot establish VM isolation from a Boolean model observation. +4. **Resolve distribution provenance.** The original guest image still lacks full kernel/Buildroot/package source materials. The four v86/BIOS assets have resolved origins and accompanying notice/source packages; preserve those materials in distributions. The [pinned replacement build](https://github.com/afflom/stitch/actions/runs/42906244489) is producing candidate evidence; a completed and qualified replacement is not yet claimed. Do not substitute a successful boot for source/license evidence. +5. **Qualify the integrated product.** The exact source proof, runtime/independent vectors, native Prism artifact gate, browser journeys and relevant provider/VM trials must name the revision they tested. Do not rerun identical work redundantly or convert simulations into physical measurements. + +See [recovery](recovery.md), [channel flow](channel-flow.md) and [VM administration](vm-administration.md) for implemented operational contracts and their limits. + +Changes so far correct reproduced defects: DNS response association, C1 false success, truncated guest identity, excessive provider message size and partial canonical JSON. Their tests belong with the implementing code. This document does not defer the remaining product requirements; it keeps them visible until implemented and demonstrated. diff --git a/docs/uor-primitives.md b/docs/uor-primitives.md new file mode 100644 index 0000000..539efe6 --- /dev/null +++ b/docs/uor-primitives.md @@ -0,0 +1,125 @@ +# UOR primitive operations and typed replay + +## Semantic source + +The audit uses UOR-Framework workspace version 0.5.2 at immutable commit +[`51c01382200b0179d6640b07e9c8119364ab69a1`](https://github.com/UOR-Foundation/UOR-Framework/tree/51c01382200b0179d6640b07e9c8119364ab69a1). +The existing Rust dependency remains `uor-foundation = "0.5.2"`; Cargo.lock pins +registry archive checksum `0179d3c29eb68e52ed03f9b48136159d4d4d26bd6b8008da3a9864b43ed0492f`. +The audited Git source and the registry archive are distinct provenance records; +this audit does not assert their byte identity or claim to have run Cargo. + +Specific references under that commit: + +- `foundation/src/enums.rs`: PrimitiveOp discriminants 0 through 17. +- `foundation/src/pipeline.rs:5115–5150`: CONCAT appends the complete big-endian + left term bytes followed by right term bytes. It is not ring multiplication, + OR, a sentinel zero, or truncation modulo the original width. Its evaluator's + INLINE_BYTES parameter controls capacity; the framework has no universal + 128-bit/4096-byte CONCAT limit. ADR-028 validates output capacity before use. +- `foundation/tests/behavior_catamorphism_evaluator.rs:536`: `abcd` concatenated + with `1234` is the four-byte term `abcd1234`. +- `foundation/src/enforcement.rs:5364`: `const_pow_w128` uses square-and-multiply + with the entire 128-bit exponent and wrapping multiplication, including 0^0=1. +- `foundation/src/pipeline.rs:5202–5226,5397`: binary arithmetic uses the maximum + operand byte width, at least one byte. POW operates modulo 2^(8·width), including + the byte-level wide path. Comparisons return one byte. DIV/MOD by zero are + rejected in the term pipeline, whereas the constant ring evaluators return 0. + +The pipeline's unary path currently converts to u64 and clamps output to eight +bytes (`pipeline.rs:5068–5099`). Stitch deliberately retains the genuine full-width +ring unary operations modeled by `const_ring_eval_w128`, rather than silently +copying that truncation into existing jobs. Therefore this is an explicit ring/ +byte-sequence execution profile, not a claim that Stitch implements every detail +of UOR's general term-tree evaluator. Stream, borrowed-carrier, resolver, and +arbitrary term-tree evaluation are outside this pure instruction interface. + +## Existing version 1 programs + +Version 1 program and checkpoint field sets remain unchanged. Program widths +remain 8/16/32/64/128. Existing operation results, including DIV/MOD by zero=0 and +ring-width comparison results, retain their meaning. POW 17 is now supported at +every width. It normalizes both operands in that ring and never narrows an +exponent to Number/u64. CONCAT 14 is still refused in this scalar-only version. + +The legacy `applyPrimitiveOp` adapter also supports POW. Its CONCAT result is a +wider Datum with the sum of operand widths, or a RangeError if that result exceeds +Datum's existing 128-bit implementation envelope. Datum coordinate `toBytes()` +stays little-endian. CONCAT follows the term's big-endian sequence ordering, so +its numeric value is `left · 2^right.bits + right`. These are different encodings. + +## Version 2 width-tracked programs + +A version 2 program has exactly these fields: + +- `version`: 2. +- `bits`: initial byte width in bits, including 0 for the empty sequence. +- `capacityBits`: explicitly declared maximum intermediate/result byte width. +- `initialValueHex`: canonical unsigned lowercase hex numeric value. +- `instructions`: unary `{op}` or binary `{op,argBits,argHex}` records. + +Every width is a multiple of8, including non-power-of-two widths 24,40,72,etc. +`0x0` with width 0 represents the empty sequence. Width is never inferred from +numeric magnitude, so leading zero bytes survive CONCAT and checkpoints. + +CONCAT sums widths and appends without truncation. Arithmetic chooses the maximum +operand width, at least 8 bits, then normalizes in that ring. Comparisons return an +8-bit 0/1 word. Unary operations retain the full input width, at least 8 bits, per +the ring profile above. DIV/MOD zero operands are rejected before execution. + +The source-owned `Word`, `TypedInstruction`, `typedInstructionAllowed`, `typedStep`, +`typedExecute`, and work functions define these rules. Runtime validation uses +the same source predicates and result-width function for every instruction. +`typedResumeEqualsUninterrupted` proves continuation for arbitrary finite typed +instruction lists. The source also proves exact CONCAT value/width identities, +capacity refusal, result-width admission, the zero-exponent unit/cost laws, and a kernel-evaluated 128-bit POW vector with exponent bit 100 set. +These proofs do not establish cryptographic hashing or the complete host adapter. + +Version 2 checkpoint bodies add `stateBits` and use `version:2`. The program hash +binds capacity, initial width, all operand widths and values. Checkpoint hashing +binds state width. Verification replays both width and value, rejecting even a +self-consistently rehashed forged width. Checkpoint predecessor checks remain +strict. Both versions bind `modelExecutionDigest`, including source semantics, +interpreter and transitive replay adapter bytes. Old execution roots are refused; +no old checkpoint is silently relabeled as executing new semantics. + +## Resource contract + +The pure source model is capacity-parametric. The JavaScript host exposes a +separate local policy: at most 1024 instructions, 32768 bits (4096 bytes) per term, +and 1,000,000 abstract work units per program. The 32768-bit limit is a tested +parsing/memory envelope, not an upstream semantic limit or a promise of unbounded +stream handling. Program-wide width and work validation completes before any +replay step. A supplied admission ledger reserves the exact replay range's work +before evaluation; verification and suffix execution each pay for their actual +replay range. + +`computeSteps` is the historical budget field name. It now measures explicit +abstract interpreter work, not just instruction count or wall-clock CPU: + +- Version 1 existing instructions cost 1. POW costs 1 plus one modular square per + exponent bit and one modular multiply per set bit. +- Version 2 CONCAT costs 1 plus output byte count. Bitwise operations cost 1 plus + arithmetic bit width. ADD/SUB/unary/comparisons cost 1 plus 64-bit limb count. +- Version 2 MUL/DIV/MOD cost 1 plus squared limb count. POW costs 1 plus squared + limb count times its exact square/multiply count. The ceiling conservatively + prices wide arithmetic; it is not a benchmark of a JavaScript engine. + +No exponentiation forms the unbounded integer `base ** exponent`. The source +square-and-multiply helpers reduce after every multiply. Source tail calls are +trampolined in the subset interpreter; modulus construction and bitwise helpers +also avoid width-dependent JavaScript call-stack growth. Tests exercise the full +local capacity and refuse a maximum-width hostile exponent on static work cost. +Host validation, hashing, allocations, VM/browser/network overhead and physical +energy remain distinct from these abstract compute units. + +## Verification + +`tests/primitive-operations.test.js` covers pinned upstream examples, independent +left-to-right modular exponentiation across all version 1 widths, exponent bits +above 64, every 8-bit CONCAT output width through 128, empty terms, mixed operands, +comparison widths, checkpoints/resume, recomputed width forgeries, budget refusal, +and maximum-capacity CONCAT/bitwise/power recursion. The existing source/adapter +mutation and execution-identity suites are updated to cover the new reachable +semantics. The SDK's exact Lean/axiom gate remains mandatory; no SDK pin or native +acceptance vector is changed by this implementation. diff --git a/docs/vendor-provenance.md b/docs/vendor-provenance.md new file mode 100644 index 0000000..facb8d1 --- /dev/null +++ b/docs/vendor-provenance.md @@ -0,0 +1,110 @@ +# Vendored VM asset provenance and distribution materials + +Current assessment: 2026-11-10. This replaces the earlier incomplete-origin +review. It distinguishes actual distribution obligations from optional +independent build reproduction. It is an engineering evidence assessment, +not a legal warranty or a whole-runtime correctness claim. + +## Current disposition + +| Asset | Recommendation for repository distribution | Required accompanying material | +| --- | --- | --- | +| `v86/libv86.js` | Clear the former missing-origin/notices blocker | `vendor/v86/` notice package | +| `v86/v86.wasm` | Clear the former missing-origin/notices blocker | `vendor/v86/` notice package | +| `v86/seabios.bin` | Clear the former missing-source/notices blocker | Complete `vendor/seabios/` source, config, build instructions and notices | +| `v86/vgabios.bin` | Clear the former missing-source/notices blocker | Complete `vendor/seabios/` source, config, build instructions and notices | +| `images/buildroot-bzimage.bin` | Replaced with qualified source-complete Linux 6.18.7 image | `vendor/guest/SOURCE-NOTICE.md` and its immutable complete source package | + +These recommendations assume the accompanying directories are actually +included with the repository/download/static deployment that conveys the +assets. Do not strip them out of a release package. This is the concrete +packaging condition to verify, not a requirement to reconstruct every compiler +or make every historical binary reproducible. The product register should +reflect the integrated package after review; no runtime replacement is needed +to clear the four resolved material-packaging gaps. + +## Exact asset identities + +The original five files were introduced by upstream Stitch commit +[`da38ff68f09a78f38ea8600b76ae6df36d46dd57`](https://github.com/Syntra-Labs/stitch/commit/da38ff68f09a78f38ea8600b76ae6df36d46dd57). +The four v86/BIOS files remain unchanged. The guest is now the exact qualified replacement below. + +| Path | Bytes | SHA-256 | +| --- | ---: | --- | +| `v86/libv86.js` | 353762 | `b80fba71dacb7977e5b46800b3ba194bba7fe13e52fa3d22f80cc060ff015a4e` | +| `v86/v86.wasm` | 1418156 | `abd512988f39f5c81d4930f564bafa1a6e1e0d5210de9b20e2bdec13fbc318d9` | +| `v86/seabios.bin` | 131072 | `73e3f359102e3a9982c35fce98eb7cd08f18303ac7f1ba6ebfbe6cdc1c244d98` | +| `v86/vgabios.bin` | 36352 | `a4bc0d80cc3ca028c73dafa8fee396b8d054ce87ebd8abfbd31b06b437607880` | +| `images/buildroot-bzimage.bin` | 8053248 | `313a6b545290a2b47856b49bfcc4c7577469749b315932ae008d39fe70fc7f07` | + +## v86 JavaScript and WebAssembly + +Both files exactly match the official downloads retrieved 2026-11-10: + +- https://copy.sh/v86/build/libv86.js +- https://copy.sh/v86/build/v86.wasm + +The official https://copy.sh/v86/ homepage identifies deployed revision +`1e4f43c95` (Jul 3, 2026 23:07), resolved by GitHub to +[`1e4f43c954701db9699fa976b27cc675f9971265`](https://github.com/copy/v86/commit/1e4f43c954701db9699fa976b27cc675f9971265). +An actual JavaScript build from that pinned source using upstream Closure +v20210601 reproduces the shipped JS byte for byte. `vendor/v86/` supplies the +tracked source archive, checksum-checked offline reconstruction recipe and +applicable distribution notices: + +- v86 BSD-2-Clause copyright, conditions and disclaimer; +- QEMU-derived floppy implementation MIT copyright and terms; +- incorporated SoftFloat copyright, BSD conditions and disclaimer; +- Zstandard 1.4.5 BSD license and incorporated Zstd/xxHash notices; +- preserved per-file notices in the complete source archive. + +These permissive binary-distribution notice obligations do **not** require an +independent bit-identical Wasm reconstruction. The Wasm's exact official byte +origin is established; its source reconstruction has not been independently +performed because Rust/clang are absent on this worker. Record that limitation +honestly, but do not turn it into a release blocker. Similarly, shipping source +is useful here but is not a new BSD/MIT source-disclosure obligation. + +The validated runtime remains untouched. VM administration relies on internal +fs9p APIs in this revision. Any future upgrade/replacement needs compatibility +tests, not a speculative switch to an unrelated npm version. + +## SeaBIOS and its VGA BIOS + +Both bundled files exactly match the upstream Git blobs in +[`copy/v86` bios directory](https://github.com/copy/v86/tree/315b2b0b758703ef0e6cc7b4088d6068f83f3c20/bios): + +- `bios/seabios.bin`: `8c9ab8ffea3b4e4d5fbbbe63a43ceaf2dcb501c7`. +- `bios/vgabios.bin`: `bd393e2b5edb10c04a822fb9e7c02b7cb4ffa6f5`. + +The upstream build recipe explicitly selects `rel-1.16.2`; the BIOS identifies +`rel-1.16.2-0-gea1b7a0`. The official release tag resolves to SeaBIOS commit +[`ea1b7a0733906b8425d948ae94fba63c32b1d425`](https://github.com/coreboot/seabios/tree/ea1b7a0733906b8425d948ae94fba63c32b1d425). +The complete unchanged source archive, original per-file notices, LGPLv3 and +incorporated GPLv3 texts, v86 configuration, original build script and usable +build instructions are supplied in `vendor/seabios/`. + +This supplies a concrete corresponding-source route with the object-code +distribution. Include those materials alongside both ROM files, accessible +without an additional charge or access restriction. Do not relabel them under +v86's BSD license or this repository's MIT license. Retain the ability to use +modified ROMs; this patch imposes no signature or replacement restriction. + +The candidate build script successfully builds both ROMs. Two clean-directory +runs on the same toolchain produce matching candidate hashes, but those hashes +differ from the historical bundled ROMs. That difference alone does **not** +make the supplied original source/configuration inadequate and is not a +license obligation to reproduce an old compiler. It is recorded as a build +reproduction limitation. No candidate adoption is required to resolve this +source/notice packaging gap. If a replacement is chosen later, validate its +actual VM behavior before changing the shipped hashes. + +## Source-complete replacement guest + +The original Linux 5.6.15 image (`7befbaea31e249d9a518c4b95fa42b2a193d0e3de46250d617cbdeb866ee28b0`) matched i.copy.sh, but its complete original build inputs were not recovered. It is no longer the shipped image; this does not retroactively resolve historical distributions. + +The replacement is the existing Linux 6.18.7 image built by [run 42906244489](https://github.com/afflom/stitch/actions/runs/42906244489), from exact Buildroot commit `7fdeadb3b9f12f78e5fccca914d7fef47090ab9a` and Stitch build commit `d17aa7f3ffc6944b799ac43f6a5bab04ab3b82ef`. No image/toolchain rebuild was performed for adoption. + +The [durable corresponding-source tree](https://github.com/afflom/stitch/tree/fd59fae669e9a40271fb584ca071270d8ed0b8f8) supplies all reviewed source/license materials, patches, build scripts, resolved configs and image. Its reassembler validates each part and the 398,457,213-byte final archive SHA-256 `fbc04b0c55f8421ca9bcf9e9dbac1952c07a1a2d82fd644ac67e66415b0106bc`. Retain [the source notice](../vendor/guest/SOURCE-NOTICE.md) and equivalent source access with the image. The existing distribution checker binds the image, notice and exact parts manifest; it does not claim to check remote availability on every CI run. + +Actual hosted production UI/lifecycle and two-peer Ethernet qualification passed on this exact image with the required host arguments; see [the qualification record](guest-browser-qualification.md). The runtime now uses `console=tty0 console=ttyS0,115200 rdinit=/init nomodeset`. Source availability, those observed scenarios, and native Prism SDK acceptance are distinct. The latter remains pending; no product release or whole-runtime certification is claimed. diff --git a/docs/vm-administration.md b/docs/vm-administration.md new file mode 100644 index 0000000..b4edd5d --- /dev/null +++ b/docs/vm-administration.md @@ -0,0 +1,194 @@ +# VM administration and command observations + +The VM journey keeps shell execution, object mirroring and mesh Ethernet available, +with separate explicit object-sharing and Ethernet grants. Both default off. +Object sharing applies to subsequent database mirror attempts, not retroactive +export of the database. Revocation fences later mirror continuations, including +revoke/regrant races. It cannot remove a guest copy already delivered. Canonical +and optional alias filenames retain full SHA-256 roots, and input bytes are +snapshotted before the asynchronous host write. Mirroring is bounded to 16 MiB +per object. Ethernet accepts only integer-byte frames of 14–1518 bytes and requires +an open transport, current ready VM and grant. This operating limit excludes jumbo +frames. An open transport is not evidence that a remote peer is available or trusted. + +Stop and destroy invalidate callbacks and revoke grants before invoking the +emulator. They serialize repeated clicks. Stop retains the stopped instance; +destroy is required before fresh boot. A failed operation retains the instance +and blocks boot and host bridges until explicit successful destroy. Host errors +mean the operation's outcome is unknown, not proof that the emulator stopped. +No control reverses commands or data already sent. Boot-failure cleanup follows the same quarantine rule: asynchronous destroy must +settle successfully before retry, and rejection retains the handle for explicit +destroy retry. Missing assets without an emulator instance remain directly retryable. + +## Readiness and keyboard dispatch + +A visible guest prompt only starts initialization; it does not grant Ready. The +host creates a fresh generation-scoped nonce challenge in 9p, then serializes one +initializer through the shipped keyboard adapter. That initializer checks or +mounts `host9p` at `/mnt`, reads the challenge, configures `eth0`, and writes the +nonce back to a separate response file. Ready requires completed synthetic typing +and an exact bounded host read of that fresh response from the same current VM. +Missing or mismatched responses remain booting until the existing readiness +failure deadline. Repeated polling never types another initializer concurrently. + +This is a guest-controlled operational observation of a working shell/9p path, +not an isolation, honest-guest, correctness or exactly-once execution certificate. +The initializer and later command dispatches share a serialized typing queue. +The bundled `keyboard_send_text` Promise must resolve after its final synthetic +keystroke; adapters without that completion contract fail closed. Stop, destroy +and replacement fence all late initialization continuations. Both initializer +and command keystroke strings end with an actual newline, not literal `\\n`. + +## Runtime and filesystem controls + +Boot uses `autostart: false`. The current bundled v86 filesystem must expose the +reviewed local-9p adapter surface before `run()` is called. Missing methods or a +mounted backing filesystem refuse startup; no unbounded compatibility fallback +is used. The adapter is tied to copy/v86 source commit +`1e4f43c954701db9699fa976b27cc675f9971265`, especially `lib/filesystem.js` and +`src/browser/starter.js`. A future asset replacement must requalify this boundary. + +The operator chooses a 1–300 second **whole-VM elapsed runtime allowance** before +boot. The default is 300 seconds, starting when the emulator is loaded and starts +running, including guest boot. It remains active after a short command observation +timeout or a completed command, so background processes and console work do not +escape it. Expiry requests a stop of the entire emulator and revokes host bridges. +A stopped instance must be destroyed before booting again or changing its +allowance. Browser timer scheduling, suspension and emulator cooperation can delay +stopping. This is not an instruction-accurate CPU quota, CPU-share scheduler, +wall-clock execution certificate, or kill guarantee against a broken emulator. + +Configured guest RAM is 64 MiB, with 2 MiB VGA memory. It does not bound all emulator +or browser allocations. Guest-internal filesystems consume configured guest memory +in this diskless image. Host-backed 9p `/mnt` has separate pre-allocation admission: + +- At most 16 MiB in one data-buffer allocation request. +- At most 64 MiB of cumulative admitted data-buffer allocation requests per + instance, including object mirrors, shell scripts/results and directory listings. + v86 growth slack is charged. Shrinking, unlinking, repeated directory reads and + failed admitted operations do not refund the allowance. This conservative budget + is not 64 MiB of usable free disk or a bound on all JS heap/transient overhead. +- At most 4096 cumulative inode allocations and 4096 directory-entry admissions; + admitted names fit 255 UTF-8 bytes. Hard links consume directory-entry allowance. + +The adapter wraps the bundled local allocator entrances (`ChangeSize`, +`CreateBinaryFile`, `CreateTextFile`, `FillDirectory`) before their allocations and +bounds inode/link creation. The filesystem's `total_size` field only affects +reported capacity; it is not relied on for enforcement. A refused allocation +quarantines subsequent guarded filesystem effects and requests whole-VM stop. +These are scoped filesystem controls, not a complete hostile-guest memory sandbox +or certification of every v86 device, lock, protocol table or browser allocation. + +## Command observations and cancellation + +Each shell command has a session-unique random instance prefix, generation and +monotonic sequence. Its retained handle captures the actual emulator object; +reads never switch to a replacement emulator. Only one execute wait runs at a +time, with at most 128 retained handles per node. Explicit disposal of completed +or known-not-dispatched evidence releases retained host output and command capacity. +Pending or unknown handles cannot be forgotten; disposal does not remove guest files. +Commands accept general shell syntax but reject empty input, NUL and input exceeding +16384 UTF-8 bytes. Observation time is bounded to 300000ms. + +Result observation inspects regular-file metadata first and then calls +`fs9p.Read(id, 0, boundedLength)`, never unbounded `read_file`. The completion marker +is limited to 16 bytes; output is limited to 4 MiB per command and 16 MiB retained +across command handles. Metadata rejection happens before a read, and the captured +range cannot grow while that read awaits. Malformed or oversized results request +whole-VM stop, retain unknown completion and never certify command execution. + +A short observation timeout retains unknown outcome and a handle for explicit +reconciliation while the same VM remains available. It does not stop the command; +the independent VM runtime deadline still applies. **Cancel and Stop VM** prevents +shell dispatch when it has not happened. After dispatch it requests a stop of the +whole VM, including unrelated guest/background work, rather than pretending that +shell signals can reliably kill arbitrary root commands or their descendants. +It interrupts a pending host result wait even if that API has stalled. Stop success +records `vm-stopped` separately from command outcome `unknown`: prior effects are +not rolled back. Rejection records `stop-unknown`, retains the quarantined instance +and requires explicit destroy retry. A pending stop remains pending, not success. +The compatibility `cancelCommandObservation` API uses these stronger semantics. + +Reconciliation reads the same instance's completion flag/output and never resubmits +the command. The files are guest-controlled observations, not trustworthy execution +certificates. Browser reload loses command handles. The UI's retained-command +selector permits observation of any available earlier handle, not just the latest; +selection never executes or replays a command. No automatic replay is performed. + +New typed boundary failures are `vm-boundary-unavailable`, `vm-filesystem-limit`, +`vm-output-limit`, `vm-observation-busy`, `vm-runtime-limit-invalid` and +`vm-runtime-active`, `vm-keyboard-instance-unavailable` and +`vm-keyboard-completion-unavailable`. An uncertain stop is a separate termination observation, not +proof of rollback or a resolved command. + +The emulator kernel command line no longer explicitly disables mitigations or +trusts CPU entropy. It selects `console=tty0 console=ttyS0,115200 rdinit=/init nomodeset` +for the qualified Linux 6.18.7 guest: the init wrapper mounts console devices and +nomodeset preserves the emulator text display. These are guest boot arguments, +not host security settings or a modern-mitigation guarantee. Guest/emulator assets +still need maintenance; observed hosted scenarios are recorded in +[guest qualification](guest-browser-qualification.md). + +## Verification boundary + +`Stitch.VmAdministration` supplies source-derived predicates actually called before +object/Ethernet dispatch, command admission, result observation, filesystem +allocation/metadata admission and administration. Host object identity, valid frame +shape, readiness, clock scheduling and emulator success remain external observations. +Finite oracle tests and mock-emulator regression tests cover boundary values, +revocation, malformed Ethernet, closed transport, repeated clicks, timeout, +reconciliation, replacement, cancellation, stalled reads and failed cleanup. + +`tests/vm-v86-boundary.test.js` additionally loads the **shipped v86 JS/WASM and +BIOS/kernel bytes** in Node. It checks real local-9p API compatibility, captured +result bytes, growth-slack charges, oversized-result refusal before `Read`, +pre-allocation refusal, and a successful stop of an actually running emulated CPU. +A second test boots the shipped guest through production `LinuxVmNode`, requires +its bidirectional 9p readiness response, executes a real shell command, captures +its unique marker and `Linux` output, and stops the CPU. This qualifies that +Node-hosted shell/9p round-trip, not browser, hostile-guest isolation, physical-host +or device-memory behavior. Chromium launch in this +execution environment is blocked by its Unix-socket restriction; live graphical +journeys have not been qualified here. + +Focused commands: + +- `node --test tests/vm-administration.test.js tests/vm-lifecycle.test.js tests/vm-v86-boundary.test.js` +- `node --test tests/runtime-admission.test.js tests/operator-ui.test.js` +- `npm test` and `python3 scripts/verify-custody.py` + +The source predicates/limits changed in this resource-control revision. Historical +six-definition compiler attestations do not cover the additions; exact integrated +source verification must be regenerated against the final source. Neither a source +attestation nor these runtime checks certifies all browser or VM effects. + +Gate sensitivity was checked by planting removal of `ChangeSize` admission in the +adapter. `node --test tests/vm-v86-boundary.test.js` failed on actual-v86 growth +accounting (`25` charged bytes versus expected `64`). Restoring the guard made the +same test pass. The mutation was not retained. + +## Static IPv4 operation + +Offline boot, shell and object work need no IP address. Ethernet sharing requires +an explicit operator-selected IPv4 address and prefix length before boot. Peer +display labels never derive or validate addresses. There is no DHCP, automatic +allocation, conflict detection, gateway or DNS configuration. Coordinate unique +addresses and compatible subnets across guests before enabling mesh Ethernet. +For example, 10.42.0.2/24 and 10.42.0.3/24 share a subnet; reusing .2 does not. +These are examples, not reserved or automatically safe addresses. + +Canonical dotted-decimal parsing rejects ambiguous leading zeros and shell input. +The source-owned staticAddressAllowed predicate rejects unspecified/loopback, +multicast/reserved ranges and ordinary subnet network/broadcast addresses. +Prefixes 0–32 are supported. /31 follows point-to-point host semantics (RFC 3021), +not a general multi-peer subnet; /32 has no directly connected remote hosts and +requires guest-managed routes. No arbitrary last-octet restriction is imposed: +10.42.1.0/23 is a host, while 10.42.0.0/23 is the network address. +The exact selected netmask is passed to ifconfig in the readiness initializer. + +Configuration is frozen and retained independently of labels and status events. +Model-owned admission prevents changes while booting, during administration, or +while any emulator handle exists, including stopped or cleanup-uncertain handles. +Destroy must succeed before changing it. The UI shows the retained configuration +separately from lifecycle status. Guest root shell commands can change networking; +the displayed configuration records host boot intent, not continuous attestation. diff --git a/images/buildroot-bzimage.bin b/images/buildroot-bzimage.bin index 5e149f7..c6a9ef4 100644 Binary files a/images/buildroot-bzimage.bin and b/images/buildroot-bzimage.bin differ diff --git a/index.html b/index.html index 6988903..605027e 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,8 @@ - stitch — Live UOR Mesh Database, Distributed Compute & In-Browser Linux VM + Stitch · Recoverable objects. Replayable computation. + + +
+
+ +
+
+

A fabric for changing peers

+

Keep the bytes.
Change the peers.

+

Stitch splits objects into verifiable fragments and replays pure computation from checked checkpoints. Explore what can survive a missing peer, and what evidence recovery actually needs.

+
+

Open source · Browser-native experiment · Local example first

+
+
An object splits into A, B and XOR parity. With B unavailable, A and parity reconstruct the exact object after verification.
Protocol illustration, not live custody or network evidence.
+
+
+

01 / Identity follows the bytes

Full commitments bind the object, encoding and each fragment. A convenient filename never substitutes for identity.

+

02 / Recovery has a threshold

Any two compatible, checked XOR fragments can reconstruct the object. Enough information must still be reachable.

+

03 / Continuation is checked

Pure jobs carry their program and input. Stitch replays a checkpoint before continuing its computation.

+
+ +
+

01 / Learn by changing the inputs

One missing piece.
The same exact object.

Encode your own short message. Withhold a fragment, then change a byte. The same verifier used by Stitch checks the result in this browser.

+
+
+

Initializing the local example…

+ +
+ +
+

Local experiment, real byte checks. These controls do not join a mesh, send your text, change live objects or consume the console's network allowance. Withholding a fragment models unavailable information; it does not disconnect a real peer. The live console below has separate network consent.

+ +
+ +
+

02 / Five layers, explicit boundaries

From bytes to reachable peers.

Each layer has a different job. Keeping those jobs separate makes the guarantees, assumptions and failure states easier to inspect.

+
+
L1

Identity & operations

Commit to exact bytes, interpret ring operations and check signed pointer succession.

Integrity is not availability. A valid signature still needs an independently trusted writer.

+
L2

Scheduling & budgets

Propose refreshes and reserve bounded resources before effects.

An unknown outcome remains charged. The survival heuristic is experimental.

+
L3

Storage & custody

Encode fragments, collect checked receipts and repair selected placements.

Sending is not storing. Recovery depends on enough compatible fragments remaining reachable.

+
L4

Compute & replay

Validate deterministic checkpoints against the identified program and input before resuming.

Partitions may duplicate pure work. Linux VM effects have a separate host contract.

+
L5

Transport & discovery

Use WebRTC for peer transfers, DNS for discovery and an optional public relay.

DNS is not consensus. This browser does not store data inside routers or speak BGP.

+
+
+ +
+

03 / Inspect the product model

Follow the contract to its source.

Browse the product facets, declared relationships and their evidence boundaries. Catalog coverage is an inventory, not a verification result.

+

Loading the source-derived facet inventory…

+

+
+ +
+

04 / Read the evidence carefully

Checked claims. Visible limits.

+
+

What the implementation checks

  • Object and fragment commitments before accepting reconstruction.
  • Program, input and semantic replay before accepting a pure checkpoint.
  • Pinned writer, exact succession and validity intervals for pointers.
  • Resource admission and explicit acknowledgment states before effects are treated as complete.
+

What those checks do not establish

  • Durability after every copy is lost, or independent physical failure domains.
  • Private storage on the public relay. Enough shared fragments reveal the content.
  • Exclusive job ownership, exactly-once effects or globally ordered DNS state.
  • Whole-browser, network or Linux VM correctness from a model proof.
+
+ +

Verification applies to the exact inputs recorded in each report. A source record, local demo or passing browser scenario does not by itself establish native Prism artifact acceptance or a production qualification.

+
+
+
+

05 / Operate the real implementation

Go from explanation to observation.

Start a local object or pure job, or explicitly join a mesh to exchange data. Network signaling and public object relay have separate consent controls. Advanced actions retain their modeled guards, resource limits and evidence labels.

-

Syntra-Labs / stitch — Live Multi-Peer UOR Database, Distributed Compute & In-Browser Linux 5.6 VM

+

Stitch / recoverable objects and replayable pure jobs

Local Node: ... | WebRTC Open Peers: 0 | - Scheduler λ̂: 0.017/s | - P(alive): 1.000 | - H(p): 0.000 bit + Application budget: 0 requests
+
+ +
+ +

+

Available next actions:

+ +
About modeled evidence

+ +
+ +
- +

Join a mesh

+ + - - -
- - -
+
+

+

+
What this evidence means

+
Inspect external network observations +

Scheduler estimates, not availability evidence: Scheduler λ̂: 0.017/s | + P(alive): 1.000 | + H(p): 0.000 bit |

-

External Infrastructure Proof & Independent CLI Verification (Zero Local-Only Simulation)

+

Network evidence and independent verification

Cloudflare Edge PoP: probing 1.1.1.1... | STUN Candidate: waiting
- Run these commands in any external Linux terminal (or another machine) to verify live shards, checkpoints, and DNS pointers outside this browser: - + These commands inspect external records. Inspection alone does not establish integrity, authority, or durability; use the repository verifier for exported object evidence: +
curl -s "https://ntfy.sh/syntra-warm-syntra-uor-bus-01/json?poll=1&since=30m" | tail -n 5
+
+ + + + + +
+

Inspect and renew allowances

+

+

+
What this evidence means

+
+ Application resource policy (operational demo configuration) +

These are configurable operating allowances, not semantic limits. An expired epoch or exhausted allowance refuses further effects. Choose a new epoch to continue; previous charges are retained, including failed or uncertain effects. Existing objects, jobs and pointer heads stay in this tab.

+
+ + + + + + + + + +
+

Transfer allowances include reserved relay/DNS response ceilings. Cache allowances count new allocations in each epoch, not total browser memory. TLS, ICE/STUN, VM work and host overhead are outside this accounting. History is kept in this tab until exported. Renewal does not retry failed effects; use the relevant sync or resume control.

+
+
No prior epochs.
+
+
+
Experimental diagnostics and trial export
+ + +
-
+
-

Live Network UOR Database (2-of-3 XOR Parity + WebRTC + Warm Cache)

- Survives tab closes & 0-peer gaps +

Live Network UOR Database (2-of-3 XOR Parity + WebRTC + Warm Cache)

+ Recovery requires enough reachable fragments; relay storage is optional
+

+

+
What this evidence means

- - + + + + - + +
+
+ + + +
+

After peers join or change, select exact retained bytes and repair. Missing or expired fragments need fresh receipts. Optional replacement keeps the old holder until the new receipt commits, then requests exact release. A timeout never proves deletion.

+

No retained verified object selected.

+

Text is encoded as UTF-8, at most 128 KiB. The label is a convenience alias, not identity. New objects are shared with the guest only when guest object sharing is enabled.

- - - - - - + + + + + + - +
UOR ContentAddress (u128)Label (/mnt)SizeVerifiedSourcePayload PreviewObject commitment (SHA-256)Label (/mnt)SizeVerifiedSourcePayload Preview
No objects yet. Click "Put & Replicate" or "Recover from Warm Cache".
No local object bytes.
+
+ Export and restore recovery evidence +

Keep a separate backup before clearing RAM. Import checks objects and pure jobs in a local recovery vault, without sending packets, mounting files or retrying writes. Closing this tab loses the vault. Signing keys and pending-write journals are not included.

+
+ + + + + + + +
+

Select 1–32 live entries. Use Ctrl/Command to toggle individual choices or Shift for a range. Reopening refreshes available evidence and retains still-available selections. Imported evidence stays in the separate recovery vault and is not added to live objects or jobs.

+

At most 32 entries, each object up to the live 128 KiB limit. Default wire allowance includes hex fragments and job overhead. Limits bound this operation, not total browser memory; replay is pure computation, not VM execution.

+
+ + + + +
+
Review supplied pointer anchors +

Signatures inside a file do not establish trust or freshness. Independently obtain the exact recent pointer digest and writer key. First accept the exact recent anchor here. Then, in “Pin, discover and publish pointers”, independently pin the same query name and writer key. Return here to restore the accepted anchor into that live observer. Import and acceptance alone never change a live head.

+ + + + + +

+

Restore only an empty observer or the exact already-retained head. A different live head is never overwritten, even by a newer accepted anchor. This session-only action enables ordinary next-revision admission, not publication, key rotation or proof of global freshness.

+ +
+

+

No recovery file imported.

+
-
+
-

Live Distributed Compute Engine (Cross-Tab Checkpoint Failover)

- Close tab mid-job; peer tab resumes from last step +

Live Distributed Compute Engine (Cross-Tab Checkpoint Failover)

+ Pure jobs replay before resume; VM effects are outside this contract
+

+

+
What this evidence means

- - - - + + + + - +
+

This demonstration constructs a deterministic W64 ring program. Choose 3–60 steps and a 100–3000 ms delay. Pure replay is separate from guest shell execution.

- - - - - - + + + + + + - +
Job IDProgressOwner NodeCurrent W64 Ring ValueStatusTrace VerifiedJob IDProgressOwner NodeCurrent W64 Ring ValueStatusExecution evidence
No active jobs. Start a job and close this tab mid-run to test peer takeover.
No pure jobs observed. Use the current journey to start or inspect checkpoint recovery.
- -
+ +
-

In-Browser x86 Linux 5.6 VM (v86 + 9p /mnt + Ethernet-over-WebRTC)

+

In-Browser x86 Linux VM (v86 + 9p /mnt + Ethernet-over-WebRTC)

VM Standby
- +

+

+
What this evidence means

+ +
+ Guest limits and stopping + + +

The whole VM stops when its elapsed-time allowance expires, when Cancel is requested after dispatch, or when a filesystem/result limit is exceeded. This includes background commands and console work. Browser scheduling can delay stopping; this is not an instruction-accurate CPU quota. Destroy the instance before changing its allowance.

+

Guest RAM: 64 MiB. Local 9p /mnt: 16 MiB per buffer, 64 MiB cumulative allocation requests, and 4096 inode/link admissions per instance. Removing files does not refund that allowance. Result reads: 4 MiB per command, 16 MiB retained in total. Other guest filesystems consume configured guest memory; these controls are not a complete host-memory or guest-isolation guarantee.

+

No guest resource usage observed.

+
+
+ Optional guest networking: offline +
+ + + + +

Leave blank for offline shell and object work. For Ethernet sharing, choose a different address for every guest on the mesh and compatible subnet prefixes. The example is not an allocation. Display names do not assign addresses. No DHCP, duplicate-address detection, gateway or DNS setup is provided. /31 is for point-to-point links; /32 needs explicit guest routes. Destroy a retained instance before changing configuration.

+

No static address configured.

+

+
+
- - + + + + + +
-
-
Click "Boot Linux 5.6 VM" to start the in-browser x86 kernel (./images/buildroot-bzimage.bin). -All UOR database objects are automatically mounted inside /mnt/ in the VM, and eth0 is bridged over WebRTC.
+

Commands run in the guest, not on this host. Stdout and stderr are captured as bytes and shown as text below, including when storing the object fails. After dispatch, Cancel requests a stop of the whole VM, including other guest work. Public relay consent also applies to stored command output.

+

No guest command submitted.

+ +

Cancelling before dispatch prevents the command. After dispatch, cancellation stops the whole VM and leaves prior effects unknown. A short observation timeout keeps the guest running until cancellation or the runtime limit. Unknown commands are never automatically replayed. Stop and destroy revoke grants; failures retain the instance for destroy retry. These controls do not certify guest isolation.

+

Observed guest command output (text)

+

No guest output observed.

+
No guest output observed.
+

The console below is the emulator display. Shell commands and their captured text above do not require interacting with its canvas. Graphics-only guest applications may have no text equivalent.

+
+
Click "Boot Linux VM" to start the in-browser x86 kernel (./images/buildroot-bzimage.bin). +Object sharing and Ethernet bridging start off. Grants expose data to the guest or mesh peers. Revocation blocks future transfers; it does not erase guest copies or undo effects.
- -
+ +
-

Layer 5: DNS DoH Resolver, Lightweight DuckDNS TXT Writer & Wire Log

- RFC 8484 DoH + Single-GET Dynamic DNS +

Layer 5: DNS DoH Resolver, Lightweight DuckDNS TXT Writer & Wire Log

+

+

+
What this evidence means

- + +
+

The DNS name, writer key and Zone ID select an exact publication scope. Changing any of them selects another scope; it does not resolve earlier unknown writes. After reload, pin the original writer, enter its exact name and zone, then load saved publication before reconciling. Reconciliation also needs a scoped token.

+
Provider publication setup and reconciliation
- - - + + + + + + +
+

Use a token with DNS Edit restricted to this exact zone. It is sent only to the Cloudflare API when you publish or reconcile; it is not saved or exported. Replace it here when expired or revoked. A provider acknowledgement is not DNS propagation.

+
+
+ + + +
+
Signing authority, saved trust and storage care +

Save or restore a nonextractable Ed25519 key on this origin. Origin scripts can use it; only use a trusted deployment. Local rotation or revocation does not change independently trusted keys, DNS records or remote copies.

+ +

Checking saved signing authority…

+

+ +
Independently accepted exact trust anchor +

+

Enter the public key and exact recent pointer digest obtained independently. Save requires this observer's admitted head. Migration uses the complete signed JSON below, and does not change the live pin. Select the new pin and restore separately. Timestamps and signatures alone do not establish trust or global recency.

+ + + + + +
+
Quota, eviction and public journal +

Storage estimates cover this whole origin. Persistence permission is not a backup. Clearing or eviction can lose keys and unknown-write evidence. Export preserves public anchors, exact candidates and provider identities, never signing keys or API tokens. There is no automatic journal import or unknown-write reset.

+ + + + +
+ +

No lifecycle operation requested.

+
+
Session-only keys and unsaved observer heads last only this session. Save an independently accepted recent trust anchor to restore strict succession after reload. Full pointers use multiple TXT strings, not the legacy 255-byte claim.
+

Paste complete signed JSON, at most 4096 UTF-8 bytes. Admission checks this exact name, independently pinned key and retained head. Restoring an anchor in the recovery vault does not change this observer.

+
+ + + +
Initializing live mesh node...
@@ -305,7 +593,7 @@

Layer 1 Benchmark: UOR Hasher Substitution Axis (1,000 × 64B)

- +
HasherWidth (B)CollisionsTime (ms)Ops/secMB/s
HasherWidth (B)CollisionsTime (ms)Ops/secMB/s
@@ -318,7 +606,7 @@

Layer 2 Benchmark: Equal-Budget C3/C4 Test (B=30, 600s, CV=1.15)

- +
PolicyRefreshesUnavailable (s)AvailabilityMean Lag (s)
PolicyRefreshesUnavailable (s)AvailabilityMean Lag (s)
@@ -331,7 +619,7 @@

Layer 3 Benchmark: Storage Durability (100% Cohort Turnover)

- +
StrategyGen-0 LeftRecoveredRetentionAmpRepair Bytes
StrategyGen-0 LeftRecoveredRetentionAmpRepair Bytes
@@ -344,7 +632,7 @@

Layer 4 Benchmark: Compute Engine Under Worker Churn

- +
StrategyDoneLatency (ticks)Total OpsWasted OpsTrace Verified
StrategyDoneLatency (ticks)Total OpsWasted OpsExecution evidence
@@ -352,6 +640,11 @@

Layer 4 Benchmark: Compute Engine Under Worker Churn

+ +
+ + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c09bb42 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,836 @@ +{ + "name": "@syntra-labs/stitch", + "version": "0.2.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@syntra-labs/stitch", + "version": "0.2.0", + "license": "MIT", + "devDependencies": { + "@playwright/test": "1.58.2", + "prism-code": "0.7.2" + } + }, + "node_modules/@gar/promise-retry": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@gar/promise-retry/-/promise-retry-1.0.3.tgz", + "integrity": "sha512-GmzA9ckNokPypTg10pgpeHNQe7ph+iIKKmhKu3Ob9ANkswreCx7R3cKmY781K8QK3AqVL3xVh9A42JvIAbkkSA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/agent": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-5.0.2.tgz", + "integrity": "sha512-EkzGmEsgbQ1rqWkRJe2P0oQHx/ylZozDUNPMXCklLuSFL3GY+QyEfBUjhjCsgGXzh4OGpnHvkboSQgczjP/jJg==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "agent-base": "^9.0.0", + "http-proxy-agent": "^9.0.0", + "https-proxy-agent": "^9.0.0", + "lru-cache": "^11.2.1", + "socks-proxy-agent": "^10.0.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/@npmcli/fs": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-6.0.0.tgz", + "integrity": "sha512-AheOs4swKka/XLtht6xxJDPezlQ7K2IYQ9Y8lST4JLDjnralnWuMM9AE2CdVcgQJ5omrXhsRzM7F7aYmeZBvKQ==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/@npmcli/redact": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-5.0.0.tgz", + "integrity": "sha512-3zcN5Q3yEmeyxXBzqB6fXPQFzYa2ROsGFSr69W0ArXIAGJqxl/aFECOVPD2kbkYPm0U/EHxFKgclK3UA9WQg5A==", + "dev": true, + "license": "ISC", + "optional": true, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/@playwright/test": { + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.2.tgz", + "integrity": "sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.58.2" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@sigstore/bundle": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-5.0.0.tgz", + "integrity": "sha512-wefjygudENbzbQMks1t5u34EP0fFoD0XvaEP7DOUP/sXKvogzEJYFw5E6pegGyp3onGWzVEYKVa3bNZWyTYX+A==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@sigstore/protobuf-specs": "^0.5.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/@sigstore/core": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-4.0.1.tgz", + "integrity": "sha512-9v5hRjujn5NXq8o7XFEUgLyAtdr5Iisb4pzM05u3K61IS5q3hP3luWAndk0RkPPLTUFoTbg7Vb84UQ1ZQeajWQ==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/@sigstore/protobuf-specs": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.5.2.tgz", + "integrity": "sha512-SQqvFMt4V78fdjcDdYX6HbiVSOR4QK3ZgwCa2KOsopAgPIHy1rU5UDUmzLl02r5oyyaYcYHR1hpwDRk/yUe+Mw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@sigstore/sign": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-5.0.0.tgz", + "integrity": "sha512-DSFivqz9/i5AkwZ5fq0YdjaJlc4o1WeS2Zffon0kqtChx0vy4W9NOjkEet9bF2vkzOufX72eVH8kZBIGtcBp1w==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@gar/promise-retry": "^1.0.2", + "@sigstore/bundle": "^5.0.0", + "@sigstore/core": "^4.0.0", + "@sigstore/protobuf-specs": "^0.5.0", + "make-fetch-happen": "^16.0.0", + "proc-log": "^7.0.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/@sigstore/tuf": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-5.0.0.tgz", + "integrity": "sha512-Zyqg9tcHps3uRAlKHLNmsW4ohsUZAjb9G+31r7lg0ICh/JOcadzmJsIRdjKljlRHpaR0K4aJ2kXXIdywdcdMlA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@sigstore/protobuf-specs": "^0.5.0", + "tuf-js": "^6.0.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/@sigstore/verify": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-4.1.2.tgz", + "integrity": "sha512-BfD9eLrz3A/DG58aSgfgZYmIR6V9Yw96QVN/frtu2bEH7ctSTk2TDvHU12un3JsDPBTqTNkqkIkucjxljpOFqQ==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@sigstore/bundle": "^5.0.0", + "@sigstore/core": "^4.0.1", + "@sigstore/protobuf-specs": "^0.5.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/@tufjs/canonical-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", + "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@tufjs/models": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-5.0.2.tgz", + "integrity": "sha512-YzKuFwBcH+m4/YIN0magcH5AjgYVnNFUGhP14vCs+Ckanqz86dDn6K0anjjb730Iu6SSqjzXQCo3FzVqYyT+wg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^10.2.6" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 20" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/cacache": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-21.0.1.tgz", + "integrity": "sha512-pTwz/uj3Jyp6WXdJ6fWhR+7LVxVs6RyroQSn7KJwHsSxXuyGSp0pcMVcwSwTpCFq1X2YG8QBe0W+vN+cr0SwzA==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "@npmcli/fs": "^6.0.0", + "fs-minipass": "^3.0.0", + "glob": "^13.0.0", + "lru-cache": "^11.1.0", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^14.0.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob": { + "version": "13.0.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.7.tgz", + "integrity": "sha512-wfsFgXQ8A3SEI9XGf7Nl3Y9l7ffSrGh7SUCT7vU/2CzYPep9kjxAn1S40F9OPKxAMGCVl7HtNlJhrCJUeUq83g==", + "dev": true, + "license": "BlueOak-1.0.0", + "optional": true, + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.3.0.tgz", + "integrity": "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true + }, + "node_modules/http-proxy-agent": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-9.1.0.tgz", + "integrity": "sha512-2NxoveTT58mjYT4n3RPTEfCZGLMbidoO8XEieXfpSYxu+PQJ1qpx4ypwH6N+uF9twBPIvRRgvkvW5HUTYWENig==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "proxy-agent-negotiate": "1.1.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/https-proxy-agent": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-9.1.0.tgz", + "integrity": "sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "proxy-agent-negotiate": "1.1.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ip-address": { + "version": "10.7.6", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.6.tgz", + "integrity": "sha512-00LYkM6byILa9eQIx6qoaXCM40xTLd56AZ4vyaPW3YTyb49VZYPo5xsiAq4tuQ54GH4R7gVdYScJ1B7B77PuTg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/lru-cache": { + "version": "11.5.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", + "dev": true, + "license": "BlueOak-1.0.0", + "optional": true, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/make-fetch-happen": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-16.0.1.tgz", + "integrity": "sha512-uUv1yxHzaKVVEPfcFeGSNov/Cehjv08ovlY8ImTljgL7Q+SiA0dAYLQ6SYVa2kkKqNj4Y3aZEI7xv2teadie0A==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "@gar/promise-retry": "^1.0.0", + "@npmcli/agent": "^5.0.0", + "@npmcli/redact": "^5.0.0", + "cacache": "^21.0.0", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^6.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^7.0.0", + "ssri": "^14.0.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "optional": true, + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "optional": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-6.0.0.tgz", + "integrity": "sha512-AWI8bKapGmgx/J0E6IGYSKj8TiHebZkmKWSs8raPSw8KXwgEAJ+Bw3+LSdXHR6T/RHKAWCOYk2MiLrYluaUU6w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^2.0.0", + "minizlib": "^3.0.1" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + }, + "optionalDependencies": { + "iconv-lite": "^0.7.2" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.7.tgz", + "integrity": "sha512-TbqTz9cUwWyHS2Dy89P3ocAGUGxKjjLuR9z8w4WUTGAVgEj17/4nhgo2Du56i0Fm3Pm30g4iA8Lcqctc76jCzA==", + "dev": true, + "license": "BlueOak-1.0.0", + "optional": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-2.0.0.tgz", + "integrity": "sha512-zSsHhto5BcUVM2m1LurnXY6M//cGhVaegT71OfOXoprxT6o780GZd792ea6FfrQkuU4usHZIUczAQMRUE2plzA==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/negotiator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.1.0.tgz", + "integrity": "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "content-type": "^2.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/p-map": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.1.1.tgz", + "integrity": "sha512-6Lh3jQPLthYujSrlw6ccWXBGZTkoTCz27Hd92g79LH/kjAbgoEu0t442cCCNbegPSJsA0lwDX8z0bcKtkpA32g==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "optional": true, + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/playwright": { + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", + "integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.58.2" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz", + "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/prism-code": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/prism-code/-/prism-code-0.7.2.tgz", + "integrity": "sha512-2rGX6XqV8zOwExNxoDrOBUbPpOzFsMF1RYxebvKbMKNym7fafh+FWFOfKTyYYn09bH05Q5r/H/Qceb6GbaFItA==", + "dev": true, + "license": "MIT", + "bin": { + "prism-code": "bin/prism-code.mjs", + "prism-doctor": "bin/prism-doctor.mjs", + "prism-provider-kv": "bin/prism-provider-kv.mjs" + }, + "engines": { + "node": ">=22" + }, + "optionalDependencies": { + "@sigstore/bundle": "5.0.0", + "@sigstore/protobuf-specs": "0.5.2", + "@sigstore/sign": "5.0.0", + "@sigstore/tuf": "5.0.0", + "@sigstore/verify": "4.1.2" + } + }, + "node_modules/proc-log": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-7.0.0.tgz", + "integrity": "sha512-FYgfaA69XZ93zaXLoMNQ+ViDXGGBgR8aLh03txzcFhV+9xOXx7+8DLCULrKKpR9+GsH9ZfHm82aSUPpozX0Ztg==", + "dev": true, + "license": "ISC", + "optional": true, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/proxy-agent-negotiate": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-agent-negotiate/-/proxy-agent-negotiate-1.1.0.tgz", + "integrity": "sha512-N8IBcM3UgCVzz2L2Lqv8DVntDnnC8/hiV4nEDUPkqq72TPUgYWjQc+bdZlBPZK9LzPAvOY//gAt0S0DApoOXWQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "kerberos": "^2.0.0" + }, + "peerDependenciesMeta": { + "kerberos": { + "optional": true + } + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/semver": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", + "dev": true, + "license": "ISC", + "optional": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.10", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.10.tgz", + "integrity": "sha512-e0VyvkVTwVYViNovRkZ9aodhxVlyoMn7eJhVUPxZ+eK9P/7CBkxvvsBOHqFPEH416726W8tLXXXjKwqgTErrCQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "ip-address": "^10.1.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-10.1.0.tgz", + "integrity": "sha512-WlMj/67cEJ6MDI1OcsnjuYKDNDoyPCCYZ249kuuXPiMDw9F8PXkVaQ7YWu3siTydfQ/4BEZcvGzu+aYvz7dDCQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/ssri": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-14.0.0.tgz", + "integrity": "sha512-jQxKI0yx0ZnTKrqjKkLDV2DXkBQn3k49JVmVqDGcDwKDtGDbImD/GXsq04KD0VVzCQQ9wZJYal3RwR1GzWTSow==", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/tuf-js": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-6.0.2.tgz", + "integrity": "sha512-k78oXrR/Ssi2kTXgP0paoQ7efyw/fO2RBgxXnTQTfoyZRM72XuT8D0ylG9NkJgdnYtx4LWo+qpGdpI4o7FIiJA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@gar/promise-retry": "^1.0.3", + "@tufjs/models": "5.0.2", + "debug": "^4.4.3" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC", + "optional": true + } + } +} diff --git a/package.json b/package.json index 32df8bb..799195b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,29 @@ { "name": "@syntra-labs/stitch", "version": "0.2.0", - "description": "Stratified routing persistence, UOR content-addressed ephemeral database, and distributed ring compute", + "description": "Model-driven recoverable objects and replayable computation across changing peers", "type": "module", "main": "src/layer1-uor/index.js", "scripts": { - "test": "node tests/run_all.js", - "serve": "python3 -m http.server 8080" + "test": "node scripts/check-model.mjs && node scripts/check-facets.mjs --check && node scripts/check-product.mjs --check && node --test scripts/*-tests.mjs tests/*.test.js && node tests/run_all.js", + "serve": "python3 -m http.server 8080", + "model:write": "node scripts/check-model.mjs --write", + "model:check": "node scripts/check-model.mjs", + "test:independent": "python3 scripts/verify-custody.py", + "product:write": "node scripts/check-facets.mjs --write && node scripts/check-product.mjs --write", + "product:check": "node scripts/check-facets.mjs --check && node scripts/check-product.mjs --check", + "test:browser": "playwright test --config tests/browser/playwright.config.mjs", + "facets:write": "node scripts/check-facets.mjs --write", + "facets:check": "node scripts/check-facets.mjs --check", + "evidence:check": "node scripts/check-source-evidence.mjs" }, "repository": { "type": "git", "url": "https://github.com/Syntra-Labs/stitch.git" }, - "license": "MIT" + "license": "MIT", + "devDependencies": { + "@playwright/test": "1.58.2", + "prism-code": "0.7.2" + } } diff --git a/prismpm.lock b/prismpm.lock new file mode 100644 index 0000000..cfbf306 --- /dev/null +++ b/prismpm.lock @@ -0,0 +1 @@ +{"platforms":[{"inventory":[{"digest":"sha256:1e88b7e9aa26ad5cd17601aad064de5b07c1251128b5def20f79d24438b5f4be","id":"action","kind":"workflow","version":"0.3.0"},{"digest":"sha256:5d63cd6921f790c8637e716b632d7777899f37166eff0a6010cd19d1e9127044","id":"adapter-compose","kind":"adapter","version":"compose-spec@fee041b381ffd4aad263410980bdce0cdf4beb7d"},{"digest":"sha256:db0425b35e875a36af50fb3a73e491af9badc759b6c290a731d6fd23fd62c119","id":"adapter-github-pages","kind":"adapter","version":"github-pages-artifact@v4"},{"digest":"sha256:59df071a35deca05e62224e43b82d7bc9b5c649f989a3424fd704123633a539e","id":"adapter-github-pages-browser","kind":"adapter","version":"github-pages-artifact@v4"},{"digest":"sha256:12021a034cb9b796f1ab6b4431e5cdbd9803e16181f6378ce580e40764b62ff6","id":"adapter-kubernetes","kind":"adapter","version":"1.36.4"},{"digest":"sha256:6bec0a3910568ff84f28b8fd9c2f63e3fcde7986bebf3e24b1f4649c150d735b","id":"asyncapi-3.1.0-official-corpus","kind":"test-corpus","version":"b3fac5bb522771428ea57b16129b273cd3ea0180"},{"digest":"sha256:87f962245c8ad4fa95a972f8f67ed9804df22ee385197ae403dafae8b375995e","id":"asyncapi-embedded-launcher","kind":"oracle","version":"1"},{"digest":"sha256:b93c35a475df94fa05d817de7d0a78d569b7c9be932004accdb4dad032bbb729","id":"asyncapi-embedded-runtime","kind":"oracle","version":"@asyncapi/parser/3.6.0"},{"digest":"sha256:5bd20ce206d3b3b76a7034951c9e19e15291c54eec0a1424139b465c980f1205","id":"asyncapi-embedded-runtime-lock","kind":"dependency-lock","version":"@asyncapi/parser/3.6.0"},{"digest":"sha256:dbb7252527064804ec138bb391c90b26d08d3db5d47c4995735d56865c3f9882","id":"asyncapi-embedded-runtime-tests","kind":"test-corpus","version":"1"},{"digest":"sha256:b10e96e4bda8f1971585e93fe2c6e3872af558d5ae185374fb7500933992ae60","id":"asyncapi-oracle","kind":"oracle","version":"3.1.0"},{"digest":"sha256:ace18379af8bcc5723f49c7d50e322fadb8bc5c34102cebba2bb4746f1d82b5b","id":"asyncapi-website-adeo-schemas","kind":"test-corpus","version":"20a31a0396b41dd24b1bac877ab7ce3f58037c28"},{"digest":"sha256:24d82f845768c66d79d87052a265a56e28ad576eb31495a31fdaf716cb6ea43d","id":"bootstrap-historical-runner","kind":"binary","version":"0.2.0-runner/1"},{"digest":"sha256:70c9420062249ab531d56510a28deae6818e75cdfde52375ae9936376b153a23","id":"bootstrap-historical-runtime","kind":"binary","version":"0.2.0-runner/1"},{"digest":"sha256:c256110bb391083e2de1c225e904ba860f7b9b34efe9bf36227c607d36ad5085","id":"browser-account-genesis-construction","kind":"adapter","version":"1"},{"digest":"sha256:1607f069b641cc17df572eaab24fb2ce47288107e8f5a1fc670e94cc9eee3e88","id":"browser-host-primitives","kind":"adapter","version":"1"},{"digest":"sha256:0e2bcaef56d041a486784e54104a81aebe0da44bd03019bd70bc0401e42e4a97","id":"build-base","kind":"base-image","version":"rust-1.97.1-bookworm"},{"digest":"sha256:331555b57a45b264327ec4f034c189f64e20956b630a2d6b9053e767bbb53e90","id":"chromium-input-authority","kind":"dependency-lock","version":"157.0.8099.0"},{"digest":"sha256:ae6f7357f1eea754f07f555dd263d30f2d30ca8cf5440b2494c14facf34743af","id":"chromium-input-installer","kind":"oracle","version":"1"},{"digest":"sha256:48aa53d280e5e78275acfff62ae0173ac06fc86af86c379cad693e05e74a7803","id":"cloudevents-1.0.2-fixtures","kind":"test-corpus","version":"1.0.2"},{"digest":"sha256:9ad865a01c7ccb541255a2f89a2dbb34093c6ae3f57ce9e637eabf9edb146da0","id":"cloudevents-sdk-conformance","kind":"oracle","version":"2.16.2"},{"digest":"sha256:38480c5a48f73d20b8aa0db8366e22ae4ab34c245a370a11b8862cfbdeb5c6d1","id":"cloudevents-sdk-go-corpus","kind":"test-corpus","version":"2.16.2"},{"digest":"sha256:0f25ac26370a32f0d61fb50fc25e9c6ac5357680306e8c6e60f8dddad4f54eae","id":"cloudevents-validator","kind":"oracle","version":"sdk-go/2.16.2"},{"digest":"sha256:cd65e860cbad537bf76598f8e910e9cb027f7c90b1f09252141837df0240d4af","id":"conformance-corpus","kind":"test-corpus","version":"prismpm/ids/1"},{"digest":"sha256:d16d2c85ab2024a98c62f0d8c9fc195f5177ee65e9d6598ac84ecc6e3ede4fed","id":"contracts","kind":"schema","version":"1"},{"digest":"sha256:696bc104bac3bb708eff1af3f8bbc09fda0fd88f5757c1f9b404a35117889224","id":"docker-buildx","kind":"binary","version":"0.28.0"},{"digest":"sha256:cf122ae443d3fcad8b90fe30277d3c37e008c60d56c9658a44848bdb6f2078d4","id":"git-tag-root-akihirosuda","kind":"trust-root","version":"github-key-record-5228653"},{"digest":"sha256:929c5c98f56be683921c84a1ccd542d0d8df3e75657c3711d5557da35267b637","id":"git-tag-root-hayden-io","kind":"trust-root","version":"github-key-record-682831"},{"digest":"sha256:c0f83ab885c007561550bda8d540e620b2ac4e36af0a4b48cd320854a3cf2ea4","id":"git-tag-root-songy23","kind":"trust-root","version":"github-key-record-276780"},{"digest":"sha256:e33e1416f08d6ee24f1c66f3895be7d919ff58c0d4318f2934ec4743f75f0a7e","id":"git-tag-root-sudo-bmitch","kind":"trust-root","version":"github-key-record-2155637"},{"digest":"sha256:6cbad548e30d2e227d1cea0ee23bb09c06c506c27094ccd8f55137d0bef17371","id":"in-toto-attestation-1.0-source","kind":"test-corpus","version":"ee16c68a11dfcfbdc891600cacd767896fe6e724"},{"digest":"sha256:591f463460916feef9ac066f38654ab6be819dccc66738088d7b264ae2e44d79","id":"intoto-statement-validator","kind":"oracle","version":"1.0@ee16c68a"},{"digest":"sha256:8f63dc2d12ed947bfa4ae4cabab2d5926ecc06d86d054b6a3a4f3454446b5551","id":"json-schema-2020-12-corpus","kind":"test-corpus","version":"c9510e3bf8a896c3cba4e08509cf752b4f30dff8"},{"digest":"sha256:e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","id":"lean","kind":"binary","version":"4.32.1"},{"digest":"sha256:29270825b581f950b3914509b7a0613f34964f003eb3c61772636d0805b09148","id":"lean4-prod","kind":"crate","version":"991956fe427bb646498fd0912c89b71be71e7beb"},{"digest":"sha256:b0081437c68a576ea0b19805568e8ac8c418cf5b7b366d7881b02f38dbaf77ed","id":"lean4-prod-exporter","kind":"binary","version":"991956fe427bb646498fd0912c89b71be71e7beb"},{"digest":"sha256:5ad69a24139104bd268a70b2124384a9266903550fe6909804abb6c8c32b9431","id":"lean4-prod-exporter-seed","kind":"dependency-lock","version":"1"},{"digest":"sha256:c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","id":"leanchecker","kind":"binary","version":"4.32.1"},{"digest":"sha256:e4168b533d3369e7e0e2ed7cdb331f8dd94e3aa20362d55ded086a24ca3b16f8","id":"lexlean","kind":"binary","version":"0.3.0"},{"digest":"sha256:c3b22a1cef1975004c948e04005f02c013c02f9698c04da07998e9e13e875acc","id":"oci-distribution-1.1.1-corpus","kind":"test-corpus","version":"a139cc423184af6078077b9b7ee336eddbd03f8f"},{"digest":"sha256:7b0e39ab2f616c7b33a7ffc57331b90a27ea4cc23ffbc1526c3dee80187332b2","id":"oci-distribution-conformance","kind":"oracle","version":"1.1.1@a139cc42"},{"digest":"sha256:6c00d78efd45b6a3acc798497851b21585867042cbdc63dbe0c105825b8dac91","id":"oci-image-1.1.1-corpus","kind":"test-corpus","version":"147f9c13cedb47a0c4d9a11a222961073d585877"},{"digest":"sha256:87e0a99983e0bf9af63d5ac49cd7c1df476231f1de947d0e1c7e7b51b57cc0fd","id":"oci-image-schema-conformance","kind":"oracle","version":"1.1.1@147f9c13"},{"digest":"sha256:9bf0da1272040438e13ce349a39a1dd036c3432f82e2cec5b17d2aa7db316e8a","id":"oci-runtime-1.3.0-corpus","kind":"test-corpus","version":"92249139eea7161e13745abd4cb6d0ea02a3227a"},{"digest":"sha256:65bd7332ae65e906405bb3b4e1dfcbfa7c9e25dcc3ceeff5a7331a1b942be26e","id":"oci-runtime-validate","kind":"oracle","version":"1.3.0@92249139"},{"digest":"sha256:7ee100439bc7dc35cda162b85be68140338bdae5aa3c2fb79412cca621bdd9b1","id":"openid-conformance","kind":"oracle","version":"3e09b13b896f"},{"digest":"sha256:a35012f67dccd4296ab0e380eb86a0e053dbbf6bf52522aca3ed961c83812197","id":"openid-conformance-suite-corpus","kind":"test-corpus","version":"3e09b13b896fce95d78c2c0f931feee9614e9452"},{"digest":"sha256:90cdf6a86d9f2f7c9b60f66c9be7c296b394dfef57ac5e28d78965565252f223","id":"opentelemetry-0.136.0-signal-corpus","kind":"test-corpus","version":"0.136.0"},{"digest":"sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e","id":"playwright-chromium","kind":"oracle","version":"1.62.1"},{"digest":"sha256:8d81de4103b7e342d0f997526d84fb334bf92b562f1035bc66da8b77a0b02ab7","id":"playwright-core","kind":"oracle","version":"1.62.1"},{"digest":"sha256:bf3497a2d26912da443d74ef55c0d8155e00a781e3e6c966368d8bd2c8380b5c","id":"playwright-driver","kind":"oracle","version":"1.62.1"},{"digest":"sha256:18c79a8a6f785debf08393ce22f57cf5923d996c431c5c55610e5a20109905b7","id":"playwright-headless-shell","kind":"oracle","version":"157.0.8099.0"},{"digest":"sha256:58f398f5453e170e19842360ac1bb3ceda2ea032306527bbeb3adf6650b52bca","id":"prism-stdlib","kind":"crate","version":"0.2.0"},{"digest":"sha256:ddd53c416a956ede2d84dedace1af7ad9a12ef1eac0e9220a4a5b3e6de897aa8","id":"prismpm","kind":"binary","version":"0.3.0"},{"digest":"sha256:65270010ca442abafa1ae5ccaa1e00777814d08748e0ffb4565070c43b52e2e9","id":"prismpm-conformance","kind":"binary","version":"0.3.0"},{"digest":"sha256:a3be795af76d3a0d95253ce652828b3d161e6aae0f147996328dd333a9aba531","id":"prismpm-platform-equivalence","kind":"binary","version":"0.3.0"},{"digest":"sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e","id":"runtime-base","kind":"base-image","version":"playwright-v1.62.1-noble"},{"digest":"sha256:22cb82bbc6142c670dfc2b21b225d01edcd036c4e870ef4b668c9e3efa8bb6f1","id":"runtime-os-lock","kind":"dependency-lock","version":"ubuntu-noble@20260901T000000Z"},{"digest":"sha256:2fa9d3ee26c523899ae5314861306daff716320095cd638f1cd54fbff44cd208","id":"sdk-exporter-seed-producer","kind":"schema","version":"1"},{"digest":"sha256:18d8f8d10061d2e4d4ee627cd051481cb79ea366300d191a0e7f81ac8f87f182","id":"sdk-image-input-authorities","kind":"test-corpus","version":"1"},{"digest":"sha256:7f441845b1a471b97b9756b7cbe3f48c6e1997be9acd36cece415111c8453d79","id":"sdk-image-input-verifier","kind":"test-corpus","version":"1"},{"digest":"sha256:d025c5be578b5d2b334c02917cefa3ff60a1fd8b21de7d06348a300ec1b8a072","id":"sdk-metadata-capture","kind":"schema","version":"1"},{"digest":"sha256:d84af5d749355ea4dd97519ee1a7710cc43d8f307d1b8c43cdf93f3e51c24db1","id":"sdk-metadata-cli","kind":"schema","version":"1"},{"digest":"sha256:fb287316d82f21b36386f3a6532af61d4205cee18b74f4c3db2737a90113037d","id":"sdk-metadata-credentials","kind":"schema","version":"1"},{"digest":"sha256:6945bb2808808d2ca6ed237dadfe5749989a0f9c94579ab64280f3e84592cbdf","id":"sdk-metadata-helper","kind":"schema","version":"1"},{"digest":"sha256:3f860b40d5ad29751a592d50f1dc703cdef04a0f0929bcefd90cc844ccc58d43","id":"sdk-metadata-helper-supervisor","kind":"schema","version":"1"},{"digest":"sha256:52951e1caf9eb692436f83c5c5dc0f23ec0a864926140ee3db1e217d823707d5","id":"sdk-metadata-layer","kind":"schema","version":"1"},{"digest":"sha256:ab7c2ce88b40760294514ca846cda0671a8709438c8361f0a18fa1ffa4030732","id":"sdk-metadata-transport","kind":"schema","version":"1"},{"digest":"sha256:870ece6967ce85585dd1935f742ef05d8a4a4111d54ea30b541a43857b43533b","id":"sdk-platform-lock","kind":"schema","version":"2"},{"digest":"sha256:6e0162633a2d8b8ec973c6fb15e1d48e55f92c5889b90961a3a1b17937aa3e97","id":"sdk-vv-advisory","kind":"test-corpus","version":"d5c17953a895cf19e8d3ce66eaa42b6fcfe1fb16"},{"digest":"sha256:f3dd999f5618db154fa06222a06f9de95d86e1dbf683954426ea91c974cbe24c","id":"sdk-vv-bootstrap","kind":"test-corpus","version":"0.2.0"},{"digest":"sha256:f66e5cd2482cf80b5b529b7688b14602753cb8654707a0762c0a49f333d71091","id":"sdk-vv-manifest","kind":"test-corpus","version":"1"},{"digest":"sha256:96c3af78e543b0d02d8972816daee3b58ef421e667cb41d4ea7b421653aa73a9","id":"sdk-vv-policy","kind":"test-corpus","version":"1"},{"digest":"sha256:ecac1c34797bad411cf8a5b9bfe9a1d3c58d33d6c4ec0b25e21be89a92156840","id":"sdk-vv-source","kind":"test-corpus","version":"35e9f01d5415ed4b0b64c152238f291546957ec4"},{"digest":"sha256:d9028fd7692fae3a56dd29848c629ea564e67bbf3f6804f557f6b153a1ceb35c","id":"sdk-vv-verifier","kind":"test-corpus","version":"1"},{"digest":"sha256:844a1c6de3986c9f02070266b25e0d1a2fa99ceccc89f6b9ad90aae47b62a16e","id":"sigstore-trusted-root","kind":"trust-root","version":"cosign-3.1.3-default-services"},{"digest":"sha256:2fa271a49fd04807437003e3a2e8d7d39c3b635b4815a72d1ec2f5f216adaaea","id":"spdx-3.0.1-fixtures","kind":"test-corpus","version":"3.0.1"},{"digest":"sha256:8db53aa63cfc7565f79e057a4da362d4144c546d56320a51b838befe8371b17d","id":"spdx-3.0.1-model","kind":"test-corpus","version":"a745f63e8643d5ae0f0851fcfa6836085308f80b"},{"digest":"sha256:e611189a0028aa1ac4bbd2ee3f06c664a39c7351c65e942b3f2b53e4ab1e3212","id":"spdx-3.0.1-schema","kind":"schema","version":"3.0.1"},{"digest":"sha256:e2670b02913ab07bef777fe30075892652b2fd8b78ca396d83916368946334a1","id":"spdx-validator","kind":"oracle","version":"ajv-8.20.0+spdx-3.0.1"},{"digest":"sha256:54448d21cb1ed3a4af826aa44991e9839b51d97b8975a5b125927c78af922b46","id":"standards-and-oracles","kind":"oracle","version":"prismpm/standards-lock/1"},{"digest":"sha256:840617fbc4df682f893bdefe4f5320de16aebabc20c84936c8a583765e890ff0","id":"stdlib-sources","kind":"crate","version":"0.2.0-sources"},{"digest":"sha256:5ef0eaaaa4220593add7716aad74da927ca3bb10605e964330de64fecc3ef15e","id":"timeout","kind":"binary","version":"coreutils-9.4"},{"digest":"sha256:1885ce2b3409b4f2b4a569c378d243f4a75e22fc10d59a69a69a1cacc16dda9e","id":"unicode-17.0.0-normalization-corpus","kind":"test-corpus","version":"17.0.0"},{"digest":"sha256:299e79e16e6c76cd6b770c66763f436e5b6a947b4280926b9d3b4e3ec99c885b","id":"workflow-reusable-sdk","kind":"workflow","version":"0.3.0"}],"inventory_digest":"sha256:364a355318e5ba674927d3b01ebd13dfc21fc760ac41a6ddd116b7c4ac738fca","inventory_document":"{\"artifacts\":[{\"digest\":\"sha256:1e88b7e9aa26ad5cd17601aad064de5b07c1251128b5def20f79d24438b5f4be\",\"id\":\"action\",\"kind\":\"workflow\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:5d63cd6921f790c8637e716b632d7777899f37166eff0a6010cd19d1e9127044\",\"id\":\"adapter-compose\",\"kind\":\"adapter\",\"version\":\"compose-spec@fee041b381ffd4aad263410980bdce0cdf4beb7d\"},{\"digest\":\"sha256:db0425b35e875a36af50fb3a73e491af9badc759b6c290a731d6fd23fd62c119\",\"id\":\"adapter-github-pages\",\"kind\":\"adapter\",\"version\":\"github-pages-artifact@v4\"},{\"digest\":\"sha256:59df071a35deca05e62224e43b82d7bc9b5c649f989a3424fd704123633a539e\",\"id\":\"adapter-github-pages-browser\",\"kind\":\"adapter\",\"version\":\"github-pages-artifact@v4\"},{\"digest\":\"sha256:12021a034cb9b796f1ab6b4431e5cdbd9803e16181f6378ce580e40764b62ff6\",\"id\":\"adapter-kubernetes\",\"kind\":\"adapter\",\"version\":\"1.36.4\"},{\"digest\":\"sha256:6bec0a3910568ff84f28b8fd9c2f63e3fcde7986bebf3e24b1f4649c150d735b\",\"id\":\"asyncapi-3.1.0-official-corpus\",\"kind\":\"test-corpus\",\"version\":\"b3fac5bb522771428ea57b16129b273cd3ea0180\"},{\"digest\":\"sha256:87f962245c8ad4fa95a972f8f67ed9804df22ee385197ae403dafae8b375995e\",\"id\":\"asyncapi-embedded-launcher\",\"kind\":\"oracle\",\"version\":\"1\"},{\"digest\":\"sha256:b93c35a475df94fa05d817de7d0a78d569b7c9be932004accdb4dad032bbb729\",\"id\":\"asyncapi-embedded-runtime\",\"kind\":\"oracle\",\"version\":\"@asyncapi/parser/3.6.0\"},{\"digest\":\"sha256:5bd20ce206d3b3b76a7034951c9e19e15291c54eec0a1424139b465c980f1205\",\"id\":\"asyncapi-embedded-runtime-lock\",\"kind\":\"dependency-lock\",\"version\":\"@asyncapi/parser/3.6.0\"},{\"digest\":\"sha256:dbb7252527064804ec138bb391c90b26d08d3db5d47c4995735d56865c3f9882\",\"id\":\"asyncapi-embedded-runtime-tests\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:b10e96e4bda8f1971585e93fe2c6e3872af558d5ae185374fb7500933992ae60\",\"id\":\"asyncapi-oracle\",\"kind\":\"oracle\",\"version\":\"3.1.0\"},{\"digest\":\"sha256:ace18379af8bcc5723f49c7d50e322fadb8bc5c34102cebba2bb4746f1d82b5b\",\"id\":\"asyncapi-website-adeo-schemas\",\"kind\":\"test-corpus\",\"version\":\"20a31a0396b41dd24b1bac877ab7ce3f58037c28\"},{\"digest\":\"sha256:24d82f845768c66d79d87052a265a56e28ad576eb31495a31fdaf716cb6ea43d\",\"id\":\"bootstrap-historical-runner\",\"kind\":\"binary\",\"version\":\"0.2.0-runner/1\"},{\"digest\":\"sha256:70c9420062249ab531d56510a28deae6818e75cdfde52375ae9936376b153a23\",\"id\":\"bootstrap-historical-runtime\",\"kind\":\"binary\",\"version\":\"0.2.0-runner/1\"},{\"digest\":\"sha256:c256110bb391083e2de1c225e904ba860f7b9b34efe9bf36227c607d36ad5085\",\"id\":\"browser-account-genesis-construction\",\"kind\":\"adapter\",\"version\":\"1\"},{\"digest\":\"sha256:1607f069b641cc17df572eaab24fb2ce47288107e8f5a1fc670e94cc9eee3e88\",\"id\":\"browser-host-primitives\",\"kind\":\"adapter\",\"version\":\"1\"},{\"digest\":\"sha256:0e2bcaef56d041a486784e54104a81aebe0da44bd03019bd70bc0401e42e4a97\",\"id\":\"build-base\",\"kind\":\"base-image\",\"version\":\"rust-1.97.1-bookworm\"},{\"digest\":\"sha256:331555b57a45b264327ec4f034c189f64e20956b630a2d6b9053e767bbb53e90\",\"id\":\"chromium-input-authority\",\"kind\":\"dependency-lock\",\"version\":\"157.0.8099.0\"},{\"digest\":\"sha256:ae6f7357f1eea754f07f555dd263d30f2d30ca8cf5440b2494c14facf34743af\",\"id\":\"chromium-input-installer\",\"kind\":\"oracle\",\"version\":\"1\"},{\"digest\":\"sha256:48aa53d280e5e78275acfff62ae0173ac06fc86af86c379cad693e05e74a7803\",\"id\":\"cloudevents-1.0.2-fixtures\",\"kind\":\"test-corpus\",\"version\":\"1.0.2\"},{\"digest\":\"sha256:9ad865a01c7ccb541255a2f89a2dbb34093c6ae3f57ce9e637eabf9edb146da0\",\"id\":\"cloudevents-sdk-conformance\",\"kind\":\"oracle\",\"version\":\"2.16.2\"},{\"digest\":\"sha256:38480c5a48f73d20b8aa0db8366e22ae4ab34c245a370a11b8862cfbdeb5c6d1\",\"id\":\"cloudevents-sdk-go-corpus\",\"kind\":\"test-corpus\",\"version\":\"2.16.2\"},{\"digest\":\"sha256:0f25ac26370a32f0d61fb50fc25e9c6ac5357680306e8c6e60f8dddad4f54eae\",\"id\":\"cloudevents-validator\",\"kind\":\"oracle\",\"version\":\"sdk-go/2.16.2\"},{\"digest\":\"sha256:cd65e860cbad537bf76598f8e910e9cb027f7c90b1f09252141837df0240d4af\",\"id\":\"conformance-corpus\",\"kind\":\"test-corpus\",\"version\":\"prismpm/ids/1\"},{\"digest\":\"sha256:d16d2c85ab2024a98c62f0d8c9fc195f5177ee65e9d6598ac84ecc6e3ede4fed\",\"id\":\"contracts\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:696bc104bac3bb708eff1af3f8bbc09fda0fd88f5757c1f9b404a35117889224\",\"id\":\"docker-buildx\",\"kind\":\"binary\",\"version\":\"0.28.0\"},{\"digest\":\"sha256:cf122ae443d3fcad8b90fe30277d3c37e008c60d56c9658a44848bdb6f2078d4\",\"id\":\"git-tag-root-akihirosuda\",\"kind\":\"trust-root\",\"version\":\"github-key-record-5228653\"},{\"digest\":\"sha256:929c5c98f56be683921c84a1ccd542d0d8df3e75657c3711d5557da35267b637\",\"id\":\"git-tag-root-hayden-io\",\"kind\":\"trust-root\",\"version\":\"github-key-record-682831\"},{\"digest\":\"sha256:c0f83ab885c007561550bda8d540e620b2ac4e36af0a4b48cd320854a3cf2ea4\",\"id\":\"git-tag-root-songy23\",\"kind\":\"trust-root\",\"version\":\"github-key-record-276780\"},{\"digest\":\"sha256:e33e1416f08d6ee24f1c66f3895be7d919ff58c0d4318f2934ec4743f75f0a7e\",\"id\":\"git-tag-root-sudo-bmitch\",\"kind\":\"trust-root\",\"version\":\"github-key-record-2155637\"},{\"digest\":\"sha256:6cbad548e30d2e227d1cea0ee23bb09c06c506c27094ccd8f55137d0bef17371\",\"id\":\"in-toto-attestation-1.0-source\",\"kind\":\"test-corpus\",\"version\":\"ee16c68a11dfcfbdc891600cacd767896fe6e724\"},{\"digest\":\"sha256:591f463460916feef9ac066f38654ab6be819dccc66738088d7b264ae2e44d79\",\"id\":\"intoto-statement-validator\",\"kind\":\"oracle\",\"version\":\"1.0@ee16c68a\"},{\"digest\":\"sha256:8f63dc2d12ed947bfa4ae4cabab2d5926ecc06d86d054b6a3a4f3454446b5551\",\"id\":\"json-schema-2020-12-corpus\",\"kind\":\"test-corpus\",\"version\":\"c9510e3bf8a896c3cba4e08509cf752b4f30dff8\"},{\"digest\":\"sha256:e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550\",\"id\":\"lean\",\"kind\":\"binary\",\"version\":\"4.32.1\"},{\"digest\":\"sha256:29270825b581f950b3914509b7a0613f34964f003eb3c61772636d0805b09148\",\"id\":\"lean4-prod\",\"kind\":\"crate\",\"version\":\"991956fe427bb646498fd0912c89b71be71e7beb\"},{\"digest\":\"sha256:b0081437c68a576ea0b19805568e8ac8c418cf5b7b366d7881b02f38dbaf77ed\",\"id\":\"lean4-prod-exporter\",\"kind\":\"binary\",\"version\":\"991956fe427bb646498fd0912c89b71be71e7beb\"},{\"digest\":\"sha256:5ad69a24139104bd268a70b2124384a9266903550fe6909804abb6c8c32b9431\",\"id\":\"lean4-prod-exporter-seed\",\"kind\":\"dependency-lock\",\"version\":\"1\"},{\"digest\":\"sha256:c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f\",\"id\":\"leanchecker\",\"kind\":\"binary\",\"version\":\"4.32.1\"},{\"digest\":\"sha256:e4168b533d3369e7e0e2ed7cdb331f8dd94e3aa20362d55ded086a24ca3b16f8\",\"id\":\"lexlean\",\"kind\":\"binary\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:c3b22a1cef1975004c948e04005f02c013c02f9698c04da07998e9e13e875acc\",\"id\":\"oci-distribution-1.1.1-corpus\",\"kind\":\"test-corpus\",\"version\":\"a139cc423184af6078077b9b7ee336eddbd03f8f\"},{\"digest\":\"sha256:7b0e39ab2f616c7b33a7ffc57331b90a27ea4cc23ffbc1526c3dee80187332b2\",\"id\":\"oci-distribution-conformance\",\"kind\":\"oracle\",\"version\":\"1.1.1@a139cc42\"},{\"digest\":\"sha256:6c00d78efd45b6a3acc798497851b21585867042cbdc63dbe0c105825b8dac91\",\"id\":\"oci-image-1.1.1-corpus\",\"kind\":\"test-corpus\",\"version\":\"147f9c13cedb47a0c4d9a11a222961073d585877\"},{\"digest\":\"sha256:87e0a99983e0bf9af63d5ac49cd7c1df476231f1de947d0e1c7e7b51b57cc0fd\",\"id\":\"oci-image-schema-conformance\",\"kind\":\"oracle\",\"version\":\"1.1.1@147f9c13\"},{\"digest\":\"sha256:9bf0da1272040438e13ce349a39a1dd036c3432f82e2cec5b17d2aa7db316e8a\",\"id\":\"oci-runtime-1.3.0-corpus\",\"kind\":\"test-corpus\",\"version\":\"92249139eea7161e13745abd4cb6d0ea02a3227a\"},{\"digest\":\"sha256:65bd7332ae65e906405bb3b4e1dfcbfa7c9e25dcc3ceeff5a7331a1b942be26e\",\"id\":\"oci-runtime-validate\",\"kind\":\"oracle\",\"version\":\"1.3.0@92249139\"},{\"digest\":\"sha256:7ee100439bc7dc35cda162b85be68140338bdae5aa3c2fb79412cca621bdd9b1\",\"id\":\"openid-conformance\",\"kind\":\"oracle\",\"version\":\"3e09b13b896f\"},{\"digest\":\"sha256:a35012f67dccd4296ab0e380eb86a0e053dbbf6bf52522aca3ed961c83812197\",\"id\":\"openid-conformance-suite-corpus\",\"kind\":\"test-corpus\",\"version\":\"3e09b13b896fce95d78c2c0f931feee9614e9452\"},{\"digest\":\"sha256:90cdf6a86d9f2f7c9b60f66c9be7c296b394dfef57ac5e28d78965565252f223\",\"id\":\"opentelemetry-0.136.0-signal-corpus\",\"kind\":\"test-corpus\",\"version\":\"0.136.0\"},{\"digest\":\"sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e\",\"id\":\"playwright-chromium\",\"kind\":\"oracle\",\"version\":\"1.62.1\"},{\"digest\":\"sha256:8d81de4103b7e342d0f997526d84fb334bf92b562f1035bc66da8b77a0b02ab7\",\"id\":\"playwright-core\",\"kind\":\"oracle\",\"version\":\"1.62.1\"},{\"digest\":\"sha256:bf3497a2d26912da443d74ef55c0d8155e00a781e3e6c966368d8bd2c8380b5c\",\"id\":\"playwright-driver\",\"kind\":\"oracle\",\"version\":\"1.62.1\"},{\"digest\":\"sha256:18c79a8a6f785debf08393ce22f57cf5923d996c431c5c55610e5a20109905b7\",\"id\":\"playwright-headless-shell\",\"kind\":\"oracle\",\"version\":\"157.0.8099.0\"},{\"digest\":\"sha256:58f398f5453e170e19842360ac1bb3ceda2ea032306527bbeb3adf6650b52bca\",\"id\":\"prism-stdlib\",\"kind\":\"crate\",\"version\":\"0.2.0\"},{\"digest\":\"sha256:ddd53c416a956ede2d84dedace1af7ad9a12ef1eac0e9220a4a5b3e6de897aa8\",\"id\":\"prismpm\",\"kind\":\"binary\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:65270010ca442abafa1ae5ccaa1e00777814d08748e0ffb4565070c43b52e2e9\",\"id\":\"prismpm-conformance\",\"kind\":\"binary\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:a3be795af76d3a0d95253ce652828b3d161e6aae0f147996328dd333a9aba531\",\"id\":\"prismpm-platform-equivalence\",\"kind\":\"binary\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e\",\"id\":\"runtime-base\",\"kind\":\"base-image\",\"version\":\"playwright-v1.62.1-noble\"},{\"digest\":\"sha256:22cb82bbc6142c670dfc2b21b225d01edcd036c4e870ef4b668c9e3efa8bb6f1\",\"id\":\"runtime-os-lock\",\"kind\":\"dependency-lock\",\"version\":\"ubuntu-noble@20260901T000000Z\"},{\"digest\":\"sha256:2fa9d3ee26c523899ae5314861306daff716320095cd638f1cd54fbff44cd208\",\"id\":\"sdk-exporter-seed-producer\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:18d8f8d10061d2e4d4ee627cd051481cb79ea366300d191a0e7f81ac8f87f182\",\"id\":\"sdk-image-input-authorities\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:7f441845b1a471b97b9756b7cbe3f48c6e1997be9acd36cece415111c8453d79\",\"id\":\"sdk-image-input-verifier\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:d025c5be578b5d2b334c02917cefa3ff60a1fd8b21de7d06348a300ec1b8a072\",\"id\":\"sdk-metadata-capture\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:d84af5d749355ea4dd97519ee1a7710cc43d8f307d1b8c43cdf93f3e51c24db1\",\"id\":\"sdk-metadata-cli\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:fb287316d82f21b36386f3a6532af61d4205cee18b74f4c3db2737a90113037d\",\"id\":\"sdk-metadata-credentials\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:6945bb2808808d2ca6ed237dadfe5749989a0f9c94579ab64280f3e84592cbdf\",\"id\":\"sdk-metadata-helper\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:3f860b40d5ad29751a592d50f1dc703cdef04a0f0929bcefd90cc844ccc58d43\",\"id\":\"sdk-metadata-helper-supervisor\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:52951e1caf9eb692436f83c5c5dc0f23ec0a864926140ee3db1e217d823707d5\",\"id\":\"sdk-metadata-layer\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:ab7c2ce88b40760294514ca846cda0671a8709438c8361f0a18fa1ffa4030732\",\"id\":\"sdk-metadata-transport\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:870ece6967ce85585dd1935f742ef05d8a4a4111d54ea30b541a43857b43533b\",\"id\":\"sdk-platform-lock\",\"kind\":\"schema\",\"version\":\"2\"},{\"digest\":\"sha256:6e0162633a2d8b8ec973c6fb15e1d48e55f92c5889b90961a3a1b17937aa3e97\",\"id\":\"sdk-vv-advisory\",\"kind\":\"test-corpus\",\"version\":\"d5c17953a895cf19e8d3ce66eaa42b6fcfe1fb16\"},{\"digest\":\"sha256:f3dd999f5618db154fa06222a06f9de95d86e1dbf683954426ea91c974cbe24c\",\"id\":\"sdk-vv-bootstrap\",\"kind\":\"test-corpus\",\"version\":\"0.2.0\"},{\"digest\":\"sha256:f66e5cd2482cf80b5b529b7688b14602753cb8654707a0762c0a49f333d71091\",\"id\":\"sdk-vv-manifest\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:96c3af78e543b0d02d8972816daee3b58ef421e667cb41d4ea7b421653aa73a9\",\"id\":\"sdk-vv-policy\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:ecac1c34797bad411cf8a5b9bfe9a1d3c58d33d6c4ec0b25e21be89a92156840\",\"id\":\"sdk-vv-source\",\"kind\":\"test-corpus\",\"version\":\"35e9f01d5415ed4b0b64c152238f291546957ec4\"},{\"digest\":\"sha256:d9028fd7692fae3a56dd29848c629ea564e67bbf3f6804f557f6b153a1ceb35c\",\"id\":\"sdk-vv-verifier\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:844a1c6de3986c9f02070266b25e0d1a2fa99ceccc89f6b9ad90aae47b62a16e\",\"id\":\"sigstore-trusted-root\",\"kind\":\"trust-root\",\"version\":\"cosign-3.1.3-default-services\"},{\"digest\":\"sha256:2fa271a49fd04807437003e3a2e8d7d39c3b635b4815a72d1ec2f5f216adaaea\",\"id\":\"spdx-3.0.1-fixtures\",\"kind\":\"test-corpus\",\"version\":\"3.0.1\"},{\"digest\":\"sha256:8db53aa63cfc7565f79e057a4da362d4144c546d56320a51b838befe8371b17d\",\"id\":\"spdx-3.0.1-model\",\"kind\":\"test-corpus\",\"version\":\"a745f63e8643d5ae0f0851fcfa6836085308f80b\"},{\"digest\":\"sha256:e611189a0028aa1ac4bbd2ee3f06c664a39c7351c65e942b3f2b53e4ab1e3212\",\"id\":\"spdx-3.0.1-schema\",\"kind\":\"schema\",\"version\":\"3.0.1\"},{\"digest\":\"sha256:e2670b02913ab07bef777fe30075892652b2fd8b78ca396d83916368946334a1\",\"id\":\"spdx-validator\",\"kind\":\"oracle\",\"version\":\"ajv-8.20.0+spdx-3.0.1\"},{\"digest\":\"sha256:54448d21cb1ed3a4af826aa44991e9839b51d97b8975a5b125927c78af922b46\",\"id\":\"standards-and-oracles\",\"kind\":\"oracle\",\"version\":\"prismpm/standards-lock/1\"},{\"digest\":\"sha256:840617fbc4df682f893bdefe4f5320de16aebabc20c84936c8a583765e890ff0\",\"id\":\"stdlib-sources\",\"kind\":\"crate\",\"version\":\"0.2.0-sources\"},{\"digest\":\"sha256:5ef0eaaaa4220593add7716aad74da927ca3bb10605e964330de64fecc3ef15e\",\"id\":\"timeout\",\"kind\":\"binary\",\"version\":\"coreutils-9.4\"},{\"digest\":\"sha256:1885ce2b3409b4f2b4a569c378d243f4a75e22fc10d59a69a69a1cacc16dda9e\",\"id\":\"unicode-17.0.0-normalization-corpus\",\"kind\":\"test-corpus\",\"version\":\"17.0.0\"},{\"digest\":\"sha256:299e79e16e6c76cd6b770c66763f436e5b6a947b4280926b9d3b4e3ec99c885b\",\"id\":\"workflow-reusable-sdk\",\"kind\":\"workflow\",\"version\":\"0.3.0\"}],\"commands\":[{\"command\":\"Xvfb\",\"executable\":\"/usr/bin/Xvfb\",\"sha256\":\"2c7f5a9534410fed5092d782a69ca7ffd9fce80e98b81ffe4944d703dd11d3b1\"},{\"command\":\"[\",\"executable\":\"/usr/bin/[\",\"sha256\":\"a948a5e4bc398b4fafbc838808fa83d423773e19e56293d2bb96cf495b794e98\"},{\"command\":\"addpart\",\"executable\":\"/usr/bin/addpart\",\"sha256\":\"275dd8e7d91cb29f98ed937f30b595b79d199b371142277ea541a2c5d0d91dda\"},{\"command\":\"addr2line\",\"executable\":\"/usr/bin/x86_64-linux-gnu-addr2line\",\"sha256\":\"a116f9e176f9f1ef6e2ab31ad41bacb9d2571b479725ebdfe10fb9cb70aa9e53\"},{\"command\":\"apt\",\"executable\":\"/usr/bin/apt\",\"sha256\":\"0dba8843674864cea269a468b723a38ce0a830790e339b84bdc2b57e05aa558a\"},{\"command\":\"apt-cache\",\"executable\":\"/usr/bin/apt-cache\",\"sha256\":\"7b9f8a0a1c6d6e547df46b8401b5fa521d324d959dc29f84927910af64a9401f\"},{\"command\":\"apt-cdrom\",\"executable\":\"/usr/bin/apt-cdrom\",\"sha256\":\"48d7074944bcf1ea85093f14dc21811b57071049a3185cc1fde7de22da3e1c6b\"},{\"command\":\"apt-config\",\"executable\":\"/usr/bin/apt-config\",\"sha256\":\"44ec8b9197670a2c12ed2c6b837dd623c23b641e8c491be03ccefc23dd0fba8c\"},{\"command\":\"apt-get\",\"executable\":\"/usr/bin/apt-get\",\"sha256\":\"eb53b3b66cbb7a90a370e26439e941b7cf146ddd91a5422063c761ce9e59c53b\"},{\"command\":\"apt-key\",\"executable\":\"/usr/bin/apt-key\",\"sha256\":\"45ec8c948cb0f17b38f27b4d8235596b17ece3b7eea5afcbb3be8b1ee5a98c77\"},{\"command\":\"apt-mark\",\"executable\":\"/usr/bin/apt-mark\",\"sha256\":\"6a31af1ed4932f7cb34e64bc6c9ab67b566db96dd478be0eaf96402666687635\"},{\"command\":\"ar\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ar\",\"sha256\":\"6452af2eea333b8c65e1adb92964fc8f97863ab003fa13f9d12bff5345cd7dbe\"},{\"command\":\"arch\",\"executable\":\"/usr/bin/arch\",\"sha256\":\"25dbcfcd41750e6d5f25d95f80bf96d99a68482ef2b9c2d6cd49db4498f37c06\"},{\"command\":\"as\",\"executable\":\"/usr/bin/x86_64-linux-gnu-as\",\"sha256\":\"21aff249b692b5c31a44007491f922dcb49f41323e362c57d2ada3f52eddb7f0\"},{\"command\":\"asyncapi-official\",\"executable\":\"/opt/prismpm/asyncapi-official/scripts/launcher.sh\",\"sha256\":\"b06adb1cd61f9258e2b351314ffbd6cae1ed608a3623da201ac2879676bb302e\"},{\"command\":\"asyncapi-parser\",\"executable\":\"/opt/prismpm/oracles/asyncapi-parser.mjs\",\"sha256\":\"849b552ffa8ef7330511173b4fbd03d77f01ef0e7115abf64394d9160add5caf\"},{\"command\":\"awk\",\"executable\":\"/usr/bin/mawk\",\"sha256\":\"3850bf893d3f4f8ec462c8b59d6d66fdbbe8ddc0715b3d404d9cc574526b781c\"},{\"command\":\"b2sum\",\"executable\":\"/usr/bin/b2sum\",\"sha256\":\"be535356d5b4c4836ae7534dcc608b3e05e9b795ea68ec488d0c89756e2f6797\"},{\"command\":\"base32\",\"executable\":\"/usr/bin/base32\",\"sha256\":\"2328ebe76bd82a370e03ec5a93d3f4d4e7430fe360e36822b05514976ee90361\"},{\"command\":\"base64\",\"executable\":\"/usr/bin/base64\",\"sha256\":\"69eade6cb3d3ec13888c7e4488e2cb697c10669debc5a9bf382b002af3b8139b\"},{\"command\":\"basename\",\"executable\":\"/usr/bin/basename\",\"sha256\":\"4beb496d2c0c39359f01d7e727084a3565237f3c3f5aeeaf06ab585329c0301b\"},{\"command\":\"basenc\",\"executable\":\"/usr/bin/basenc\",\"sha256\":\"21eb33c77c3f70c10fe8077d8a3f91c8c27d27b0048064ea5fe14a25c34a395c\"},{\"command\":\"bash\",\"executable\":\"/usr/bin/bash\",\"sha256\":\"bc5945feb8bd26203ebfafea5ce1878bb2e32cb8fb50ab7ae395cfb1e1aaaef1\"},{\"command\":\"bashbug\",\"executable\":\"/usr/bin/bashbug\",\"sha256\":\"7f635f2983aca8538deaa2f4b08696a1ad89c628772d9e6efb13faad0daaf595\"},{\"command\":\"bdftopcf\",\"executable\":\"/usr/bin/bdftopcf\",\"sha256\":\"9b02f426e29766dea622610627e6926c4b9d1e7c7bd61ad42e65c60036d7f662\"},{\"command\":\"bdftruncate\",\"executable\":\"/usr/bin/bdftruncate\",\"sha256\":\"08fd94166783aa49dc652d104c3e0c2f8972d12b785b2f261cc74afe764524fa\"},{\"command\":\"bunzip2\",\"executable\":\"/usr/bin/bunzip2\",\"sha256\":\"909769e6f36ab54e52f1099d59aec0e8d2f27b8c53f95c63429f5c571e027ada\"},{\"command\":\"busctl\",\"executable\":\"/usr/bin/busctl\",\"sha256\":\"3389e7f9c5db49f3cad2bb04a6f2b84f5fe091eb901cfbf56f3113f8afa72990\"},{\"command\":\"bzcat\",\"executable\":\"/usr/bin/bzcat\",\"sha256\":\"909769e6f36ab54e52f1099d59aec0e8d2f27b8c53f95c63429f5c571e027ada\"},{\"command\":\"bzcmp\",\"executable\":\"/usr/bin/bzdiff\",\"sha256\":\"d115316919735ea43b057063dad2609b05051a11f3819291a403ecceb55ba102\"},{\"command\":\"bzdiff\",\"executable\":\"/usr/bin/bzdiff\",\"sha256\":\"d115316919735ea43b057063dad2609b05051a11f3819291a403ecceb55ba102\"},{\"command\":\"bzegrep\",\"executable\":\"/usr/bin/bzgrep\",\"sha256\":\"3300749d903f145a8815c07fa1389dba04268fee1fec97ca1f01abf07ac5ee04\"},{\"command\":\"bzexe\",\"executable\":\"/usr/bin/bzexe\",\"sha256\":\"bd3ab362765b5313aef3bdd1845ef4743f33ce98ab970b045d872a2cb4536951\"},{\"command\":\"bzfgrep\",\"executable\":\"/usr/bin/bzgrep\",\"sha256\":\"3300749d903f145a8815c07fa1389dba04268fee1fec97ca1f01abf07ac5ee04\"},{\"command\":\"bzgrep\",\"executable\":\"/usr/bin/bzgrep\",\"sha256\":\"3300749d903f145a8815c07fa1389dba04268fee1fec97ca1f01abf07ac5ee04\"},{\"command\":\"bzip2\",\"executable\":\"/usr/bin/bzip2\",\"sha256\":\"909769e6f36ab54e52f1099d59aec0e8d2f27b8c53f95c63429f5c571e027ada\"},{\"command\":\"bzip2recover\",\"executable\":\"/usr/bin/bzip2recover\",\"sha256\":\"318476def50121abdc3c2a1092cd7c706660ecb9e15df180d47aa0d23bae45f1\"},{\"command\":\"bzless\",\"executable\":\"/usr/bin/bzmore\",\"sha256\":\"0e7ca63849eebc9ea476ea1fefab05e60b0ac8066f73c7d58e8ff607c941f212\"},{\"command\":\"bzmore\",\"executable\":\"/usr/bin/bzmore\",\"sha256\":\"0e7ca63849eebc9ea476ea1fefab05e60b0ac8066f73c7d58e8ff607c941f212\"},{\"command\":\"c++\",\"executable\":\"/usr/bin/x86_64-linux-gnu-g++-13\",\"sha256\":\"1353e9bdd29a7295c7226bf6c63abccce056d8cac31f112e5cdbecc3f28c2769\"},{\"command\":\"c++filt\",\"executable\":\"/usr/bin/x86_64-linux-gnu-c++filt\",\"sha256\":\"2c11b66c0fad24afc649517f890eaa8a6a4d4dceb1d613c5631bb96ff09352b4\"},{\"command\":\"c89\",\"executable\":\"/usr/bin/c89-gcc\",\"sha256\":\"999b40b67f690638f601d76b756d529dd40a4325f42dfd9fd2e629ad0a91947c\"},{\"command\":\"c89-gcc\",\"executable\":\"/usr/bin/c89-gcc\",\"sha256\":\"999b40b67f690638f601d76b756d529dd40a4325f42dfd9fd2e629ad0a91947c\"},{\"command\":\"c99\",\"executable\":\"/usr/bin/c99-gcc\",\"sha256\":\"5d3a3621b0f1272264a4d37e379300f2495aabef997eb12c2f8b48cf16d01366\"},{\"command\":\"c99-gcc\",\"executable\":\"/usr/bin/c99-gcc\",\"sha256\":\"5d3a3621b0f1272264a4d37e379300f2495aabef997eb12c2f8b48cf16d01366\"},{\"command\":\"c_rehash\",\"executable\":\"/usr/bin/c_rehash\",\"sha256\":\"e500ac3e4b1a18d117bd1c4b47f3e4f96584040b6ea4a484398fff7ddc3a7d12\"},{\"command\":\"captoinfo\",\"executable\":\"/usr/bin/tic\",\"sha256\":\"21bfaf468804f70b5f21d21d9a5e2bc9194427c5f63217c5dda4033e2c947b65\"},{\"command\":\"cargo\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"cargo-clippy\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"cargo-deny\",\"executable\":\"/usr/local/bin/cargo-deny\",\"sha256\":\"b329e25933d01c36dd7c47d84ea5716694f9b7caf53a5003d45674703a8ed54a\"},{\"command\":\"cargo-fmt\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"cargo-local-registry\",\"executable\":\"/usr/local/cargo/bin/cargo-local-registry\",\"sha256\":\"c659d390a43b9efc96bbc0da173d4245885f2046910c6ec3fa05b28c491c9662\"},{\"command\":\"cargo-miri\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"cat\",\"executable\":\"/usr/bin/cat\",\"sha256\":\"a63158e6e5bce20616425f5d61e5bd7374bb5bccf15bbb93ae2e40238248f179\"},{\"command\":\"cc\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-13\",\"sha256\":\"1b99826121ae6682a634e5efe09bd3e3df58ce58e0b28f849114ab5b89139c26\"},{\"command\":\"chage\",\"executable\":\"/usr/bin/chage\",\"sha256\":\"446bfaec4a2fbea1efc1144b71a2d2e905ee882caeae774202e9405ea9d7e3f7\"},{\"command\":\"chattr\",\"executable\":\"/usr/bin/chattr\",\"sha256\":\"b99f7278f6407a7a1119e344d2f4b6e4fb852c94181fd3b32ff6987c1db5e419\"},{\"command\":\"chcon\",\"executable\":\"/usr/bin/chcon\",\"sha256\":\"d149c337b2680d613be31603a674aa7d0db8265685946592cb7e70ec342e67a4\"},{\"command\":\"chfn\",\"executable\":\"/usr/bin/chfn\",\"sha256\":\"9d8e1c2f1c89f808206c65982fa058369de1af7be19ee325a2f3e95c48ab8052\"},{\"command\":\"chgrp\",\"executable\":\"/usr/bin/chgrp\",\"sha256\":\"65a307e4ba73f52b0775edb621072ee6f89d2ac40d4a0426547bab5aefd6626c\"},{\"command\":\"chmod\",\"executable\":\"/usr/bin/chmod\",\"sha256\":\"f7ba478ce7ff158ccd3ba01bac1c4231e68cbd490fe49b5562a6ea008a586696\"},{\"command\":\"choom\",\"executable\":\"/usr/bin/choom\",\"sha256\":\"3edf84555f818eca49a156babab2e969c0db76e866040c1ec715c9b22a432e0a\"},{\"command\":\"chown\",\"executable\":\"/usr/bin/chown\",\"sha256\":\"ec9a5923a49c9ea288cf5e5becddd9620232df940bd0b327528c4a9077b1aa9e\"},{\"command\":\"chrt\",\"executable\":\"/usr/bin/chrt\",\"sha256\":\"55eda4595995282487dd07a46eaa2b2d6bb83635baafcd1f06b1cdcecd351df0\"},{\"command\":\"chsh\",\"executable\":\"/usr/bin/chsh\",\"sha256\":\"d7aad828e159b1d570f643d2cbe44d551a5b9bc9b2870dab3fd5cbc5260e749d\"},{\"command\":\"cksum\",\"executable\":\"/usr/bin/cksum\",\"sha256\":\"8dfcb10877857084ff3571628066fce63d623de6960fac6ff3d39a04a679771a\"},{\"command\":\"clear\",\"executable\":\"/usr/bin/clear\",\"sha256\":\"4c6abc6a518b5b55188c06790bcb0be202ce8b57b23cfa688ea31b35a245d1ef\"},{\"command\":\"clear_console\",\"executable\":\"/usr/bin/clear_console\",\"sha256\":\"2c38afcdb060815f175ddab8049d6472be3e863da1489fca22025120aebc69a3\"},{\"command\":\"clippy-driver\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"cloudevents-sdk-conformance\",\"executable\":\"/usr/local/bin/cloudevents-sdk-conformance\",\"sha256\":\"9ad865a01c7ccb541255a2f89a2dbb34093c6ae3f57ce9e637eabf9edb146da0\"},{\"command\":\"cloudevents-validator\",\"executable\":\"/usr/local/bin/cloudevents-validator\",\"sha256\":\"0f25ac26370a32f0d61fb50fc25e9c6ac5357680306e8c6e60f8dddad4f54eae\"},{\"command\":\"cmp\",\"executable\":\"/usr/bin/cmp\",\"sha256\":\"e10750ef3db9bd3595d3cbb1e25bcfd6a964dc6aa0ba9561034067913ee1cc04\"},{\"command\":\"comm\",\"executable\":\"/usr/bin/comm\",\"sha256\":\"6964ffc36dc67a844661650a219d8479ad9d96b2947395a1f69ac32ec299a6d8\"},{\"command\":\"corelist\",\"executable\":\"/usr/bin/corelist\",\"sha256\":\"667bc0d6d8de3048ec84678355647805a9e1ecfc53169a780edbc49b5a0da7b5\"},{\"command\":\"corepack\",\"executable\":\"/usr/local/lib/node_modules/corepack/dist/corepack.js\",\"sha256\":\"3655bc798f300951f2070fee411b337d626b0c3ae80c2d24c46ccac4595d4bf9\"},{\"command\":\"cosign\",\"executable\":\"/usr/local/bin/cosign\",\"sha256\":\"4629c757b7618056f8ddd7e2625ae9fdd94c0372a65049520bc7d9df9efc7f71\"},{\"command\":\"cp\",\"executable\":\"/usr/bin/cp\",\"sha256\":\"6187dab32cd7b6291d96c54425a22915a6eeb39add6d95ee9008e1dbba427131\"},{\"command\":\"cpan\",\"executable\":\"/usr/bin/cpan\",\"sha256\":\"d4fba91c6370b8ef2c77850205d6e7eab6d8aeebd57993793fad9eff7720ea5e\"},{\"command\":\"cpan5.38-x86_64-linux-gnu\",\"executable\":\"/usr/bin/cpan5.38-x86_64-linux-gnu\",\"sha256\":\"5787995e7fce5d56543cc892a17f9f372849faa45dbb876ff4f2479d154b9c24\"},{\"command\":\"cpp\",\"executable\":\"/usr/bin/x86_64-linux-gnu-cpp-13\",\"sha256\":\"c48f8b1b5ab757134970d17bc2ecd889df0d1245463036e834ab9be9d5e40765\"},{\"command\":\"cpp-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-cpp-13\",\"sha256\":\"c48f8b1b5ab757134970d17bc2ecd889df0d1245463036e834ab9be9d5e40765\"},{\"command\":\"csplit\",\"executable\":\"/usr/bin/csplit\",\"sha256\":\"790c0505b6138a6d5df16daafdcbd756ae1a6881c56edeeb54ca204ca03e1307\"},{\"command\":\"curl\",\"executable\":\"/usr/bin/curl\",\"sha256\":\"459c937b69bd76620d6d01100a0793294349c89871f4474d398efdae49fcee09\"},{\"command\":\"cut\",\"executable\":\"/usr/bin/cut\",\"sha256\":\"94d1a3030de44ef8e4c2d157911b6246ae009d4eecaa52a072060c7070011b0e\"},{\"command\":\"dash\",\"executable\":\"/usr/bin/dash\",\"sha256\":\"86d31f6fb799e91fa21bad341484564510ca287703a16e9e46c53338776f4f42\"},{\"command\":\"date\",\"executable\":\"/usr/bin/date\",\"sha256\":\"225cf5c9122f922b8315538425bed7610853c853d6a2d2cfd89161b04f692367\"},{\"command\":\"dbus-cleanup-sockets\",\"executable\":\"/usr/bin/dbus-cleanup-sockets\",\"sha256\":\"405f671cd7a5029bf1c7d93d02a539e2845bfb6e3600fcfde2ecddb2d3c96f51\"},{\"command\":\"dbus-daemon\",\"executable\":\"/usr/bin/dbus-daemon\",\"sha256\":\"8c479f1fcddfd6693c736ce541da0955f6752834bdeeef4b928e27f5e974c247\"},{\"command\":\"dbus-monitor\",\"executable\":\"/usr/bin/dbus-monitor\",\"sha256\":\"04ec6be0688f5182b7d4814e61b37b51d9d0150fe1f5544aab66cfc47fd01142\"},{\"command\":\"dbus-run-session\",\"executable\":\"/usr/bin/dbus-run-session\",\"sha256\":\"72aace7d816ab450f09757034093e08b70cdff8f3cc43e4183dbcf0a845b6678\"},{\"command\":\"dbus-send\",\"executable\":\"/usr/bin/dbus-send\",\"sha256\":\"ae37b272dad147c4f47e55db7595bc2892867fe5f86b11349e9ab6caf71e3ffd\"},{\"command\":\"dbus-update-activation-environment\",\"executable\":\"/usr/bin/dbus-update-activation-environment\",\"sha256\":\"b2ea4143a672525321fbd77b864145320afae3a7eeff639f28027a10cc425bc8\"},{\"command\":\"dbus-uuidgen\",\"executable\":\"/usr/bin/dbus-uuidgen\",\"sha256\":\"abe42d54ae585d9802593a2150840b0ff10894744cc4c9d4ab08a0c40e3f6a03\"},{\"command\":\"dd\",\"executable\":\"/usr/bin/dd\",\"sha256\":\"dd07a1b0f236f221f71fac70103765286d1ccf29b747cbb24345d0c57a0311b6\"},{\"command\":\"deb-systemd-helper\",\"executable\":\"/usr/bin/deb-systemd-helper\",\"sha256\":\"a895d5f077651960b6ca4ed9c53f8b36eae422ae170f61c972d0c6579e9f8732\"},{\"command\":\"deb-systemd-invoke\",\"executable\":\"/usr/bin/deb-systemd-invoke\",\"sha256\":\"92eadae89f4df4cd6088f6316f5390b685faf8d0e312a4e5af3a507caaf81bdb\"},{\"command\":\"debconf\",\"executable\":\"/usr/bin/debconf\",\"sha256\":\"d5beef1820da2445e173c90ba14c535f566db12cd7de0cb3d4385a6aa4bcd8e3\"},{\"command\":\"debconf-apt-progress\",\"executable\":\"/usr/bin/debconf-apt-progress\",\"sha256\":\"ab24031d661b531961bab055a344c97d66ded2718c9a4c48ddbe0392273897e0\"},{\"command\":\"debconf-communicate\",\"executable\":\"/usr/bin/debconf-communicate\",\"sha256\":\"95dd9cc45752692e9288eed9abf9d0bbd22bb78ffe59a78cbfcbe96cffefbba5\"},{\"command\":\"debconf-copydb\",\"executable\":\"/usr/bin/debconf-copydb\",\"sha256\":\"02f27a04a3485f487e654051a4e72a806e9aff40ccf87934f896f59c29fd6db2\"},{\"command\":\"debconf-escape\",\"executable\":\"/usr/bin/debconf-escape\",\"sha256\":\"b1e81e2ac04c2a6c286514f2f410c57b9ac6188ed33ed558722f3bc252e93e87\"},{\"command\":\"debconf-set-selections\",\"executable\":\"/usr/bin/debconf-set-selections\",\"sha256\":\"1f32e8a3daba11364b8f4ca795e1fad83b688f02ab27df8066f5c552d1070f98\"},{\"command\":\"debconf-show\",\"executable\":\"/usr/bin/debconf-show\",\"sha256\":\"314fa1730e1efe15db17307848e7a53e450d0093009b6f1596cd3fe0ffec1b67\"},{\"command\":\"delpart\",\"executable\":\"/usr/bin/delpart\",\"sha256\":\"aae3b215df2a274e9fb04920f8e6b0cb5daa39bef48d7a3aff1ceb08bcdc22fd\"},{\"command\":\"devcontainer\",\"executable\":\"/opt/prismpm/devcontainer-cli/node_modules/@devcontainers/cli/devcontainer.js\",\"sha256\":\"e6df20af860208e00365d7b73f64d3940bad087ea8049de12223d1e7376522e3\"},{\"command\":\"devcontainer-validator\",\"executable\":\"/opt/prismpm/oracles/devcontainer-validator.mjs\",\"sha256\":\"05e99e6a92cf44ee2f91accef71823bd06ee92281db29089e8bb784ab4926b58\"},{\"command\":\"df\",\"executable\":\"/usr/bin/df\",\"sha256\":\"dc4d292126dd6a7a120fd5430132d2d94a305cf44ea7e76978b233f85d0ab52d\"},{\"command\":\"diff\",\"executable\":\"/usr/bin/diff\",\"sha256\":\"4d57f4cdb814475fb6fee307ef007fcb2fbc0f03d73a129356dcec4484b2a1fa\"},{\"command\":\"diff3\",\"executable\":\"/usr/bin/diff3\",\"sha256\":\"4a2ee59a65f7e1dffe16a784ac84610736efad041ca3f83cd9a29c8ae5bf9266\"},{\"command\":\"dir\",\"executable\":\"/usr/bin/dir\",\"sha256\":\"f00eaff8806cb730f51b5e5d847f601745956c5218785484739d56f7942ac115\"},{\"command\":\"dircolors\",\"executable\":\"/usr/bin/dircolors\",\"sha256\":\"9c59818814264282c269f2a0d065467aa88e751543b569101bae448e7897f445\"},{\"command\":\"dirmngr\",\"executable\":\"/usr/bin/dirmngr\",\"sha256\":\"1a1ef7127fa7450f29b8a0b56ef264f62e0ca7f183fcf5eb3cf6bfda01b1d84a\"},{\"command\":\"dirmngr-client\",\"executable\":\"/usr/bin/dirmngr-client\",\"sha256\":\"dfecb31d3331e14998b29399354c132227986bea292d42a5173b4ca94d41b614\"},{\"command\":\"dirname\",\"executable\":\"/usr/bin/dirname\",\"sha256\":\"5ed2ac7b191a3457d47a1c718397b819b04754174176c7cdd3c92faadab08055\"},{\"command\":\"dmesg\",\"executable\":\"/usr/bin/dmesg\",\"sha256\":\"d5fe030552da872ff86a42fb82abd6d9c6e7fba1a5897e1c3a9911bf98b70585\"},{\"command\":\"dnsdomainname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"071fec20458397874e6121589d5210e7eed22a1b1afe16c2b9970b8a8233cc5b\"},{\"command\":\"docker\",\"executable\":\"/usr/local/bin/docker\",\"sha256\":\"27f239f97492c434e091a70b41b8796c698f0aa2b6052c6f9c28da4ee7ae888b\"},{\"command\":\"docker-buildx\",\"executable\":\"/usr/local/libexec/docker/cli-plugins/docker-buildx\",\"sha256\":\"696bc104bac3bb708eff1af3f8bbc09fda0fd88f5757c1f9b404a35117889224\"},{\"command\":\"docker-compose\",\"executable\":\"/usr/local/libexec/docker/cli-plugins/docker-compose\",\"sha256\":\"837fd1d35bf6a494f41b5b5988269a7be79de337cf1a1a6ff0e45ab51bb4e9be\"},{\"command\":\"domainname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"071fec20458397874e6121589d5210e7eed22a1b1afe16c2b9970b8a8233cc5b\"},{\"command\":\"dpkg\",\"executable\":\"/usr/bin/dpkg\",\"sha256\":\"567180a568ad6af680314fdcb4d963246985e682b28a9e8fafed8b09abbd50af\"},{\"command\":\"dpkg-architecture\",\"executable\":\"/usr/bin/dpkg-architecture\",\"sha256\":\"ce16700da9905ac300963e09e9716004c8c35c780b06d108de8b9c93d6ddbbaf\"},{\"command\":\"dpkg-buildapi\",\"executable\":\"/usr/bin/dpkg-buildapi\",\"sha256\":\"69d8be5bc1d2e8b17fc6096912b07b72bcda3759de2301062c2fa5a0aa9e842d\"},{\"command\":\"dpkg-buildflags\",\"executable\":\"/usr/bin/dpkg-buildflags\",\"sha256\":\"4a363aa71affdea49cf5fc894783f3ff13ed66fcfe75646a82809ca7607e953a\"},{\"command\":\"dpkg-buildpackage\",\"executable\":\"/usr/bin/dpkg-buildpackage\",\"sha256\":\"f1a04680031ada877a331bf744aea7ed1cb32ebac24914c7d0b9f5a0267b0d1d\"},{\"command\":\"dpkg-buildtree\",\"executable\":\"/usr/bin/dpkg-buildtree\",\"sha256\":\"9befe7704c770ee771fa90e6dd80d86b191d5a92ee3623eec4e1cd938275e941\"},{\"command\":\"dpkg-checkbuilddeps\",\"executable\":\"/usr/bin/dpkg-checkbuilddeps\",\"sha256\":\"869d51a380a2f7e438af8f836b20ac0232f1a5b45f156ca51955f130cb2c28fa\"},{\"command\":\"dpkg-deb\",\"executable\":\"/usr/bin/dpkg-deb\",\"sha256\":\"fc9dde782ca8309b65ab92e61d13318bf463cd1aa71daa8967b87b81b48b63d2\"},{\"command\":\"dpkg-distaddfile\",\"executable\":\"/usr/bin/dpkg-distaddfile\",\"sha256\":\"48a66e608a612ee9948c0c0dc34db41b9fd62bc3fd658a7ceb8d362563a90e13\"},{\"command\":\"dpkg-divert\",\"executable\":\"/usr/bin/dpkg-divert\",\"sha256\":\"2895ba92403c074bb1e3025bcb2b3c963eee9e4318a06933c256a0e099d1b178\"},{\"command\":\"dpkg-genbuildinfo\",\"executable\":\"/usr/bin/dpkg-genbuildinfo\",\"sha256\":\"ea892fe9ccde89d43d3ab990a00a098cafc0826251973f2eebb01464aa067cf0\"},{\"command\":\"dpkg-genchanges\",\"executable\":\"/usr/bin/dpkg-genchanges\",\"sha256\":\"4b3688a9e0c011c5ecebf9cdf6a80cc5ffd49ce8a05c4d93e671c73527e4a5cd\"},{\"command\":\"dpkg-gencontrol\",\"executable\":\"/usr/bin/dpkg-gencontrol\",\"sha256\":\"21a07292d7f2b969c1746163044adbce7fd48762dfa1b4619d3300af274d0235\"},{\"command\":\"dpkg-gensymbols\",\"executable\":\"/usr/bin/dpkg-gensymbols\",\"sha256\":\"2a7cbc5ff261e22282da62ff54b293e40c6aeccd1f89faace7f40ac6d443d6b6\"},{\"command\":\"dpkg-maintscript-helper\",\"executable\":\"/usr/bin/dpkg-maintscript-helper\",\"sha256\":\"c1ebe2d1281240872a38dd16dcaea57d48a66978f500eeeca58689ae006ca342\"},{\"command\":\"dpkg-mergechangelogs\",\"executable\":\"/usr/bin/dpkg-mergechangelogs\",\"sha256\":\"72d5bb1f9c93730cf1a67e1d93065b7582a9ef3ff9013d89e07071f47fba13e5\"},{\"command\":\"dpkg-name\",\"executable\":\"/usr/bin/dpkg-name\",\"sha256\":\"35019db2113124b0d3db3b44f02615e3ec2be6f365f9986d913c0596930d62f5\"},{\"command\":\"dpkg-parsechangelog\",\"executable\":\"/usr/bin/dpkg-parsechangelog\",\"sha256\":\"1240425d626ff7b28de7022a09222e6f4b88c66c0d481776eea69006c0e22bd4\"},{\"command\":\"dpkg-query\",\"executable\":\"/usr/bin/dpkg-query\",\"sha256\":\"cc2a19017c37132e4ad46c1fbddea6472262d0a62a0b8585c383706c20005ea1\"},{\"command\":\"dpkg-realpath\",\"executable\":\"/usr/bin/dpkg-realpath\",\"sha256\":\"209be6ae092e387589b11752c165e943f0c8d6e940694025d5cd41df4cb49642\"},{\"command\":\"dpkg-scanpackages\",\"executable\":\"/usr/bin/dpkg-scanpackages\",\"sha256\":\"6f2a4e932d7cc8dc1c3010541297adddd09a96c3460f87b6edbde3203679d848\"},{\"command\":\"dpkg-scansources\",\"executable\":\"/usr/bin/dpkg-scansources\",\"sha256\":\"d91bb4217786e327e16f62185daf9632c8e04f5be8d251d90f00b9945b905006\"},{\"command\":\"dpkg-shlibdeps\",\"executable\":\"/usr/bin/dpkg-shlibdeps\",\"sha256\":\"06d7129cf40b0186dfa961f277e79664970d9f9207ae23ab11f8135aef488b02\"},{\"command\":\"dpkg-source\",\"executable\":\"/usr/bin/dpkg-source\",\"sha256\":\"785b2ef79335db87fef3447181503007171b4dfb8f9cbfc52236e6b84847e634\"},{\"command\":\"dpkg-split\",\"executable\":\"/usr/bin/dpkg-split\",\"sha256\":\"b980def0e688879e50b2f25b0dad46a580ef91ec45e8134375cd2794456c433a\"},{\"command\":\"dpkg-statoverride\",\"executable\":\"/usr/bin/dpkg-statoverride\",\"sha256\":\"8ccbfb7966965707cd63fa5882069748ace02d55893b9f5b9b0117c80d073460\"},{\"command\":\"dpkg-trigger\",\"executable\":\"/usr/bin/dpkg-trigger\",\"sha256\":\"5cb022a70fd507b5f13690956eec46a074c09a1411ce0828067f21cd5b39b8b5\"},{\"command\":\"dpkg-vendor\",\"executable\":\"/usr/bin/dpkg-vendor\",\"sha256\":\"603e32f2d611f57b240005c3faca99eaf8c91c63e191bb76f3d9567acb82bebc\"},{\"command\":\"du\",\"executable\":\"/usr/bin/du\",\"sha256\":\"860235f0294d9c2185140f4ebab8301d5db8357fb195f7b79ad3b94b495763c7\"},{\"command\":\"dwp\",\"executable\":\"/usr/bin/x86_64-linux-gnu-dwp\",\"sha256\":\"b4c1bbd491718b74d93a384297728a8c242c62cd040187adc78355b736548553\"},{\"command\":\"echo\",\"executable\":\"/usr/bin/echo\",\"sha256\":\"a972bc0383f4a66cdfdfd1a3bb885a6b1dd93f46c999d4adc505ab127dc0ddff\"},{\"command\":\"egrep\",\"executable\":\"/usr/bin/egrep\",\"sha256\":\"10caa507f39367738ca977a5f2014406159064b072dbade0c0c23a40597f66da\"},{\"command\":\"elan\",\"executable\":\"/usr/local/elan/bin/elan\",\"sha256\":\"840179e70803ef373c2ec53342d6a45ea7d022533e4145489fc1278b4f716385\"},{\"command\":\"elfedit\",\"executable\":\"/usr/bin/x86_64-linux-gnu-elfedit\",\"sha256\":\"c246c9722b60da558f104f8c517c760401bf995c9d4916954c0055a45e8bdb03\"},{\"command\":\"enc2xs\",\"executable\":\"/usr/bin/enc2xs\",\"sha256\":\"9005200ebb19c0328ac671d9a9f72702dd7c3015112878565ffd30f1671bff5d\"},{\"command\":\"encguess\",\"executable\":\"/usr/bin/encguess\",\"sha256\":\"f616952ea1c19fd8159c5a4d25cae587bed2c5cfd45df2b238da88cf7595dc21\"},{\"command\":\"env\",\"executable\":\"/usr/bin/env\",\"sha256\":\"0aefff8f912fb75716c5d4de3b6acde93edbe8fa280fc8ee895c1226d3e373ef\"},{\"command\":\"expand\",\"executable\":\"/usr/bin/expand\",\"sha256\":\"590811afeafed6e2259931195488a13cdcc200ae9abaa3f20da654802ed901da\"},{\"command\":\"expiry\",\"executable\":\"/usr/bin/expiry\",\"sha256\":\"3b60060b2eb7d44ebbab429063e8250ceaf540bf3af36d5ad02c1ba12ca203e2\"},{\"command\":\"expr\",\"executable\":\"/usr/bin/expr\",\"sha256\":\"a20cc40a1cee2970ceabe24586aa3105b494c2a3fec7a91ffc639761020794f4\"},{\"command\":\"factor\",\"executable\":\"/usr/bin/factor\",\"sha256\":\"856738579d66f758f4c9f1c5e3bb2aa4a75be4bbd6866835600ebb33109a744f\"},{\"command\":\"faillog\",\"executable\":\"/usr/bin/faillog\",\"sha256\":\"52277173f0f308a2c63fabfa3f826c6ee1acddac032a5c5c87fcf22b7d6e757e\"},{\"command\":\"fallocate\",\"executable\":\"/usr/bin/fallocate\",\"sha256\":\"ccd7a867766e25f931d6e5cf07a8fd0fb0c9d4baa03c4af4be44f3b41756757a\"},{\"command\":\"false\",\"executable\":\"/usr/bin/false\",\"sha256\":\"68d5dd3517b8fb324b5fbdc365add3c821380e173a951f6632d4b2d6ecb04fd4\"},{\"command\":\"fc-cache\",\"executable\":\"/usr/bin/fc-cache\",\"sha256\":\"39b1208fc5ca3c1adcfb117a2a9052632ce9043bf2ad248bacd3a32cfed9d990\"},{\"command\":\"fc-cat\",\"executable\":\"/usr/bin/fc-cat\",\"sha256\":\"b2e9f6529aa8c37ecd0e0c26b17848a8262840ef9de2dff9da63f3c63ee4ea68\"},{\"command\":\"fc-conflist\",\"executable\":\"/usr/bin/fc-conflist\",\"sha256\":\"367ca2605b0e72750ceb22cdce7fcb4664357ac9f4b97d91000bb93b13b172ab\"},{\"command\":\"fc-list\",\"executable\":\"/usr/bin/fc-list\",\"sha256\":\"6ba4c9975e6c4a933627e223b15eb99a6f88b958ea38b33427b0ace1f8ac06a7\"},{\"command\":\"fc-match\",\"executable\":\"/usr/bin/fc-match\",\"sha256\":\"2e0846b0186dedaa7a626267093d668e24f2d7846a877f316de5c90301484780\"},{\"command\":\"fc-pattern\",\"executable\":\"/usr/bin/fc-pattern\",\"sha256\":\"73d980eee3f05486e135773942c6cc83a990a2fe358ed566f58b0f5e9d633cd4\"},{\"command\":\"fc-query\",\"executable\":\"/usr/bin/fc-query\",\"sha256\":\"9aae9d3ced20be02e643c47cb026bbf43560d7443675adbc19051d068a621409\"},{\"command\":\"fc-scan\",\"executable\":\"/usr/bin/fc-scan\",\"sha256\":\"ecdae5d94ef9b5b51151f78b14c1ce2ff2cf136111c99f62ebf100cb7a383034\"},{\"command\":\"fc-validate\",\"executable\":\"/usr/bin/fc-validate\",\"sha256\":\"7f9397efdf892811f7f683f599032f6d53fd377449aa16920b76d926f98d8957\"},{\"command\":\"fgrep\",\"executable\":\"/usr/bin/fgrep\",\"sha256\":\"f1bdb63da98989d55e56cef651139f70448d4c8f6ea40bb02610be439e29bf0c\"},{\"command\":\"find\",\"executable\":\"/usr/bin/find\",\"sha256\":\"ac1ea1c5391de921aca1572f1bf25d03707beb3887b27c16a5b4948fd553941b\"},{\"command\":\"findmnt\",\"executable\":\"/usr/bin/findmnt\",\"sha256\":\"bb2f0ce5dfffc24cf965c67686c6e8bcc0383161800dfca661fc490dc9c1a63e\"},{\"command\":\"flock\",\"executable\":\"/usr/bin/flock\",\"sha256\":\"487fc764723f08f70a630c517b6847165efab683d42a62f03956320a150cf801\"},{\"command\":\"fmt\",\"executable\":\"/usr/bin/fmt\",\"sha256\":\"e637c18ac7f91480679d8ac9b64251aee05aaa8b4db9667790fb95906b802c2e\"},{\"command\":\"fold\",\"executable\":\"/usr/bin/fold\",\"sha256\":\"2164255fe616c618c74bfa102f5bb5e77c94ac8ca9505456e9f718b2d6524dd2\"},{\"command\":\"fonttosfnt\",\"executable\":\"/usr/bin/fonttosfnt\",\"sha256\":\"a1e9ced3dc34e413a74a3615b47581097702b868dc9a73fe4f046ea6992ae9cb\"},{\"command\":\"free\",\"executable\":\"/usr/bin/free\",\"sha256\":\"3e311eafe7057e69c5e528a7ff7a0aeb7110d60a173eba7f3dfb3d09e5456adf\"},{\"command\":\"g++\",\"executable\":\"/usr/bin/x86_64-linux-gnu-g++-13\",\"sha256\":\"1353e9bdd29a7295c7226bf6c63abccce056d8cac31f112e5cdbecc3f28c2769\"},{\"command\":\"g++-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-g++-13\",\"sha256\":\"1353e9bdd29a7295c7226bf6c63abccce056d8cac31f112e5cdbecc3f28c2769\"},{\"command\":\"gcc\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-13\",\"sha256\":\"1b99826121ae6682a634e5efe09bd3e3df58ce58e0b28f849114ab5b89139c26\"},{\"command\":\"gcc-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-13\",\"sha256\":\"1b99826121ae6682a634e5efe09bd3e3df58ce58e0b28f849114ab5b89139c26\"},{\"command\":\"gcc-ar\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-ar-13\",\"sha256\":\"b980c6ffedb8ceb443f2a95bd3c935a4d6aba09fa05da66864cbcaf2ec79f5c3\"},{\"command\":\"gcc-ar-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-ar-13\",\"sha256\":\"b980c6ffedb8ceb443f2a95bd3c935a4d6aba09fa05da66864cbcaf2ec79f5c3\"},{\"command\":\"gcc-nm\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-nm-13\",\"sha256\":\"b7149256b3cb154a1670c0b17ac8d2c4a7cfa03180ccdef3a4cc5183dd9f1688\"},{\"command\":\"gcc-nm-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-nm-13\",\"sha256\":\"b7149256b3cb154a1670c0b17ac8d2c4a7cfa03180ccdef3a4cc5183dd9f1688\"},{\"command\":\"gcc-ranlib\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-ranlib-13\",\"sha256\":\"c685333bc0ce5a0b432a2263184b378c4182a897e2239091adffac5c965baad1\"},{\"command\":\"gcc-ranlib-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-ranlib-13\",\"sha256\":\"c685333bc0ce5a0b432a2263184b378c4182a897e2239091adffac5c965baad1\"},{\"command\":\"gcov\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-13\",\"sha256\":\"d6298eb8f6da8a5ab277498aac6e5c7695c4d0119d4b0c54285dd8bcf0f58e42\"},{\"command\":\"gcov-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-13\",\"sha256\":\"d6298eb8f6da8a5ab277498aac6e5c7695c4d0119d4b0c54285dd8bcf0f58e42\"},{\"command\":\"gcov-dump\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-dump-13\",\"sha256\":\"13b1027b23cd99ae477ee65495053f091fdbc906135d5b00b86273a8541035b9\"},{\"command\":\"gcov-dump-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-dump-13\",\"sha256\":\"13b1027b23cd99ae477ee65495053f091fdbc906135d5b00b86273a8541035b9\"},{\"command\":\"gcov-tool\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-tool-13\",\"sha256\":\"6b85d6f4b85ed0de1db931e73b957cd79cd95076357d957018d6906306fb213b\"},{\"command\":\"gcov-tool-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-tool-13\",\"sha256\":\"6b85d6f4b85ed0de1db931e73b957cd79cd95076357d957018d6906306fb213b\"},{\"command\":\"gencat\",\"executable\":\"/usr/bin/gencat\",\"sha256\":\"d97c642cdd43861f9f67024c131ca98b65fb91f1d117b0b844170fd06900ce41\"},{\"command\":\"getconf\",\"executable\":\"/usr/bin/getconf\",\"sha256\":\"eb67cc617bc544d1b0149babb88a49cb6acebdf71c729825503c4289765f2297\"},{\"command\":\"getent\",\"executable\":\"/usr/bin/getent\",\"sha256\":\"796d0343a6583c93b64172cb0647412c9e0ede60c77ffd19491ce6c339e1c337\"},{\"command\":\"getopt\",\"executable\":\"/usr/bin/getopt\",\"sha256\":\"7b5a203bc9de7d924273fd7f60afd85e3013eaa6549222d43015fe0614d268f4\"},{\"command\":\"git\",\"executable\":\"/usr/bin/git\",\"sha256\":\"2a8c18fbf43da9f692d75474c72bea9dfd796c260b0f3dfe456376abc3bbd668\"},{\"command\":\"git-receive-pack\",\"executable\":\"/usr/bin/git\",\"sha256\":\"2a8c18fbf43da9f692d75474c72bea9dfd796c260b0f3dfe456376abc3bbd668\"},{\"command\":\"git-shell\",\"executable\":\"/usr/bin/git-shell\",\"sha256\":\"24224cc6bb2ef420e0d1073b88c726664098f692167b164a79f82b39496ec190\"},{\"command\":\"git-signature-validator\",\"executable\":\"/opt/prismpm/oracles/git-signature-validator.mjs\",\"sha256\":\"e940cf45ddbf10b21b6e29d64c70390ade3857eb8cd08cd28c9cec36c78c52a9\"},{\"command\":\"git-upload-archive\",\"executable\":\"/usr/bin/git\",\"sha256\":\"2a8c18fbf43da9f692d75474c72bea9dfd796c260b0f3dfe456376abc3bbd668\"},{\"command\":\"git-upload-pack\",\"executable\":\"/usr/bin/git\",\"sha256\":\"2a8c18fbf43da9f692d75474c72bea9dfd796c260b0f3dfe456376abc3bbd668\"},{\"command\":\"gmake\",\"executable\":\"/usr/bin/make\",\"sha256\":\"d78b8f1d099fbcfb6f2f49ab87223b9b68fb3956642f92d6ec6de812e8afa965\"},{\"command\":\"gold\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ld.gold\",\"sha256\":\"1083eca2c464601fae4b561b1c240e7f787543261891229eebe0b112801c1e13\"},{\"command\":\"gp-archive\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-archive\",\"sha256\":\"c3264d9d4b4ce229bcbac43db09e16b57cae242226b449b7327637fe0660c6fb\"},{\"command\":\"gp-collect-app\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-collect-app\",\"sha256\":\"1b12058e818536a7c9febf81d621acf182d261f8464b1aee5d745be5dfcfa2b2\"},{\"command\":\"gp-display-html\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-display-html\",\"sha256\":\"538acc2bcc24a50de51e88b2d733d50b69237ebfee14660e45a0255215d9f582\"},{\"command\":\"gp-display-src\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-display-src\",\"sha256\":\"ba224f01f3c51400529841b905bcf69ec8087b1cf9d2c96ed062d8b43984c6d8\"},{\"command\":\"gp-display-text\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-display-text\",\"sha256\":\"2d7e0d598c873dc2b7735edc49309b7fab9db821cbb749b5ab8d62d1b9b66112\"},{\"command\":\"gpasswd\",\"executable\":\"/usr/bin/gpasswd\",\"sha256\":\"b9ef1bde0bde1b6839a0f55d43a606645723436932f072e3bf71e4c1a0ed4c06\"},{\"command\":\"gpg\",\"executable\":\"/usr/bin/gpg\",\"sha256\":\"7ecb1341104b0ee1107fe908abce37e24546de1db0848b29c75f59f72094f4e8\"},{\"command\":\"gpg-agent\",\"executable\":\"/usr/bin/gpg-agent\",\"sha256\":\"68f28ae019b62d6c08fac50ec3cc456f102918ab1d8ecd6bffd7f9771c297dc2\"},{\"command\":\"gpg-connect-agent\",\"executable\":\"/usr/bin/gpg-connect-agent\",\"sha256\":\"7f51064f399016e6be442dad17feedbe45b3587267bc7365d8c6d7f482d9fc08\"},{\"command\":\"gpgconf\",\"executable\":\"/usr/bin/gpgconf\",\"sha256\":\"58a25b1b169b1467ab395ae2011a462fae70b41f3f7c080cec8940e85f85b8c8\"},{\"command\":\"gpgv\",\"executable\":\"/usr/bin/gpgv\",\"sha256\":\"097b577cdf8b51dcc1fb42417d5ef3ca2e22b36a8ad16c9df4bd083a38fe476c\"},{\"command\":\"gprof\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gprof\",\"sha256\":\"71796a26dca3349994b73462bfb49980c05d6181f62c42d6e2c97aed1108a5a0\"},{\"command\":\"gprofng\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gprofng\",\"sha256\":\"91e03573aeedded12a3b80e96ba28316968a8a86af78f0434cd7e87b7691df62\"},{\"command\":\"grep\",\"executable\":\"/usr/bin/grep\",\"sha256\":\"20a35a4c18f2fe9e6305c1cbf866b9c0fcc3f957132ae66028c99ec353bb0a80\"},{\"command\":\"groups\",\"executable\":\"/usr/bin/groups\",\"sha256\":\"788b929ab3b2137d377ab4bcb0cbacad117be3c36f6bdc1e44f37e14f411b75d\"},{\"command\":\"gtk-update-icon-cache\",\"executable\":\"/usr/bin/gtk-update-icon-cache\",\"sha256\":\"2bf836f48971e8a0e64fdad5bfd9aea065f8b80dbb1c5f6dbeab7715344fa102\"},{\"command\":\"gunzip\",\"executable\":\"/usr/bin/gunzip\",\"sha256\":\"55c2f67ca4c3cca0ebac659f0075461dd671ec4937ecd6c71123bb49ed322ebd\"},{\"command\":\"gzexe\",\"executable\":\"/usr/bin/gzexe\",\"sha256\":\"ec1bf1611079caf2a981b570453d4b8b5b4a1efb20dd32138f393eb994b70fea\"},{\"command\":\"gzip\",\"executable\":\"/usr/bin/gzip\",\"sha256\":\"16f1f8dbe5b47b3c1160b9066bd15bfdd80548b1b878b1a025c462fec0ca02b1\"},{\"command\":\"h2ph\",\"executable\":\"/usr/bin/h2ph\",\"sha256\":\"86c19c01835bba602e1e954e48b69846286c9deaf453ea30d63d72190832bdb0\"},{\"command\":\"h2xs\",\"executable\":\"/usr/bin/h2xs\",\"sha256\":\"7292e1d2b1bcef2a1b05ce8bae00b2651e5f115b5aff07272b1fafbdad9e723f\"},{\"command\":\"hardlink\",\"executable\":\"/usr/bin/hardlink\",\"sha256\":\"7b31350bcd5a5db793791f8053780bfdf8043e9a66d5d405d140ce97f9cf510f\"},{\"command\":\"head\",\"executable\":\"/usr/bin/head\",\"sha256\":\"bba6734ebc053fef547ec4a0bcd824011e80c81f8a67f5b83b0fccf7617ce959\"},{\"command\":\"hostid\",\"executable\":\"/usr/bin/hostid\",\"sha256\":\"a340a79bfa61b7bd916f1e48e2a7883083b913cc932e5f105914c55dc9277a0d\"},{\"command\":\"hostname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"071fec20458397874e6121589d5210e7eed22a1b1afe16c2b9970b8a8233cc5b\"},{\"command\":\"hostnamectl\",\"executable\":\"/usr/bin/hostnamectl\",\"sha256\":\"91e2a28b79a21ee03257eeff5197e2042ab5330a108076debd63b2de334b81b8\"},{\"command\":\"i386\",\"executable\":\"/usr/bin/setarch\",\"sha256\":\"9cbf126e4a5a2847313b38c766a6d52110bd31a2f90de871bc618166a046e624\"},{\"command\":\"iconv\",\"executable\":\"/usr/bin/iconv\",\"sha256\":\"68840ad3205da948377709f5643934219a752cb8c8360561aca4cb6059aa2046\"},{\"command\":\"id\",\"executable\":\"/usr/bin/id\",\"sha256\":\"9f2e8d80e1c357b889e1b827566e882411ddc6ff45a70196e808f00e62a6c7c5\"},{\"command\":\"infocmp\",\"executable\":\"/usr/bin/infocmp\",\"sha256\":\"6498eed15395c9a0af3547ab73ac3bfbfc9271c245968846ba35e75c607b5f41\"},{\"command\":\"infotocap\",\"executable\":\"/usr/bin/tic\",\"sha256\":\"21bfaf468804f70b5f21d21d9a5e2bc9194427c5f63217c5dda4033e2c947b65\"},{\"command\":\"install\",\"executable\":\"/usr/bin/install\",\"sha256\":\"0e328ae109217200da3207ece12514b867d44fb90b444958b4d64b6007736f33\"},{\"command\":\"instmodsh\",\"executable\":\"/usr/bin/instmodsh\",\"sha256\":\"724aba7a26b1ba4f83af264e7bb31334aee0b56897b41d09c9dfd0b3389d6965\"},{\"command\":\"intoto-statement-validator\",\"executable\":\"/usr/local/bin/intoto-statement-validator\",\"sha256\":\"591f463460916feef9ac066f38654ab6be819dccc66738088d7b264ae2e44d79\"},{\"command\":\"ionice\",\"executable\":\"/usr/bin/ionice\",\"sha256\":\"c4315c8f9cd5b5a3e6d40114966f04d22982a2d2d1955292ff2e2bdfaaab3507\"},{\"command\":\"ipcmk\",\"executable\":\"/usr/bin/ipcmk\",\"sha256\":\"1e88d9451520a394fa98418d715cf9f79588413f6de9875fe6b4d77b5faeb332\"},{\"command\":\"ipcrm\",\"executable\":\"/usr/bin/ipcrm\",\"sha256\":\"bbe03923ce263085fb47d83f55fea39454f7c0c5a25ff0444aa193ce0b132e05\"},{\"command\":\"ipcs\",\"executable\":\"/usr/bin/ipcs\",\"sha256\":\"dc8b5c25ac18cea6b37a7d28b03b27b477516fb6379d836c7d88165827aaa50f\"},{\"command\":\"ischroot\",\"executable\":\"/usr/bin/ischroot\",\"sha256\":\"115afdea031142fd734509138abf8a212636f6d4dac049cbe60651d700a4fe91\"},{\"command\":\"ispell-wrapper\",\"executable\":\"/usr/bin/ispell-wrapper\",\"sha256\":\"11ff62f305a09f52885315cb5dd295e5a47861accc596ebe818751022eb95c7f\"},{\"command\":\"join\",\"executable\":\"/usr/bin/join\",\"sha256\":\"ee519cff640a08b92af041a787300799152368d0ba365fe21f42d36764b61b40\"},{\"command\":\"journalctl\",\"executable\":\"/usr/bin/journalctl\",\"sha256\":\"c49bd25d7e7655b9a44ff867923952ed5a5e0a65e9df7a0510e239bf0558e3fa\"},{\"command\":\"json_pp\",\"executable\":\"/usr/bin/json_pp\",\"sha256\":\"b336e50dc789c31cbd7b0f467d05e0d91188d06c7c27aa4009b904af8c6a4091\"},{\"command\":\"just\",\"executable\":\"/usr/local/bin/just\",\"sha256\":\"8545d0880e84bbd6c9d6a5dc2681df2a6315455bc2a2f1d7bca52085d6adb8e3\"},{\"command\":\"kernel-install\",\"executable\":\"/usr/bin/kernel-install\",\"sha256\":\"fbdf4f0b53b1ccbe622d544b70f2cbe8a59ef007ac7a12680aa26bb88ecd383e\"},{\"command\":\"kill\",\"executable\":\"/usr/bin/kill\",\"sha256\":\"65ce2f8116bbafd0e82875d126d811d051a7aff3d0e732412c1fac9055f766dc\"},{\"command\":\"kind\",\"executable\":\"/usr/local/bin/kind\",\"sha256\":\"eb244cbafcc157dff60cf68693c14c9a75c4e6e6fedaf9cd71c58117cb93e3fa\"},{\"command\":\"kubectl\",\"executable\":\"/usr/local/bin/kubectl\",\"sha256\":\"8b8f088da2dab964f853b38464033b1be15ede2839eca751482357c45abdd05a\"},{\"command\":\"kubernetes-validator\",\"executable\":\"/opt/prismpm/oracles/kubernetes-validator.mjs\",\"sha256\":\"3c2555117a2fe092fc9260dc2672edaac415d36bd16e1edbbe32af847f92e737\"},{\"command\":\"lake\",\"executable\":\"/usr/local/elan/bin/lake\",\"sha256\":\"840179e70803ef373c2ec53342d6a45ea7d022533e4145489fc1278b4f716385\"},{\"command\":\"last\",\"executable\":\"/usr/bin/last\",\"sha256\":\"04be4a5a7b8ea3b8824d150a121b9cdc353e92fae093bcb9b52628a776e79df6\"},{\"command\":\"lastb\",\"executable\":\"/usr/bin/last\",\"sha256\":\"04be4a5a7b8ea3b8824d150a121b9cdc353e92fae093bcb9b52628a776e79df6\"},{\"command\":\"lastlog\",\"executable\":\"/usr/bin/lastlog\",\"sha256\":\"43fedab5ff553697d233a7644466eeb89a519ae9d824f4849c57841e30bb74b6\"},{\"command\":\"ld\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ld.bfd\",\"sha256\":\"e9ceb054c12207970f2726dfc07e9a66b411602748628baf27399f02a9bbb31b\"},{\"command\":\"ld.bfd\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ld.bfd\",\"sha256\":\"e9ceb054c12207970f2726dfc07e9a66b411602748628baf27399f02a9bbb31b\"},{\"command\":\"ld.gold\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ld.gold\",\"sha256\":\"1083eca2c464601fae4b561b1c240e7f787543261891229eebe0b112801c1e13\"},{\"command\":\"ld.so\",\"executable\":\"/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2\",\"sha256\":\"cd4df4f3c7b83673d61189bf2eaebd33ca4f2853ab9772b8a25e025ef99b1e81\"},{\"command\":\"ldd\",\"executable\":\"/usr/bin/ldd\",\"sha256\":\"4f1d37e25f27535e3f02a5b7da63e1ce18d4982445db2c25fc8f985a3d395cc3\"},{\"command\":\"lean\",\"executable\":\"/usr/local/elan/bin/lean\",\"sha256\":\"840179e70803ef373c2ec53342d6a45ea7d022533e4145489fc1278b4f716385\"},{\"command\":\"leanc\",\"executable\":\"/usr/local/elan/bin/leanc\",\"sha256\":\"840179e70803ef373c2ec53342d6a45ea7d022533e4145489fc1278b4f716385\"},{\"command\":\"leanchecker\",\"executable\":\"/usr/local/elan/bin/leanchecker\",\"sha256\":\"840179e70803ef373c2ec53342d6a45ea7d022533e4145489fc1278b4f716385\"},{\"command\":\"leanmake\",\"executable\":\"/usr/local/elan/bin/leanmake\",\"sha256\":\"840179e70803ef373c2ec53342d6a45ea7d022533e4145489fc1278b4f716385\"},{\"command\":\"leanpkg\",\"executable\":\"/usr/local/elan/bin/leanpkg\",\"sha256\":\"840179e70803ef373c2ec53342d6a45ea7d022533e4145489fc1278b4f716385\"},{\"command\":\"lexlean\",\"executable\":\"/usr/local/bin/lexlean\",\"sha256\":\"e4168b533d3369e7e0e2ed7cdb331f8dd94e3aa20362d55ded086a24ca3b16f8\"},{\"command\":\"libnetcfg\",\"executable\":\"/usr/bin/libnetcfg\",\"sha256\":\"78bab79d103416b08a51e070bf599101a897f3753ff729bd3bafd4068f5b2564\"},{\"command\":\"link\",\"executable\":\"/usr/bin/link\",\"sha256\":\"c00e17d1a1c8ee984da9177294c1ba2983dc8c12228a92e0af58f58badd02918\"},{\"command\":\"linux32\",\"executable\":\"/usr/bin/setarch\",\"sha256\":\"9cbf126e4a5a2847313b38c766a6d52110bd31a2f90de871bc618166a046e624\"},{\"command\":\"linux64\",\"executable\":\"/usr/bin/setarch\",\"sha256\":\"9cbf126e4a5a2847313b38c766a6d52110bd31a2f90de871bc618166a046e624\"},{\"command\":\"ln\",\"executable\":\"/usr/bin/ln\",\"sha256\":\"0fa5580b6604a3a26f14f3713725d661f39d35036701b603908700e58cf2cc7f\"},{\"command\":\"locale\",\"executable\":\"/usr/bin/locale\",\"sha256\":\"9ed92f61737558cdbe4c40386a6c275b698af16711ba2a023e3917de3e887e46\"},{\"command\":\"locale-check\",\"executable\":\"/usr/bin/locale-check\",\"sha256\":\"d2790fcfc566e13166e935d97506f43cd7454ab6310a1f4d8fd3d39a40c20eda\"},{\"command\":\"localectl\",\"executable\":\"/usr/bin/localectl\",\"sha256\":\"8c1804507946e72c6dcec417e09eb7b41422e95e4b026fa759f7e44606cabb32\"},{\"command\":\"localedef\",\"executable\":\"/usr/bin/localedef\",\"sha256\":\"159102a8c64948670b9f5bff8eb427e22de15ab3dc23105bac94e3832b766602\"},{\"command\":\"logger\",\"executable\":\"/usr/bin/logger\",\"sha256\":\"23f3041b898ea6dfe4b06957e04c382a7656f3daac77b1b87fd6592cb43123dd\"},{\"command\":\"login\",\"executable\":\"/usr/bin/login\",\"sha256\":\"68e37d7a53aa5d5db142ca0fd5cc80558e57b2d0dab042264f6e0b3a2ac5e10c\"},{\"command\":\"loginctl\",\"executable\":\"/usr/bin/loginctl\",\"sha256\":\"0b8fa7d357c9d26967d53221e10303b45b003ed6389a3a4e35a018b8eb844be7\"},{\"command\":\"logname\",\"executable\":\"/usr/bin/logname\",\"sha256\":\"45db4d2592e64532694c8afe52bc447f025b113b4f528c1d8610c5d1e48c6a94\"},{\"command\":\"ls\",\"executable\":\"/usr/bin/ls\",\"sha256\":\"53a9c0557a948069d56f964cf21c7c0854bb2677d9985080369ed1e172161625\"},{\"command\":\"lsattr\",\"executable\":\"/usr/bin/lsattr\",\"sha256\":\"905fb991f13223a83a062036ae4522ae570d7ac9a4ea5bdfaa372f7d08e3e575\"},{\"command\":\"lsblk\",\"executable\":\"/usr/bin/lsblk\",\"sha256\":\"ed402fc40402a7e569e0f6dd092dde6e365c7114953ab2f746e529de1182797f\"},{\"command\":\"lscpu\",\"executable\":\"/usr/bin/lscpu\",\"sha256\":\"31c24c0492f23fb6737746de6526caf28153ce9b2d252dc99e3ba3729456e734\"},{\"command\":\"lsipc\",\"executable\":\"/usr/bin/lsipc\",\"sha256\":\"5bbdb8551443c6438ccaf8973ae1706b9b47845e9c818ebf02bdad8a3cd53ea3\"},{\"command\":\"lslocks\",\"executable\":\"/usr/bin/lslocks\",\"sha256\":\"8bf64c604089b8992c4ab6f2149d07cf45d5fc19e486fc128ec521329e9689ed\"},{\"command\":\"lslogins\",\"executable\":\"/usr/bin/lslogins\",\"sha256\":\"3ba84dda9f3e5a5f0d2b6822525d1b40bce5b110c3f4b8a700afa62ae1442b79\"},{\"command\":\"lsmem\",\"executable\":\"/usr/bin/lsmem\",\"sha256\":\"f2250bd7974b1bc47a87828140e1aba335c044a69b69abeeb891cf8fa8bb3b42\"},{\"command\":\"lsns\",\"executable\":\"/usr/bin/lsns\",\"sha256\":\"a800738033ac72da56d01b4c7a5ac823d80e2f439529252181a2abdd02ab2c2f\"},{\"command\":\"lto-dump\",\"executable\":\"/usr/bin/x86_64-linux-gnu-lto-dump-13\",\"sha256\":\"ed86753e90565306d3bd55483964eff30dc5b19a0a2cec80bd3c5825c4f8dd57\"},{\"command\":\"lto-dump-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-lto-dump-13\",\"sha256\":\"ed86753e90565306d3bd55483964eff30dc5b19a0a2cec80bd3c5825c4f8dd57\"},{\"command\":\"lzcat\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"b5b163eb273291934556377ab883b4b2a5d4da50bd0dc0a91774ecc234ccd8d0\"},{\"command\":\"lzcmp\",\"executable\":\"/usr/bin/xzdiff\",\"sha256\":\"551e26acd2c7d3f56ab6f43916cfcaafb96955eda66b656f1ed9a708f52e7667\"},{\"command\":\"lzdiff\",\"executable\":\"/usr/bin/xzdiff\",\"sha256\":\"551e26acd2c7d3f56ab6f43916cfcaafb96955eda66b656f1ed9a708f52e7667\"},{\"command\":\"lzegrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"lzfgrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"lzgrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"lzless\",\"executable\":\"/usr/bin/xzless\",\"sha256\":\"a25b3dee9826b993f4fe0043e6d3073c6658925c28afc303917d62b1cf465051\"},{\"command\":\"lzma\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"b5b163eb273291934556377ab883b4b2a5d4da50bd0dc0a91774ecc234ccd8d0\"},{\"command\":\"lzmainfo\",\"executable\":\"/usr/bin/lzmainfo\",\"sha256\":\"0a2bd0f045a0d229d2f71380755b11b3d549ef3c0259802a7df2694892774bf4\"},{\"command\":\"lzmore\",\"executable\":\"/usr/bin/xzmore\",\"sha256\":\"e40b6cfbd6dcfd6fa46b721f7afb36efbbf3a8fbea1cd20f64b6123400f39306\"},{\"command\":\"make\",\"executable\":\"/usr/bin/make\",\"sha256\":\"d78b8f1d099fbcfb6f2f49ab87223b9b68fb3956642f92d6ec6de812e8afa965\"},{\"command\":\"make-first-existing-target\",\"executable\":\"/usr/bin/make-first-existing-target\",\"sha256\":\"1ed1eb3449f3db643b7532550a04b9f0f3acd79a13243c4b474e1546f662e596\"},{\"command\":\"man\",\"executable\":\"/usr/bin/man\",\"sha256\":\"1150abfca60bce252e8a6a449719fec697aa8ac844ae330882a1618a78db05b7\"},{\"command\":\"mawk\",\"executable\":\"/usr/bin/mawk\",\"sha256\":\"3850bf893d3f4f8ec462c8b59d6d66fdbbe8ddc0715b3d404d9cc574526b781c\"},{\"command\":\"mcookie\",\"executable\":\"/usr/bin/mcookie\",\"sha256\":\"8e7bc650992d9b6b21fbeac5d996ee71cb4f6b75293cc20c3a353e58f5cc6192\"},{\"command\":\"md5sum\",\"executable\":\"/usr/bin/md5sum\",\"sha256\":\"07f783b4caa1c8b0dd2cfbda39be93a265bb804218bbca65db2c5ba2c2bbe1dc\"},{\"command\":\"md5sum.textutils\",\"executable\":\"/usr/bin/md5sum\",\"sha256\":\"07f783b4caa1c8b0dd2cfbda39be93a265bb804218bbca65db2c5ba2c2bbe1dc\"},{\"command\":\"mesg\",\"executable\":\"/usr/bin/mesg\",\"sha256\":\"1138cfd11e14543a14ccc11d184d7034a5e4bae20178038055816486cd2604f5\"},{\"command\":\"mkdir\",\"executable\":\"/usr/bin/mkdir\",\"sha256\":\"af2cc5106b37532b2aa1b4981668685cf7aebdf5fea3ac7356d568cf98d7470b\"},{\"command\":\"mkfifo\",\"executable\":\"/usr/bin/mkfifo\",\"sha256\":\"e746d63523729504b4ce7fa8ce8f37d0f6af186b2ed50a4630cd8a62d931f004\"},{\"command\":\"mkfontdir\",\"executable\":\"/usr/bin/mkfontdir\",\"sha256\":\"3e42ff36b592706e5846d6133c38422d33881d3eaef87e59e9fda381c591ef78\"},{\"command\":\"mkfontscale\",\"executable\":\"/usr/bin/mkfontscale\",\"sha256\":\"34db39f7cc459169faaffe6325fe1bde82ac7d3aee55738850f025f545bb348f\"},{\"command\":\"mknod\",\"executable\":\"/usr/bin/mknod\",\"sha256\":\"d774ca7f4efc1465c52f977b3e228ca69aced928e8d11ca86b5ac6eb904d0f54\"},{\"command\":\"mktemp\",\"executable\":\"/usr/bin/mktemp\",\"sha256\":\"45d28b6224635b9506be3fd58b280e8267ea1418f251ccc84f9c4c1b56ce9e45\"},{\"command\":\"more\",\"executable\":\"/usr/bin/more\",\"sha256\":\"31297a5996c047b868d7897d4cdc0571eb42ec308d125d5cfe1cbc91523f1670\"},{\"command\":\"mount\",\"executable\":\"/usr/bin/mount\",\"sha256\":\"ac5aa68d34add5a33ae81ac3a971aea677c4032d768aab5a3c4c2707f728885e\"},{\"command\":\"mountpoint\",\"executable\":\"/usr/bin/mountpoint\",\"sha256\":\"6a76a8993083f3dba87e6741e42325abebb7ba816279d7be7bff8ff8ec6534ed\"},{\"command\":\"mv\",\"executable\":\"/usr/bin/mv\",\"sha256\":\"8f07f577f2438fb80b1d44851bb507b0d517cc6756bb680e0eda1b8bc07f0073\"},{\"command\":\"namei\",\"executable\":\"/usr/bin/namei\",\"sha256\":\"7adb4f33d8b0cc464f7e9f72cd9b9324dba6654d403d3d52935ad35b35fd5243\"},{\"command\":\"nawk\",\"executable\":\"/usr/bin/mawk\",\"sha256\":\"3850bf893d3f4f8ec462c8b59d6d66fdbbe8ddc0715b3d404d9cc574526b781c\"},{\"command\":\"networkctl\",\"executable\":\"/usr/bin/networkctl\",\"sha256\":\"69c01b10b13ceff2fc6a2fd74b48169622076828707785794a5be90e1fe6177d\"},{\"command\":\"newgrp\",\"executable\":\"/usr/bin/newgrp\",\"sha256\":\"572ab15948df3969e929b902641c3a42e76dce7d71a22fbc58011ca89d8d965e\"},{\"command\":\"nice\",\"executable\":\"/usr/bin/nice\",\"sha256\":\"1ad49430066b17c18062ec742254a65fa08ea2248a26db5cab4f548d64bfbecd\"},{\"command\":\"nisdomainname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"071fec20458397874e6121589d5210e7eed22a1b1afe16c2b9970b8a8233cc5b\"},{\"command\":\"nl\",\"executable\":\"/usr/bin/nl\",\"sha256\":\"3c291e1cbce852b356785777659f2d3b85c312e5b7dcc8f4f7b9f4488b9b9923\"},{\"command\":\"nm\",\"executable\":\"/usr/bin/x86_64-linux-gnu-nm\",\"sha256\":\"3708df3d7ce16e2c1dcdcd722784ae382d4d582276a71ab7bbe2d542f5621202\"},{\"command\":\"node\",\"executable\":\"/usr/local/bin/node\",\"sha256\":\"3517c2df0b2f8cd7f422b4b8450ef81c6889f08eb03e281d6de9079b15e6a327\"},{\"command\":\"nodejs\",\"executable\":\"/usr/bin/node\",\"sha256\":\"f3432a45b03b2da0d270095fdd8813dc34cbea73f5fc8b18c7a384b7cf9b333a\"},{\"command\":\"nohup\",\"executable\":\"/usr/bin/nohup\",\"sha256\":\"f0155d0dafd80130405fd215e6c539eda0d75adf8c0c0f3873130b518314231e\"},{\"command\":\"npm\",\"executable\":\"/usr/local/lib/node_modules/npm/bin/npm-cli.js\",\"sha256\":\"8e5f6f3429f8cdbe693cdc29904e9d5a7b127a494bd15c804bd54c7403bfcbe7\"},{\"command\":\"nproc\",\"executable\":\"/usr/bin/nproc\",\"sha256\":\"ae595cc6c699d657e556818e1100ec2e2134fc611fcaec420bdbddeb3e26c652\"},{\"command\":\"npx\",\"executable\":\"/usr/local/lib/node_modules/npm/bin/npx-cli.js\",\"sha256\":\"237adf8f3747cad8b9b62fcfd0d9c8d509a64e550337707f55100afcb79e8900\"},{\"command\":\"nsenter\",\"executable\":\"/usr/bin/nsenter\",\"sha256\":\"b1230680d3fd3d3447d3190c30921ede39170e3e01ce22916b922fe0489b7af1\"},{\"command\":\"numfmt\",\"executable\":\"/usr/bin/numfmt\",\"sha256\":\"c9baa9a11f20146c3df9de1908dfff6db6b3fe954453f3c99ff03a8cbf3a72f4\"},{\"command\":\"objcopy\",\"executable\":\"/usr/bin/x86_64-linux-gnu-objcopy\",\"sha256\":\"9276e918e3c26d3aa7ef9dd2232cd8ac692f03d3c1f270bfa5144a2b5492b713\"},{\"command\":\"objdump\",\"executable\":\"/usr/bin/x86_64-linux-gnu-objdump\",\"sha256\":\"325c4205a4c658a9d1e1ebc469ae55975a2b897a3d3c1e79d9b158612d37f745\"},{\"command\":\"oci-distribution-conformance\",\"executable\":\"/usr/local/bin/oci-distribution-conformance\",\"sha256\":\"7b0e39ab2f616c7b33a7ffc57331b90a27ea4cc23ffbc1526c3dee80187332b2\"},{\"command\":\"oci-image-schema-conformance\",\"executable\":\"/usr/local/bin/oci-image-schema-conformance\",\"sha256\":\"87e0a99983e0bf9af63d5ac49cd7c1df476231f1de947d0e1c7e7b51b57cc0fd\"},{\"command\":\"oci-runtime-validate\",\"executable\":\"/usr/local/bin/oci-runtime-validate\",\"sha256\":\"65bd7332ae65e906405bb3b4e1dfcbfa7c9e25dcc3ceeff5a7331a1b942be26e\"},{\"command\":\"od\",\"executable\":\"/usr/bin/od\",\"sha256\":\"74a28d4bd02cfe8d205196275f1e9a923b024b22bf90bd1d48bc1a4dbad0720d\"},{\"command\":\"openid-conformance\",\"executable\":\"/usr/local/bin/openid-conformance\",\"sha256\":\"7ee100439bc7dc35cda162b85be68140338bdae5aa3c2fb79412cca621bdd9b1\"},{\"command\":\"openssl\",\"executable\":\"/usr/bin/openssl\",\"sha256\":\"b86b739329008369aebe1f7cff6c2adb18965609d68a19456fca55232f2908f5\"},{\"command\":\"oras\",\"executable\":\"/usr/local/bin/oras\",\"sha256\":\"040e140304b7dbdd9b40dacd798e2303cea44ad84eeb210750afdf15f1dcf8b4\"},{\"command\":\"osv-scanner\",\"executable\":\"/usr/local/bin/osv-scanner\",\"sha256\":\"15314940c10d26af9c6649f150b8a47c1262e8fc7e17b1d1029b0e479e8ed8a0\"},{\"command\":\"otelcol-contrib\",\"executable\":\"/usr/local/bin/otelcol-contrib\",\"sha256\":\"8133aa166e5a0cc706c7168b16828737baeb9d78b7a630b3cc0c2dac225e57ea\"},{\"command\":\"pager\",\"executable\":\"/usr/bin/more\",\"sha256\":\"31297a5996c047b868d7897d4cdc0571eb42ec308d125d5cfe1cbc91523f1670\"},{\"command\":\"partx\",\"executable\":\"/usr/bin/partx\",\"sha256\":\"66c12078fbc09868ad418b67655f501d10508e6b6670c1a373e90e6744787478\"},{\"command\":\"passwd\",\"executable\":\"/usr/bin/passwd\",\"sha256\":\"ca3fc307dda8259f585bb38c70e82bd15af61e8574cd0d6e430292e328bb3477\"},{\"command\":\"paste\",\"executable\":\"/usr/bin/paste\",\"sha256\":\"d748b478d9942d3c93427259054397f6e902cb5378b67e5d39e6dc913fc4d082\"},{\"command\":\"patch\",\"executable\":\"/usr/bin/patch\",\"sha256\":\"a7ae8b838a75711c06f86a2a8293dcad85a20b564670a120717e704c436e6f3a\"},{\"command\":\"pathchk\",\"executable\":\"/usr/bin/pathchk\",\"sha256\":\"58a6ebb425041c927febfeee381056adb9ce6f774427cbbb43f6452c834a100a\"},{\"command\":\"pdb3\",\"executable\":\"/usr/lib/python3.12/pdb.py\",\"sha256\":\"8d2a36cb0c9a4d8eda57e1a4fe153fff2724570286ecf520648aee4fe7a4fff7\"},{\"command\":\"pdb3.12\",\"executable\":\"/usr/lib/python3.12/pdb.py\",\"sha256\":\"8d2a36cb0c9a4d8eda57e1a4fe153fff2724570286ecf520648aee4fe7a4fff7\"},{\"command\":\"perl\",\"executable\":\"/usr/bin/perl\",\"sha256\":\"56e5ea41974eb1eff0f7ea64677578b1938053d29818c2810bcb21e2ca68cafa\"},{\"command\":\"perl5.38-x86_64-linux-gnu\",\"executable\":\"/usr/bin/perl5.38-x86_64-linux-gnu\",\"sha256\":\"7c0ac53c6ad2597ae0175e3637b573858fb536065e8a0bb2e6a28bde563ce555\"},{\"command\":\"perl5.38.2\",\"executable\":\"/usr/bin/perl5.38.2\",\"sha256\":\"56e5ea41974eb1eff0f7ea64677578b1938053d29818c2810bcb21e2ca68cafa\"},{\"command\":\"perlbug\",\"executable\":\"/usr/bin/perlbug\",\"sha256\":\"f1283dadae7c65a24852623282b6ec235a83e32dfa53c75745de98a672791d41\"},{\"command\":\"perldoc\",\"executable\":\"/usr/bin/perldoc\",\"sha256\":\"d8bebeee62ce30574f40d53182b7fe17619e144233a7f7ddfa3e33ca34deccec\"},{\"command\":\"perlivp\",\"executable\":\"/usr/bin/perlivp\",\"sha256\":\"ea0bc6dfbf245531e7fed7ee22c07d576aaf89e57251bab47a879f40742d565e\"},{\"command\":\"perlthanks\",\"executable\":\"/usr/bin/perlthanks\",\"sha256\":\"f1283dadae7c65a24852623282b6ec235a83e32dfa53c75745de98a672791d41\"},{\"command\":\"pgrep\",\"executable\":\"/usr/bin/pgrep\",\"sha256\":\"8e1a7f00f33b9447e24835307cef71800677a2fe2975c8a1632b613109816b52\"},{\"command\":\"piconv\",\"executable\":\"/usr/bin/piconv\",\"sha256\":\"0ddc062a05a184cc3f89338a44437364a29811b420f3660c13915bddfdc3a689\"},{\"command\":\"pidof\",\"executable\":\"/usr/sbin/killall5\",\"sha256\":\"171e6ffef3a838e24f7b2eab2a93b55ebce963f554ceef41c5170b69d7e96716\"},{\"command\":\"pidwait\",\"executable\":\"/usr/bin/pidwait\",\"sha256\":\"8e1a7f00f33b9447e24835307cef71800677a2fe2975c8a1632b613109816b52\"},{\"command\":\"pinentry\",\"executable\":\"/usr/bin/pinentry-curses\",\"sha256\":\"255b09f7b0199ce75c38e5c4e4a04b0992ed43f3fac89b3f80bbd26fe9b2e9ea\"},{\"command\":\"pinentry-curses\",\"executable\":\"/usr/bin/pinentry-curses\",\"sha256\":\"255b09f7b0199ce75c38e5c4e4a04b0992ed43f3fac89b3f80bbd26fe9b2e9ea\"},{\"command\":\"pinky\",\"executable\":\"/usr/bin/pinky\",\"sha256\":\"0520d212a3909902b59a5dbcf45721a5fd41d927d64c6b2c86e543a154b4fc50\"},{\"command\":\"pkg-config\",\"executable\":\"/usr/bin/pkgconf\",\"sha256\":\"7e8152db1b0c7e49d47b4b82a70dc9997b557951c5d4d938b0e7f208ce9eb10b\"},{\"command\":\"pkgconf\",\"executable\":\"/usr/bin/pkgconf\",\"sha256\":\"7e8152db1b0c7e49d47b4b82a70dc9997b557951c5d4d938b0e7f208ce9eb10b\"},{\"command\":\"pkill\",\"executable\":\"/usr/bin/pgrep\",\"sha256\":\"8e1a7f00f33b9447e24835307cef71800677a2fe2975c8a1632b613109816b52\"},{\"command\":\"pl2pm\",\"executable\":\"/usr/bin/pl2pm\",\"sha256\":\"a974fb9e86c76778a249d47d521e6fa1847c331ba3eea6e240a37b1c44dd6a1d\"},{\"command\":\"pldd\",\"executable\":\"/usr/bin/pldd\",\"sha256\":\"9138682c58a3e75820939b71e034d28aeabb48746f29409168a2847b4708e7f8\"},{\"command\":\"pmap\",\"executable\":\"/usr/bin/pmap\",\"sha256\":\"8fc0034d5d77f19792ad1f9cdbf4821bb8d4a24937033acb6f9b71334f33b81a\"},{\"command\":\"pod2html\",\"executable\":\"/usr/bin/pod2html\",\"sha256\":\"713aa9fdcf27a9b70991c14ee5bc47a8a56ec2cfd804df9b79f90f6024de4750\"},{\"command\":\"pod2man\",\"executable\":\"/usr/bin/pod2man\",\"sha256\":\"fdcf8ff920a7461cad02121890b58039f01206809cea6e09eef84692eb793a17\"},{\"command\":\"pod2text\",\"executable\":\"/usr/bin/pod2text\",\"sha256\":\"e0372745722b8d7eeb3ce932606493381c936886e754913d25578cadfce29a13\"},{\"command\":\"pod2usage\",\"executable\":\"/usr/bin/pod2usage\",\"sha256\":\"6405327f3f8660ed89c068b760f61ffb9bd180e2997e9ba881be00f6989c6da3\"},{\"command\":\"podchecker\",\"executable\":\"/usr/bin/podchecker\",\"sha256\":\"b41c90733b7f4051dbe82d289177add630133f0679660fbfa3f3051ecd309dbb\"},{\"command\":\"pr\",\"executable\":\"/usr/bin/pr\",\"sha256\":\"0d446b68a90909c4e1c77f943ebc6d719bb1736934b8a5655bda833606a9c634\"},{\"command\":\"printenv\",\"executable\":\"/usr/bin/printenv\",\"sha256\":\"0f715cfd157d172699753e32185a05023fd16db8597a34ff048ff8e5e2c2d219\"},{\"command\":\"printf\",\"executable\":\"/usr/bin/printf\",\"sha256\":\"3bd8d9bc341d025ea7b805902e469d047e803979faa5417306bd1b454a95992f\"},{\"command\":\"prismpm\",\"executable\":\"/usr/local/bin/prismpm\",\"sha256\":\"ddd53c416a956ede2d84dedace1af7ad9a12ef1eac0e9220a4a5b3e6de897aa8\"},{\"command\":\"prismpm-conformance\",\"executable\":\"/usr/local/bin/prismpm-conformance\",\"sha256\":\"65270010ca442abafa1ae5ccaa1e00777814d08748e0ffb4565070c43b52e2e9\"},{\"command\":\"prismpm-devcontainer-init\",\"executable\":\"/usr/local/bin/prismpm-devcontainer-init\",\"sha256\":\"b8787fc1f0b996393d4e7c55f84a901916e807570c76f27c027743d27dde487b\"},{\"command\":\"prismpm-platform-equivalence\",\"executable\":\"/usr/local/bin/prismpm-platform-equivalence\",\"sha256\":\"a3be795af76d3a0d95253ce652828b3d161e6aae0f147996328dd333a9aba531\"},{\"command\":\"prlimit\",\"executable\":\"/usr/bin/prlimit\",\"sha256\":\"f27cfd8c1512a4cc6541b59b80cb4cdfd6ef28c34aa21db4299b48264cd0d128\"},{\"command\":\"prove\",\"executable\":\"/usr/bin/prove\",\"sha256\":\"30c7fee6225199bbcd242975fe5b2df0436e9ffa9136a5b8972b922dfaf8485b\"},{\"command\":\"ps\",\"executable\":\"/usr/bin/ps\",\"sha256\":\"8e86f498aa4aabfcea6c179d6181557140b4597f1c39bb94e2aba32158b58297\"},{\"command\":\"ptar\",\"executable\":\"/usr/bin/ptar\",\"sha256\":\"126fc379885309b476100e1150430256ab892c5b5650741af17478984a389758\"},{\"command\":\"ptardiff\",\"executable\":\"/usr/bin/ptardiff\",\"sha256\":\"1d7d45bd4f48409a479886e6cfb6e3e8093fea89b10ce906d399484d92a86cc0\"},{\"command\":\"ptargrep\",\"executable\":\"/usr/bin/ptargrep\",\"sha256\":\"0bca747354107929ecefbab2a8128923763bfa622124e20a1194c7f8a914a20f\"},{\"command\":\"ptx\",\"executable\":\"/usr/bin/ptx\",\"sha256\":\"6fdbe9b0845cb29be9a27a78e2ec25fa29d5a54b829465cd6bb320312da29589\"},{\"command\":\"pwd\",\"executable\":\"/usr/bin/pwd\",\"sha256\":\"efb9314f903f370323c36dbc89c6b45965e6d7cf722870682d30fe9d450d0ac5\"},{\"command\":\"pwdx\",\"executable\":\"/usr/bin/pwdx\",\"sha256\":\"f3fff841b718139554fd3a56050fe29dc3805aa0af42a6a0acceb37c20e8b6f1\"},{\"command\":\"py3clean\",\"executable\":\"/usr/bin/py3clean\",\"sha256\":\"48c7d9e6a14a349beae906eae5fe8cac9a974bda7a40c3dc3b9e1163251eb250\"},{\"command\":\"py3compile\",\"executable\":\"/usr/bin/py3compile\",\"sha256\":\"4ca3cf6f9fbb47571e11c86222f4f3952a22d87f5df37c060388e96b0ef00813\"},{\"command\":\"py3versions\",\"executable\":\"/usr/share/python3/py3versions.py\",\"sha256\":\"8b0eef6d34bd68477d81d89d8e6bf91d6a991cb5034351d564731aa013b6e7e7\"},{\"command\":\"pydoc3\",\"executable\":\"/usr/bin/pydoc3.12\",\"sha256\":\"ddbcea7349aca28998c76624ac9b4a692b3edd4ab80c279e7d97a6aca813191a\"},{\"command\":\"pydoc3.12\",\"executable\":\"/usr/bin/pydoc3.12\",\"sha256\":\"ddbcea7349aca28998c76624ac9b4a692b3edd4ab80c279e7d97a6aca813191a\"},{\"command\":\"pygettext3\",\"executable\":\"/usr/bin/pygettext3.12\",\"sha256\":\"d6d87fa2841d71debfdec183c7df8752a759ca56af467248a79e2e192f80eda1\"},{\"command\":\"pygettext3.12\",\"executable\":\"/usr/bin/pygettext3.12\",\"sha256\":\"d6d87fa2841d71debfdec183c7df8752a759ca56af467248a79e2e192f80eda1\"},{\"command\":\"python3\",\"executable\":\"/usr/bin/python3.12\",\"sha256\":\"1643dacd9feaedc58f3cc581e4d22577dfe25c09b10282936186ccf0f2e61118\"},{\"command\":\"python3.12\",\"executable\":\"/usr/bin/python3.12\",\"sha256\":\"1643dacd9feaedc58f3cc581e4d22577dfe25c09b10282936186ccf0f2e61118\"},{\"command\":\"ranlib\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ranlib\",\"sha256\":\"60254978b8ee2c1b21b41d16a18a621dbbcc72e43eb2fa9f916818256c77e9ee\"},{\"command\":\"rbash\",\"executable\":\"/usr/bin/bash\",\"sha256\":\"bc5945feb8bd26203ebfafea5ce1878bb2e32cb8fb50ab7ae395cfb1e1aaaef1\"},{\"command\":\"readelf\",\"executable\":\"/usr/bin/x86_64-linux-gnu-readelf\",\"sha256\":\"64c58e15274bbbb5153f31078e455e9e77ee5f51489e709bba5bb788ce9df2b0\"},{\"command\":\"readlink\",\"executable\":\"/usr/bin/readlink\",\"sha256\":\"645a5f1f1f2aa9639a1fa1ac0a0b7e9377a2b963baf62d3952a3ce02715e1bf7\"},{\"command\":\"realpath\",\"executable\":\"/usr/bin/realpath\",\"sha256\":\"8f0b843ce0f8ce437dfe78672ffd064cb238551b2ebbf5b8559a7adaaf0e3ef0\"},{\"command\":\"rename.ul\",\"executable\":\"/usr/bin/rename.ul\",\"sha256\":\"c2694fd23b1b4f54ec4484c9f9f1c01e7d217c4cacaee84271ca3d5eaf49d46f\"},{\"command\":\"renice\",\"executable\":\"/usr/bin/renice\",\"sha256\":\"219fe236c0e987017a2ee2ac64f94d8887f95f789fcb2aad726c8dad8f63ab13\"},{\"command\":\"reset\",\"executable\":\"/usr/bin/tset\",\"sha256\":\"2c6a6465382ef8b3c31a2f518efee4eb2dfc3272b009d256828ec6eef14dee20\"},{\"command\":\"resizepart\",\"executable\":\"/usr/bin/resizepart\",\"sha256\":\"dd9abb069c63b78245e7ff8fca52d6c435fca02f18b5af194cfa7d8797d62fdd\"},{\"command\":\"rev\",\"executable\":\"/usr/bin/rev\",\"sha256\":\"5361079aa25fa7312f78bd86f14777e1b4bebb5573a9c72e10e5066d491c36e4\"},{\"command\":\"rgrep\",\"executable\":\"/usr/bin/rgrep\",\"sha256\":\"0a8dd42a068115f058ae57f9f6347e1ef0ae2ffea89bf658b132974246577748\"},{\"command\":\"rls\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"rm\",\"executable\":\"/usr/bin/rm\",\"sha256\":\"aedf2ef491e1ca4ea2682b88a031f7c3960ebb133677a339743e859fa3d3d8b5\"},{\"command\":\"rmdir\",\"executable\":\"/usr/bin/rmdir\",\"sha256\":\"2450cf2f4eaad71378cfdc6ac6da5cd6b40a6aa772766ae9040d32bf2ee45193\"},{\"command\":\"rpcgen\",\"executable\":\"/usr/bin/rpcgen\",\"sha256\":\"6bfcac3fe114746947c7abbbe5bdf4822b8c31a1a9797a7885c47d0a9062e2ce\"},{\"command\":\"run-parts\",\"executable\":\"/usr/bin/run-parts\",\"sha256\":\"3f36124107498d18ddacfbfe773df11e7094d5d143194cdfcec8804cccc81f64\"},{\"command\":\"runcon\",\"executable\":\"/usr/bin/runcon\",\"sha256\":\"2a578af3b87f26bd4e7786661829d4941126f35d07f5195ac7cd6829c2ee4923\"},{\"command\":\"rust-analyzer\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"rust-gdb\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"rust-gdbgui\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"rust-lldb\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"rustc\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"rustdoc\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"rustfmt\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"rustup\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"4acc9acc76d5079515b46346a485974457b5a79893cfb01112423c89aeb5aa10\"},{\"command\":\"savelog\",\"executable\":\"/usr/bin/savelog\",\"sha256\":\"6a0f55fea1a81f1930c86f534fb5570785b2f12f3da49709e76c3148a89e0197\"},{\"command\":\"scalar\",\"executable\":\"/usr/bin/scalar\",\"sha256\":\"c60b6e9e8162deb16a53c892682a0f09ee921aee94329329f6cd7971ac2ec094\"},{\"command\":\"scp\",\"executable\":\"/usr/bin/scp\",\"sha256\":\"27421348ac188f7381634ce1d521fe9fe774c75cab0d0d2086a052c9bac2da4b\"},{\"command\":\"script\",\"executable\":\"/usr/bin/script\",\"sha256\":\"e2dc34fc70c2ed96b3e919c1103d9f1cc210d32218d582ab271454b2350f50a1\"},{\"command\":\"scriptlive\",\"executable\":\"/usr/bin/scriptlive\",\"sha256\":\"e10074d24c1789e4f9da534b7ca16ecc0c2cd319d6271757cb4f086558579f73\"},{\"command\":\"scriptreplay\",\"executable\":\"/usr/bin/scriptreplay\",\"sha256\":\"e47f72e2e16e39ed16412b9359f4fe0fa8f29f00234e6ac63fb9b2bbf3ce0339\"},{\"command\":\"sdiff\",\"executable\":\"/usr/bin/sdiff\",\"sha256\":\"fdaa16b8d42dc3abe6d7548ad6b86351047e9fbce6382fe33e4fe607cd7761af\"},{\"command\":\"sed\",\"executable\":\"/usr/bin/sed\",\"sha256\":\"23f70dd6496d75419823039e1cebf95a2fd0508c6dfec72ac2352f7e08391dd5\"},{\"command\":\"select-default-iwrap\",\"executable\":\"/usr/bin/select-default-iwrap\",\"sha256\":\"8887e11359e088e96a84494f36b38a9b60d13cb9170bf34d8c3f3a79a3894052\"},{\"command\":\"select-editor\",\"executable\":\"/usr/bin/select-editor\",\"sha256\":\"46ce6e3872a1807f83a958d647ededf626f3aab13ad4b078493358c59aa5b97e\"},{\"command\":\"sensible-browser\",\"executable\":\"/usr/bin/sensible-browser\",\"sha256\":\"0da2fd759bef3369bf3ff660ab0285525ac80836c5cc8adff977b0f714be2945\"},{\"command\":\"sensible-editor\",\"executable\":\"/usr/bin/sensible-editor\",\"sha256\":\"3c92be6eb21bf661df4cc75caa3bd1d587378b313d981ec17af318532d00689b\"},{\"command\":\"sensible-pager\",\"executable\":\"/usr/bin/sensible-pager\",\"sha256\":\"c1cc2231c552a691c0a7da73f9e79954cfa785921019385a2b7f1dedb4446940\"},{\"command\":\"sensible-terminal\",\"executable\":\"/usr/bin/sensible-terminal\",\"sha256\":\"98bbedd54ce47886213d09ab622872e4fb1742e9ba325a0202cfb8e3705ac510\"},{\"command\":\"seq\",\"executable\":\"/usr/bin/seq\",\"sha256\":\"5c7722126a4eabacda73788a6d46d4fd12d3ab5f393e19026f2dada114ec15c6\"},{\"command\":\"session-migration\",\"executable\":\"/usr/bin/session-migration\",\"sha256\":\"6d96065282cd4c04e0a64c113e7967b7d8bcfada6f9be442a01e0a6b2cea0950\"},{\"command\":\"setarch\",\"executable\":\"/usr/bin/setarch\",\"sha256\":\"9cbf126e4a5a2847313b38c766a6d52110bd31a2f90de871bc618166a046e624\"},{\"command\":\"setpriv\",\"executable\":\"/usr/bin/setpriv\",\"sha256\":\"96b083b79c32fd2f0c29657e88e20c7495839349fc64ad5d0503f32d26bf8733\"},{\"command\":\"setsid\",\"executable\":\"/usr/bin/setsid\",\"sha256\":\"fd90e9144a576149eb93e6e9250e04b7121bfcce31b562d0bf0d4441a6bf415a\"},{\"command\":\"setterm\",\"executable\":\"/usr/bin/setterm\",\"sha256\":\"3d421484f8447c6af92e816aecd5194120d397bc8c8affaedfc68629ea58e180\"},{\"command\":\"setxkbmap\",\"executable\":\"/usr/bin/setxkbmap\",\"sha256\":\"864426138b357f6be7210a2bc501540ec095dd24a90c85bff102a23ae2678a35\"},{\"command\":\"sftp\",\"executable\":\"/usr/bin/sftp\",\"sha256\":\"6a28f34c2689a69b6fe886d353ac63a655377b835db6cad8f77923b7f1780907\"},{\"command\":\"sg\",\"executable\":\"/usr/bin/newgrp\",\"sha256\":\"572ab15948df3969e929b902641c3a42e76dce7d71a22fbc58011ca89d8d965e\"},{\"command\":\"sh\",\"executable\":\"/usr/bin/dash\",\"sha256\":\"86d31f6fb799e91fa21bad341484564510ca287703a16e9e46c53338776f4f42\"},{\"command\":\"sha1sum\",\"executable\":\"/usr/bin/sha1sum\",\"sha256\":\"f83c56f59e80ad6027caf81fe507cbab151bf7c24bf76c342ca9f00edd1fafe5\"},{\"command\":\"sha224sum\",\"executable\":\"/usr/bin/sha224sum\",\"sha256\":\"0649450906d541d01851ebc46e1f9692f826ee0c2fc23048c4fa4816f34a0709\"},{\"command\":\"sha256sum\",\"executable\":\"/usr/bin/sha256sum\",\"sha256\":\"9992e1f1feb6f0f396bc8d6691ebc1adbfc269fd628bce84eda1d4ba5c3995c7\"},{\"command\":\"sha384sum\",\"executable\":\"/usr/bin/sha384sum\",\"sha256\":\"b81c50057daa04993d12208b519d1f166814c8a144a3cfe4f8372b02a281cf40\"},{\"command\":\"sha512sum\",\"executable\":\"/usr/bin/sha512sum\",\"sha256\":\"320d0dcefe6222ca812363a1b17db2a741d710c3d9cfe9db8cefdf84888ed74f\"},{\"command\":\"shasum\",\"executable\":\"/usr/bin/shasum\",\"sha256\":\"e3bad5e7cd244f5a24fbee97be7e9a90ee20993ff5b5213ffeac0e0976cffb7c\"},{\"command\":\"shred\",\"executable\":\"/usr/bin/shred\",\"sha256\":\"4adca9c461c53ff3a42c749ab9649e0559329bd41fab50de92e91b47586a246f\"},{\"command\":\"shuf\",\"executable\":\"/usr/bin/shuf\",\"sha256\":\"e6c8f1291f52bad0befa4ee3e8b2ff4cc2e32610056799a0fc70156c51689f82\"},{\"command\":\"size\",\"executable\":\"/usr/bin/x86_64-linux-gnu-size\",\"sha256\":\"ac2e5c6a62140912c3f36d5b65e12465eb75df372d81093a387a949a7d105fa9\"},{\"command\":\"skill\",\"executable\":\"/usr/bin/skill\",\"sha256\":\"51c25d633be75d08bea68f62dc527f9ca126267c695e7aec3ef76e23e2e21d72\"},{\"command\":\"slabtop\",\"executable\":\"/usr/bin/slabtop\",\"sha256\":\"6768483629307feb2248701f1dc0b2489d0565a1c076b3173345012a9bf6fa94\"},{\"command\":\"sleep\",\"executable\":\"/usr/bin/sleep\",\"sha256\":\"a65efec857cfac0d4f43fc53affa73794ff1d1fdcb547931d4b92a98bda8e646\"},{\"command\":\"slogin\",\"executable\":\"/usr/bin/ssh\",\"sha256\":\"3b0701113d8982d71c8cc74e5a1949f03c6f71da804cf4f3507315afbf07042c\"},{\"command\":\"slsa-validator\",\"executable\":\"/opt/prismpm/oracles/slsa-validator.mjs\",\"sha256\":\"04cdd2f287060cc2ba7a93b45ddcb899140451e9375e703aa4aabfee10800b7f\"},{\"command\":\"slsa-verifier\",\"executable\":\"/usr/local/bin/slsa-verifier\",\"sha256\":\"946dbec729094195e88ef78e1734324a27869f03e2c6bd2f61cbc06bd5350339\"},{\"command\":\"snice\",\"executable\":\"/usr/bin/skill\",\"sha256\":\"51c25d633be75d08bea68f62dc527f9ca126267c695e7aec3ef76e23e2e21d72\"},{\"command\":\"sort\",\"executable\":\"/usr/bin/sort\",\"sha256\":\"063baf220830f47b3acb3b68ea67c545d762b4d96d068db31b3a82c6a63fd0f6\"},{\"command\":\"spdx-validator\",\"executable\":\"/opt/prismpm/oracles/spdx-validator.mjs\",\"sha256\":\"e2670b02913ab07bef777fe30075892652b2fd8b78ca396d83916368946334a1\"},{\"command\":\"splain\",\"executable\":\"/usr/bin/splain\",\"sha256\":\"06b28f957c591b63f3c03dd5829ce85e7ce2daf29c82baa4c24445cdf40d3052\"},{\"command\":\"split\",\"executable\":\"/usr/bin/split\",\"sha256\":\"69ceb23ec8299ca9fd0394e33ed7d8ce1dbe9a1c8323b70551f80aa95830459a\"},{\"command\":\"ssh\",\"executable\":\"/usr/bin/ssh\",\"sha256\":\"3b0701113d8982d71c8cc74e5a1949f03c6f71da804cf4f3507315afbf07042c\"},{\"command\":\"ssh-add\",\"executable\":\"/usr/bin/ssh-add\",\"sha256\":\"a8f0927cd3c1600b8b3bbe41371bdf5110997eb89f9915d2864497b46b93e293\"},{\"command\":\"ssh-agent\",\"executable\":\"/usr/bin/ssh-agent\",\"sha256\":\"3eee1438cbceea275881c1e664a9676f398ba96f039121676db6ede654578e69\"},{\"command\":\"ssh-argv0\",\"executable\":\"/usr/bin/ssh-argv0\",\"sha256\":\"fcf4ffdfab652a0882b7b2417a25265d07a936c4268e2d3f4dec14797a9e5734\"},{\"command\":\"ssh-copy-id\",\"executable\":\"/usr/bin/ssh-copy-id\",\"sha256\":\"b625120eeff8b0e64e4e8c71e5ed3a7878fd69d318a88ce0a22e115725f6b815\"},{\"command\":\"ssh-keygen\",\"executable\":\"/usr/bin/ssh-keygen\",\"sha256\":\"bae95dd024aed593da92f8a03fcb5fca6b5a153f89f603bf8118a0cceb7c58f5\"},{\"command\":\"ssh-keyscan\",\"executable\":\"/usr/bin/ssh-keyscan\",\"sha256\":\"ddbcb80313f184b9cd913e564fd226e447b87cdf38d01b7dd18822c4f5fe3663\"},{\"command\":\"stat\",\"executable\":\"/usr/bin/stat\",\"sha256\":\"3b87d297111f11d30b3c51fd2663f131a161e09d8e130e1842adaefb74307efe\"},{\"command\":\"stdbuf\",\"executable\":\"/usr/bin/stdbuf\",\"sha256\":\"1fd37836e4a9060756fcec760b0b0f482621aad3fe13af39591a8c14b118eb5d\"},{\"command\":\"streamzip\",\"executable\":\"/usr/bin/streamzip\",\"sha256\":\"672ee1b2d50455c34d9fc4c294b68e757c4920196d6fdfb4295dd2d76e7696f8\"},{\"command\":\"strings\",\"executable\":\"/usr/bin/x86_64-linux-gnu-strings\",\"sha256\":\"04c76ab1b6e5039c321259351e8d576a597f60c45e41ff543dda5c8680256039\"},{\"command\":\"strip\",\"executable\":\"/usr/bin/x86_64-linux-gnu-strip\",\"sha256\":\"0d980587ada7ab12193f39271f060d5663aa2f289b0e80d2a0274ce7306e4e42\"},{\"command\":\"stty\",\"executable\":\"/usr/bin/stty\",\"sha256\":\"44728ed190ae65a0f11a0bff9e4a3d8e297e1cf5841786b7220e19b051c2fdc6\"},{\"command\":\"su\",\"executable\":\"/usr/bin/su\",\"sha256\":\"c74311fe5636b7d7f9a56239fa8adeeab12ba86fe7d41b91afa85bf9bbdae78b\"},{\"command\":\"sum\",\"executable\":\"/usr/bin/sum\",\"sha256\":\"5102384c6f094417cab21b7119ee8fcb9626f8ba5fb667ea253775ece9f7a6d8\"},{\"command\":\"sync\",\"executable\":\"/usr/bin/sync\",\"sha256\":\"5c395b95d52686ad295045ccb2272ec8858359df6bdc9655d3feffe650790969\"},{\"command\":\"systemctl\",\"executable\":\"/usr/bin/systemctl\",\"sha256\":\"7ba82b5ba146759c710e1b80fadaa3fdbc0f9b85c8fb2c8c3196b7b1a0037ef8\"},{\"command\":\"systemd\",\"executable\":\"/usr/lib/systemd/systemd\",\"sha256\":\"21941483d0d463b590b2bfb8ca818c81e70fd1f7f6b98d92e75395b90495f742\"},{\"command\":\"systemd-ac-power\",\"executable\":\"/usr/bin/systemd-ac-power\",\"sha256\":\"6b9f648c194026021468dbbc3bd713ddce84abb5438e4855cd4da2b368e44ecc\"},{\"command\":\"systemd-analyze\",\"executable\":\"/usr/bin/systemd-analyze\",\"sha256\":\"0a32460240bbe9fb2bb911667d15b6a224c4787698cee54d81c28e82cb6d1561\"},{\"command\":\"systemd-ask-password\",\"executable\":\"/usr/bin/systemd-ask-password\",\"sha256\":\"14434ebc97008c85e58102128debea61caf636e94dfd0cca785e8c4933313f0c\"},{\"command\":\"systemd-cat\",\"executable\":\"/usr/bin/systemd-cat\",\"sha256\":\"537e6b2ad83011b977a6677a89549597fd1868b2d6048022e6c22b4315ff8911\"},{\"command\":\"systemd-cgls\",\"executable\":\"/usr/bin/systemd-cgls\",\"sha256\":\"000c943b0d1764cfbac5dac87c690f9529cf91bda5fd00304fd564ea39d7a019\"},{\"command\":\"systemd-cgtop\",\"executable\":\"/usr/bin/systemd-cgtop\",\"sha256\":\"ae7aff88743f84fcfd4ab4b9996828cf0b277a9fd4ad624191ca968a33f173b3\"},{\"command\":\"systemd-confext\",\"executable\":\"/usr/bin/systemd-sysext\",\"sha256\":\"10e3b107872ef1ee9bb335d6cdeff3e81c0c06d8233c02ce660a4e147a9f38cd\"},{\"command\":\"systemd-creds\",\"executable\":\"/usr/bin/systemd-creds\",\"sha256\":\"d68cdaeefabd87422d99577efb3c64b01d796e3885a96bb21c277ff1b94448f8\"},{\"command\":\"systemd-cryptenroll\",\"executable\":\"/usr/bin/systemd-cryptenroll\",\"sha256\":\"0c50224e8d786589e091e1042ecbf8c6ac50cc1c73d1b540cfa92cc62e28ac3c\"},{\"command\":\"systemd-cryptsetup\",\"executable\":\"/usr/bin/systemd-cryptsetup\",\"sha256\":\"65d57d4ddeceefb1f646e92a4f0fd7b093b20341e097d1dd67fb070a7d385d4d\"},{\"command\":\"systemd-delta\",\"executable\":\"/usr/bin/systemd-delta\",\"sha256\":\"16b3fa5ef6c077650da022c238b8a9248855905f11f356a66213005011864c74\"},{\"command\":\"systemd-detect-virt\",\"executable\":\"/usr/bin/systemd-detect-virt\",\"sha256\":\"6164c9cee9192d71cbec070155ac7be896883bd07c92d082228eb50dba02bfb5\"},{\"command\":\"systemd-escape\",\"executable\":\"/usr/bin/systemd-escape\",\"sha256\":\"01045def183419296b085eb3d2072301b4eb756a40be423f459b57da2330837c\"},{\"command\":\"systemd-firstboot\",\"executable\":\"/usr/bin/systemd-firstboot\",\"sha256\":\"d005b71a4d111cbfc25ba2b4688183cdecd6fffa2df4149f85e79fa33c8b82ff\"},{\"command\":\"systemd-id128\",\"executable\":\"/usr/bin/systemd-id128\",\"sha256\":\"6cac230051233137d8505a66ee7caf3dc2cf50195bc8f882749e7a0e7c9465a7\"},{\"command\":\"systemd-inhibit\",\"executable\":\"/usr/bin/systemd-inhibit\",\"sha256\":\"696e8aff72a606ac7ad69ebd6dfd0bf92685f1cb72087c615da7af9d26300b0f\"},{\"command\":\"systemd-machine-id-setup\",\"executable\":\"/usr/bin/systemd-machine-id-setup\",\"sha256\":\"b3dc34b7b489bbec37e302c75d7858c8bf617f00e3623550116a434b5d180bf6\"},{\"command\":\"systemd-mount\",\"executable\":\"/usr/bin/systemd-mount\",\"sha256\":\"bd56b159ddb5484eed1af6c43cc53c9d8d159f690690e98c9f406dab66834d59\"},{\"command\":\"systemd-notify\",\"executable\":\"/usr/bin/systemd-notify\",\"sha256\":\"deb48f4bf30b543943532fa6eea405cb8f386a671678f379f7327bc83d9b34a2\"},{\"command\":\"systemd-path\",\"executable\":\"/usr/bin/systemd-path\",\"sha256\":\"87efd014d99f86c3b197464f683046b9dffa698631909978f7d5303c5dc7ebe2\"},{\"command\":\"systemd-repart\",\"executable\":\"/usr/bin/systemd-repart\",\"sha256\":\"4ab21da254bb8cb338e77dd445cfb2578b7d1a743ccc7f51bc12dac5479014da\"},{\"command\":\"systemd-run\",\"executable\":\"/usr/bin/systemd-run\",\"sha256\":\"49f0bf95eb8a781b93853bf9fc981b4929dd0009f55a3e6db95534c0a2d11716\"},{\"command\":\"systemd-socket-activate\",\"executable\":\"/usr/bin/systemd-socket-activate\",\"sha256\":\"70568b85a25b601f60b479d2e74bf97af1514b44369759b0be1d4517b3329230\"},{\"command\":\"systemd-stdio-bridge\",\"executable\":\"/usr/bin/systemd-stdio-bridge\",\"sha256\":\"3e1124c7a8e1ac73691e25f37f116e8216e66610e6fcc9059ac43426c9022a01\"},{\"command\":\"systemd-sysext\",\"executable\":\"/usr/bin/systemd-sysext\",\"sha256\":\"10e3b107872ef1ee9bb335d6cdeff3e81c0c06d8233c02ce660a4e147a9f38cd\"},{\"command\":\"systemd-sysusers\",\"executable\":\"/usr/bin/systemd-sysusers\",\"sha256\":\"96527faba1c8f0be146c38d0b2c00cb26ac186644763a64a09ba8b9c35b89714\"},{\"command\":\"systemd-tmpfiles\",\"executable\":\"/usr/bin/systemd-tmpfiles\",\"sha256\":\"6103cd56fc1607168851e7797abebc9b82c0a68ef663eaf5ed7ca370c87ac1ae\"},{\"command\":\"systemd-tty-ask-password-agent\",\"executable\":\"/usr/bin/systemd-tty-ask-password-agent\",\"sha256\":\"a6434866559bd9580b2a86114d2bd093ed1bee03f44f1815601209addfdce969\"},{\"command\":\"systemd-umount\",\"executable\":\"/usr/bin/systemd-mount\",\"sha256\":\"bd56b159ddb5484eed1af6c43cc53c9d8d159f690690e98c9f406dab66834d59\"},{\"command\":\"tabs\",\"executable\":\"/usr/bin/tabs\",\"sha256\":\"198e8d81923a7370827a0c469479dcb59b829e2fed74562e42fedfb23c38a00c\"},{\"command\":\"tac\",\"executable\":\"/usr/bin/tac\",\"sha256\":\"b226452f63d597c67032f820de88df96bb8eaf9dafecea94d09d72e3a62dac2f\"},{\"command\":\"tail\",\"executable\":\"/usr/bin/tail\",\"sha256\":\"871571a28ad9483140d92027915a263311462f4ca96e0451e38d6ebcce370c0b\"},{\"command\":\"tar\",\"executable\":\"/usr/bin/tar\",\"sha256\":\"6453fce2cf2dde32b86557bb44f533afb3b5171b59b8d21cc797b9b20d9c7b06\"},{\"command\":\"taskset\",\"executable\":\"/usr/bin/taskset\",\"sha256\":\"a9c851792e54e91fba7b827019380abee54e715b6817899c835e4f221354b260\"},{\"command\":\"tee\",\"executable\":\"/usr/bin/tee\",\"sha256\":\"8c1efbee8dbee25378fc941db29a88309d6a7525786e4ebba2dda08edb77615e\"},{\"command\":\"tempfile\",\"executable\":\"/usr/bin/tempfile\",\"sha256\":\"8faf51ec1f7519c28a37adc09fb3fc56ec926da27ff18c5e55472b1335e5030a\"},{\"command\":\"test\",\"executable\":\"/usr/bin/test\",\"sha256\":\"854ed66843b5586f657563b3e9a838c46d47b9f44cb7a301534a4b8d2c10297a\"},{\"command\":\"tic\",\"executable\":\"/usr/bin/tic\",\"sha256\":\"21bfaf468804f70b5f21d21d9a5e2bc9194427c5f63217c5dda4033e2c947b65\"},{\"command\":\"timedatectl\",\"executable\":\"/usr/bin/timedatectl\",\"sha256\":\"99e718fee7a83eb2bf1a1f3078357d86bdbec02c3f8096d3bbf266b56ba7a55d\"},{\"command\":\"timeout\",\"executable\":\"/usr/bin/timeout\",\"sha256\":\"4fccd5b0192653a2446b745d5385ea547b78e466150e07ade9e2caff2b7f4e08\"},{\"command\":\"tload\",\"executable\":\"/usr/bin/tload\",\"sha256\":\"b11ffce5be548aadae175edbc9cd20660dcf19601f82e5a32062d63e57b4e242\"},{\"command\":\"toe\",\"executable\":\"/usr/bin/toe\",\"sha256\":\"f6e3ed03989242340cb4d54136689ccb265fc9b48308ddec3e8b0dd390db2cc8\"},{\"command\":\"top\",\"executable\":\"/usr/bin/top\",\"sha256\":\"6fc5a0128c67df177ac2fc87393f9bfae8b4e492ba8de79de2feddb3873ece60\"},{\"command\":\"touch\",\"executable\":\"/usr/bin/touch\",\"sha256\":\"5244e873c97db0bc4cd9d491eac48d08fba366a7e6584b3fc6225e8aa9d2acaf\"},{\"command\":\"tput\",\"executable\":\"/usr/bin/tput\",\"sha256\":\"6a4c26ae7cf29711ce8d094092cd5e82276c2d5562323c607e802ba8dcf06d9d\"},{\"command\":\"tr\",\"executable\":\"/usr/bin/tr\",\"sha256\":\"ce32eb4705821ce89dbf770d1287959f58c452142350862637f09a8aed473213\"},{\"command\":\"true\",\"executable\":\"/usr/bin/true\",\"sha256\":\"4b5a5694e3c0e8b1d58fc52ac6ef076e55e72c2f53195243ac86d5ff517cc2f6\"},{\"command\":\"truncate\",\"executable\":\"/usr/bin/truncate\",\"sha256\":\"e15f93b2bcac7dbc4eca11128c824d0962651319e5dabff3868993dd60d51818\"},{\"command\":\"tset\",\"executable\":\"/usr/bin/tset\",\"sha256\":\"2c6a6465382ef8b3c31a2f518efee4eb2dfc3272b009d256828ec6eef14dee20\"},{\"command\":\"tsort\",\"executable\":\"/usr/bin/tsort\",\"sha256\":\"c09647757a8e7e47be6820c38398304df668dc99ca56ac906d99c2e95c621266\"},{\"command\":\"tty\",\"executable\":\"/usr/bin/tty\",\"sha256\":\"a55b5b1837b59e2266f92c51995acc5cdcf7db96d33cdeba99695ea11ad89e32\"},{\"command\":\"tzselect\",\"executable\":\"/usr/bin/tzselect\",\"sha256\":\"cd14fec50b626461cc68ccc830c269a839cae3bd56bb19b1caab34e16d531768\"},{\"command\":\"uclampset\",\"executable\":\"/usr/bin/uclampset\",\"sha256\":\"e6d631d90a5623b2225d2186a064345db3fd9b1e566143c6810222fbadd0a3b5\"},{\"command\":\"ucs2any\",\"executable\":\"/usr/bin/ucs2any\",\"sha256\":\"ec9fa22a504eb82479267c7553058877ea9ae179984b2f01307104ee2dd56485\"},{\"command\":\"umount\",\"executable\":\"/usr/bin/umount\",\"sha256\":\"2ea59b57d249d58c64b028b2acf6118b62dc3ba89012a1cf4ff5f5a9891f513d\"},{\"command\":\"uname\",\"executable\":\"/usr/bin/uname\",\"sha256\":\"8fd593fd9e1902eb67cfeba15642719b0ef6c44ba97febceac819e7e5c442abb\"},{\"command\":\"uncompress\",\"executable\":\"/usr/bin/uncompress\",\"sha256\":\"55c2f67ca4c3cca0ebac659f0075461dd671ec4937ecd6c71123bb49ed322ebd\"},{\"command\":\"unexpand\",\"executable\":\"/usr/bin/unexpand\",\"sha256\":\"5080f3d1273b774c7693c281626ae9efd9d44280f38b409935b7adc32840d6e9\"},{\"command\":\"uniq\",\"executable\":\"/usr/bin/uniq\",\"sha256\":\"96883a88d1152ae31f3216c2e162fab36da646b83e2ecca74f68b12192d21315\"},{\"command\":\"unlink\",\"executable\":\"/usr/bin/unlink\",\"sha256\":\"cfff86f31d7d52abcd26598e2ac49e3e1a81d5bb8aacbf2aaefd1b5053fc08d8\"},{\"command\":\"unlzma\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"b5b163eb273291934556377ab883b4b2a5d4da50bd0dc0a91774ecc234ccd8d0\"},{\"command\":\"unminimize\",\"executable\":\"/usr/bin/unminimize\",\"sha256\":\"36a235214133e557df60d3a417df146fe113cf54b36c8757c4f15d6378cdc5dc\"},{\"command\":\"unshare\",\"executable\":\"/usr/bin/unshare\",\"sha256\":\"51bcc77ba5db162c80028f861f0a2770d728c1de80773816d863f28d7a817adb\"},{\"command\":\"unxz\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"b5b163eb273291934556377ab883b4b2a5d4da50bd0dc0a91774ecc234ccd8d0\"},{\"command\":\"update-alternatives\",\"executable\":\"/usr/bin/update-alternatives\",\"sha256\":\"d98c3e7e7faee4e1e8f6de1e4fcbf6ce347eee2c31ac833bbcfa6bfe79d362e1\"},{\"command\":\"update-mime-database\",\"executable\":\"/usr/bin/update-mime-database\",\"sha256\":\"6c5902d10ec225bdf57674252264647f6dfa8feeab66ae78544fe067ca875a42\"},{\"command\":\"uptime\",\"executable\":\"/usr/bin/uptime\",\"sha256\":\"08718198389f9f5f818f21cb0bb5a2382297119d4ade1e847628120cedaf8fd9\"},{\"command\":\"users\",\"executable\":\"/usr/bin/users\",\"sha256\":\"4982fc1289cc265f2407a4505291e12dc71cd2cd9b317cd8f059b7089bbfc01f\"},{\"command\":\"utmpdump\",\"executable\":\"/usr/bin/utmpdump\",\"sha256\":\"d788b00bad92438a1bc152d58f4963bb94b9d506a7a0413bea2d5adbd699f9a9\"},{\"command\":\"varlinkctl\",\"executable\":\"/usr/bin/varlinkctl\",\"sha256\":\"5dd2637677dc6909712b01a0aa27059ef4b1ce0312f336b114562e59fb35166b\"},{\"command\":\"vdir\",\"executable\":\"/usr/bin/vdir\",\"sha256\":\"e6b2b3f142086d859eabad590cfbd98ee2269f039578c87495f9e3dc672dbf92\"},{\"command\":\"vmstat\",\"executable\":\"/usr/bin/vmstat\",\"sha256\":\"6f043d6af3c19bd2d1f331b70870bf7bf14375873390cd401eb5588f795f5511\"},{\"command\":\"w\",\"executable\":\"/usr/bin/w\",\"sha256\":\"aa252429dd2488b1424be7953db1d39c00e61f64321bb8be95c347830beb5ce7\"},{\"command\":\"wall\",\"executable\":\"/usr/bin/wall\",\"sha256\":\"11e4712e60d647a5ea372effaaa6e439cb89df3ce03c076e23998b0451e06f56\"},{\"command\":\"wasm-bindgen\",\"executable\":\"/usr/local/cargo/bin/wasm-bindgen\",\"sha256\":\"b488545de6a75ed6c8fdd04d6d466948917ab83081a3405f800c61c2e6757141\"},{\"command\":\"wasm-bindgen-test-runner\",\"executable\":\"/usr/local/cargo/bin/wasm-bindgen-test-runner\",\"sha256\":\"3cbe6d053d9443393a6d3a46e827e1ab8316391553c227f48fe2dcb0e6c56c26\"},{\"command\":\"wasm-tools\",\"executable\":\"/usr/local/cargo/bin/wasm-tools\",\"sha256\":\"ea93fb629a38fa65d7ee6e288dcdd550f6692c7ecfb5b245cce99e8942ebee02\"},{\"command\":\"wasm2es6js\",\"executable\":\"/usr/local/cargo/bin/wasm2es6js\",\"sha256\":\"f84c8d93ce3590599233ef37ada92411ed197d040d7dbf4f932a79e134be3c0e\"},{\"command\":\"wasmtime\",\"executable\":\"/usr/local/cargo/bin/wasmtime\",\"sha256\":\"fb51aeee3ca704d1c72b3fc1926ab9d04ec8372596075f0179975626aeb5ad2f\"},{\"command\":\"watch\",\"executable\":\"/usr/bin/watch\",\"sha256\":\"9f0914d71c91703009c5c5ddd5a31580c58751a827ff86b7222acdb5769c8037\"},{\"command\":\"wc\",\"executable\":\"/usr/bin/wc\",\"sha256\":\"e22049f5ec4c81d4b7e4eb2b75484cdee9ab49f9760f79d9c7e5b1c05084cf15\"},{\"command\":\"wdctl\",\"executable\":\"/usr/bin/wdctl\",\"sha256\":\"2c499b8cf9c4c81f1db7217fb7769ed4b4dce18da4ca33317fa0fc38a56864e1\"},{\"command\":\"wget\",\"executable\":\"/usr/bin/wget\",\"sha256\":\"e898a05b4c2e3d76b2fd8ea37cc0af7529dc4cbe6391f6a1954267608b5e4726\"},{\"command\":\"whereis\",\"executable\":\"/usr/bin/whereis\",\"sha256\":\"0dacc09f179f28f33353ca1e0b92d43ca5cfcc6a0046bc24e8ea264937424d94\"},{\"command\":\"which\",\"executable\":\"/usr/bin/which.debianutils\",\"sha256\":\"59e7cf8b9bd8711ae1aa6f7bbbd4132b61492409c3afe8e1505225efda1cb8f6\"},{\"command\":\"which.debianutils\",\"executable\":\"/usr/bin/which.debianutils\",\"sha256\":\"59e7cf8b9bd8711ae1aa6f7bbbd4132b61492409c3afe8e1505225efda1cb8f6\"},{\"command\":\"who\",\"executable\":\"/usr/bin/who\",\"sha256\":\"78adec63cd53b6a59b02fc494d1e0f956cc760c28367d6725a4afc6cc1e620c2\"},{\"command\":\"whoami\",\"executable\":\"/usr/bin/whoami\",\"sha256\":\"bdc3d53d181fc6149049f6cb0a8db5b155557b41fd93093b7a7c42eff883aeaf\"},{\"command\":\"x86_64\",\"executable\":\"/usr/bin/setarch\",\"sha256\":\"9cbf126e4a5a2847313b38c766a6d52110bd31a2f90de871bc618166a046e624\"},{\"command\":\"x86_64-linux-gnu-addr2line\",\"executable\":\"/usr/bin/x86_64-linux-gnu-addr2line\",\"sha256\":\"a116f9e176f9f1ef6e2ab31ad41bacb9d2571b479725ebdfe10fb9cb70aa9e53\"},{\"command\":\"x86_64-linux-gnu-ar\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ar\",\"sha256\":\"6452af2eea333b8c65e1adb92964fc8f97863ab003fa13f9d12bff5345cd7dbe\"},{\"command\":\"x86_64-linux-gnu-as\",\"executable\":\"/usr/bin/x86_64-linux-gnu-as\",\"sha256\":\"21aff249b692b5c31a44007491f922dcb49f41323e362c57d2ada3f52eddb7f0\"},{\"command\":\"x86_64-linux-gnu-c++filt\",\"executable\":\"/usr/bin/x86_64-linux-gnu-c++filt\",\"sha256\":\"2c11b66c0fad24afc649517f890eaa8a6a4d4dceb1d613c5631bb96ff09352b4\"},{\"command\":\"x86_64-linux-gnu-cpp\",\"executable\":\"/usr/bin/x86_64-linux-gnu-cpp-13\",\"sha256\":\"c48f8b1b5ab757134970d17bc2ecd889df0d1245463036e834ab9be9d5e40765\"},{\"command\":\"x86_64-linux-gnu-cpp-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-cpp-13\",\"sha256\":\"c48f8b1b5ab757134970d17bc2ecd889df0d1245463036e834ab9be9d5e40765\"},{\"command\":\"x86_64-linux-gnu-dwp\",\"executable\":\"/usr/bin/x86_64-linux-gnu-dwp\",\"sha256\":\"b4c1bbd491718b74d93a384297728a8c242c62cd040187adc78355b736548553\"},{\"command\":\"x86_64-linux-gnu-elfedit\",\"executable\":\"/usr/bin/x86_64-linux-gnu-elfedit\",\"sha256\":\"c246c9722b60da558f104f8c517c760401bf995c9d4916954c0055a45e8bdb03\"},{\"command\":\"x86_64-linux-gnu-g++\",\"executable\":\"/usr/bin/x86_64-linux-gnu-g++-13\",\"sha256\":\"1353e9bdd29a7295c7226bf6c63abccce056d8cac31f112e5cdbecc3f28c2769\"},{\"command\":\"x86_64-linux-gnu-g++-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-g++-13\",\"sha256\":\"1353e9bdd29a7295c7226bf6c63abccce056d8cac31f112e5cdbecc3f28c2769\"},{\"command\":\"x86_64-linux-gnu-gcc\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-13\",\"sha256\":\"1b99826121ae6682a634e5efe09bd3e3df58ce58e0b28f849114ab5b89139c26\"},{\"command\":\"x86_64-linux-gnu-gcc-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-13\",\"sha256\":\"1b99826121ae6682a634e5efe09bd3e3df58ce58e0b28f849114ab5b89139c26\"},{\"command\":\"x86_64-linux-gnu-gcc-ar\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-ar-13\",\"sha256\":\"b980c6ffedb8ceb443f2a95bd3c935a4d6aba09fa05da66864cbcaf2ec79f5c3\"},{\"command\":\"x86_64-linux-gnu-gcc-ar-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-ar-13\",\"sha256\":\"b980c6ffedb8ceb443f2a95bd3c935a4d6aba09fa05da66864cbcaf2ec79f5c3\"},{\"command\":\"x86_64-linux-gnu-gcc-nm\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-nm-13\",\"sha256\":\"b7149256b3cb154a1670c0b17ac8d2c4a7cfa03180ccdef3a4cc5183dd9f1688\"},{\"command\":\"x86_64-linux-gnu-gcc-nm-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-nm-13\",\"sha256\":\"b7149256b3cb154a1670c0b17ac8d2c4a7cfa03180ccdef3a4cc5183dd9f1688\"},{\"command\":\"x86_64-linux-gnu-gcc-ranlib\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-ranlib-13\",\"sha256\":\"c685333bc0ce5a0b432a2263184b378c4182a897e2239091adffac5c965baad1\"},{\"command\":\"x86_64-linux-gnu-gcc-ranlib-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcc-ranlib-13\",\"sha256\":\"c685333bc0ce5a0b432a2263184b378c4182a897e2239091adffac5c965baad1\"},{\"command\":\"x86_64-linux-gnu-gcov\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-13\",\"sha256\":\"d6298eb8f6da8a5ab277498aac6e5c7695c4d0119d4b0c54285dd8bcf0f58e42\"},{\"command\":\"x86_64-linux-gnu-gcov-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-13\",\"sha256\":\"d6298eb8f6da8a5ab277498aac6e5c7695c4d0119d4b0c54285dd8bcf0f58e42\"},{\"command\":\"x86_64-linux-gnu-gcov-dump\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-dump-13\",\"sha256\":\"13b1027b23cd99ae477ee65495053f091fdbc906135d5b00b86273a8541035b9\"},{\"command\":\"x86_64-linux-gnu-gcov-dump-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-dump-13\",\"sha256\":\"13b1027b23cd99ae477ee65495053f091fdbc906135d5b00b86273a8541035b9\"},{\"command\":\"x86_64-linux-gnu-gcov-tool\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-tool-13\",\"sha256\":\"6b85d6f4b85ed0de1db931e73b957cd79cd95076357d957018d6906306fb213b\"},{\"command\":\"x86_64-linux-gnu-gcov-tool-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gcov-tool-13\",\"sha256\":\"6b85d6f4b85ed0de1db931e73b957cd79cd95076357d957018d6906306fb213b\"},{\"command\":\"x86_64-linux-gnu-gold\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ld.gold\",\"sha256\":\"1083eca2c464601fae4b561b1c240e7f787543261891229eebe0b112801c1e13\"},{\"command\":\"x86_64-linux-gnu-gp-archive\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-archive\",\"sha256\":\"c3264d9d4b4ce229bcbac43db09e16b57cae242226b449b7327637fe0660c6fb\"},{\"command\":\"x86_64-linux-gnu-gp-collect-app\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-collect-app\",\"sha256\":\"1b12058e818536a7c9febf81d621acf182d261f8464b1aee5d745be5dfcfa2b2\"},{\"command\":\"x86_64-linux-gnu-gp-display-html\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-display-html\",\"sha256\":\"538acc2bcc24a50de51e88b2d733d50b69237ebfee14660e45a0255215d9f582\"},{\"command\":\"x86_64-linux-gnu-gp-display-src\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-display-src\",\"sha256\":\"ba224f01f3c51400529841b905bcf69ec8087b1cf9d2c96ed062d8b43984c6d8\"},{\"command\":\"x86_64-linux-gnu-gp-display-text\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gp-display-text\",\"sha256\":\"2d7e0d598c873dc2b7735edc49309b7fab9db821cbb749b5ab8d62d1b9b66112\"},{\"command\":\"x86_64-linux-gnu-gprof\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gprof\",\"sha256\":\"71796a26dca3349994b73462bfb49980c05d6181f62c42d6e2c97aed1108a5a0\"},{\"command\":\"x86_64-linux-gnu-gprofng\",\"executable\":\"/usr/bin/x86_64-linux-gnu-gprofng\",\"sha256\":\"91e03573aeedded12a3b80e96ba28316968a8a86af78f0434cd7e87b7691df62\"},{\"command\":\"x86_64-linux-gnu-ld\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ld.bfd\",\"sha256\":\"e9ceb054c12207970f2726dfc07e9a66b411602748628baf27399f02a9bbb31b\"},{\"command\":\"x86_64-linux-gnu-ld.bfd\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ld.bfd\",\"sha256\":\"e9ceb054c12207970f2726dfc07e9a66b411602748628baf27399f02a9bbb31b\"},{\"command\":\"x86_64-linux-gnu-ld.gold\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ld.gold\",\"sha256\":\"1083eca2c464601fae4b561b1c240e7f787543261891229eebe0b112801c1e13\"},{\"command\":\"x86_64-linux-gnu-lto-dump\",\"executable\":\"/usr/bin/x86_64-linux-gnu-lto-dump-13\",\"sha256\":\"ed86753e90565306d3bd55483964eff30dc5b19a0a2cec80bd3c5825c4f8dd57\"},{\"command\":\"x86_64-linux-gnu-lto-dump-13\",\"executable\":\"/usr/bin/x86_64-linux-gnu-lto-dump-13\",\"sha256\":\"ed86753e90565306d3bd55483964eff30dc5b19a0a2cec80bd3c5825c4f8dd57\"},{\"command\":\"x86_64-linux-gnu-nm\",\"executable\":\"/usr/bin/x86_64-linux-gnu-nm\",\"sha256\":\"3708df3d7ce16e2c1dcdcd722784ae382d4d582276a71ab7bbe2d542f5621202\"},{\"command\":\"x86_64-linux-gnu-objcopy\",\"executable\":\"/usr/bin/x86_64-linux-gnu-objcopy\",\"sha256\":\"9276e918e3c26d3aa7ef9dd2232cd8ac692f03d3c1f270bfa5144a2b5492b713\"},{\"command\":\"x86_64-linux-gnu-objdump\",\"executable\":\"/usr/bin/x86_64-linux-gnu-objdump\",\"sha256\":\"325c4205a4c658a9d1e1ebc469ae55975a2b897a3d3c1e79d9b158612d37f745\"},{\"command\":\"x86_64-linux-gnu-pkg-config\",\"executable\":\"/usr/bin/pkgconf\",\"sha256\":\"7e8152db1b0c7e49d47b4b82a70dc9997b557951c5d4d938b0e7f208ce9eb10b\"},{\"command\":\"x86_64-linux-gnu-pkgconf\",\"executable\":\"/usr/bin/pkgconf\",\"sha256\":\"7e8152db1b0c7e49d47b4b82a70dc9997b557951c5d4d938b0e7f208ce9eb10b\"},{\"command\":\"x86_64-linux-gnu-ranlib\",\"executable\":\"/usr/bin/x86_64-linux-gnu-ranlib\",\"sha256\":\"60254978b8ee2c1b21b41d16a18a621dbbcc72e43eb2fa9f916818256c77e9ee\"},{\"command\":\"x86_64-linux-gnu-readelf\",\"executable\":\"/usr/bin/x86_64-linux-gnu-readelf\",\"sha256\":\"64c58e15274bbbb5153f31078e455e9e77ee5f51489e709bba5bb788ce9df2b0\"},{\"command\":\"x86_64-linux-gnu-size\",\"executable\":\"/usr/bin/x86_64-linux-gnu-size\",\"sha256\":\"ac2e5c6a62140912c3f36d5b65e12465eb75df372d81093a387a949a7d105fa9\"},{\"command\":\"x86_64-linux-gnu-strings\",\"executable\":\"/usr/bin/x86_64-linux-gnu-strings\",\"sha256\":\"04c76ab1b6e5039c321259351e8d576a597f60c45e41ff543dda5c8680256039\"},{\"command\":\"x86_64-linux-gnu-strip\",\"executable\":\"/usr/bin/x86_64-linux-gnu-strip\",\"sha256\":\"0d980587ada7ab12193f39271f060d5663aa2f289b0e80d2a0274ce7306e4e42\"},{\"command\":\"xargs\",\"executable\":\"/usr/bin/xargs\",\"sha256\":\"fa3818410ee7be85ca1484ce44e7c3043fb2d0b8402b42dcd9c3ffca78eb02fa\"},{\"command\":\"xauth\",\"executable\":\"/usr/bin/xauth\",\"sha256\":\"ffcb5f569bf9fce94cbf37f5d61790d463508c6122511a5f4c6e280d3633086e\"},{\"command\":\"xkbbell\",\"executable\":\"/usr/bin/xkbbell\",\"sha256\":\"c0995426a17c3f5e0d4b3e14d87fac2123b83610e9e4ae82cde74bc327586461\"},{\"command\":\"xkbcomp\",\"executable\":\"/usr/bin/xkbcomp\",\"sha256\":\"0967e7e7b03b077327cea74567726b265bd304b4fdf59f87bf7fdfe1074e7591\"},{\"command\":\"xkbevd\",\"executable\":\"/usr/bin/xkbevd\",\"sha256\":\"c942b3566e664d9345032ce0b5e51d693ec5d731d4c826672dca3675ad0e82d3\"},{\"command\":\"xkbprint\",\"executable\":\"/usr/bin/xkbprint\",\"sha256\":\"a15ecd04694f022166e9b8d9b83845c17140d9d775e70bac2bb0d1fff34f9170\"},{\"command\":\"xkbvleds\",\"executable\":\"/usr/bin/xkbvleds\",\"sha256\":\"22ca03b8615db64f507da23f20a98b192b25c4bbf14bc0933cb1aee766d2e436\"},{\"command\":\"xkbwatch\",\"executable\":\"/usr/bin/xkbwatch\",\"sha256\":\"8015a6735d25e78ed785adc9cc44982794fa44334ae87dabaeff40c0621ffd1a\"},{\"command\":\"xsubpp\",\"executable\":\"/usr/bin/xsubpp\",\"sha256\":\"c8c0f265dd2f3f247f179a5464bddfe6391b9e06996e961fa15c51c2e26e39a3\"},{\"command\":\"xvfb-run\",\"executable\":\"/usr/bin/xvfb-run\",\"sha256\":\"48ee444c30fdaaede4cc311644b30e554162e956f949b206858e37eb8ba1ae05\"},{\"command\":\"xz\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"b5b163eb273291934556377ab883b4b2a5d4da50bd0dc0a91774ecc234ccd8d0\"},{\"command\":\"xzcat\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"b5b163eb273291934556377ab883b4b2a5d4da50bd0dc0a91774ecc234ccd8d0\"},{\"command\":\"xzcmp\",\"executable\":\"/usr/bin/xzdiff\",\"sha256\":\"551e26acd2c7d3f56ab6f43916cfcaafb96955eda66b656f1ed9a708f52e7667\"},{\"command\":\"xzdiff\",\"executable\":\"/usr/bin/xzdiff\",\"sha256\":\"551e26acd2c7d3f56ab6f43916cfcaafb96955eda66b656f1ed9a708f52e7667\"},{\"command\":\"xzegrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"xzfgrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"xzgrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"xzless\",\"executable\":\"/usr/bin/xzless\",\"sha256\":\"a25b3dee9826b993f4fe0043e6d3073c6658925c28afc303917d62b1cf465051\"},{\"command\":\"xzmore\",\"executable\":\"/usr/bin/xzmore\",\"sha256\":\"e40b6cfbd6dcfd6fa46b721f7afb36efbbf3a8fbea1cd20f64b6123400f39306\"},{\"command\":\"yarn\",\"executable\":\"/usr/lib/node_modules/yarn/bin/yarn.js\",\"sha256\":\"148e19db309ec9eaf7720b28df811337906eea8a1758deaa54afee60a6305e04\"},{\"command\":\"yarnpkg\",\"executable\":\"/usr/lib/node_modules/yarn/bin/yarn.js\",\"sha256\":\"148e19db309ec9eaf7720b28df811337906eea8a1758deaa54afee60a6305e04\"},{\"command\":\"yes\",\"executable\":\"/usr/bin/yes\",\"sha256\":\"556e21eeb4cb2bf1ae9be95b3996259e055e8a8ac0918447afcce2a6f26ac96c\"},{\"command\":\"ypdomainname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"071fec20458397874e6121589d5210e7eed22a1b1afe16c2b9970b8a8233cc5b\"},{\"command\":\"zcat\",\"executable\":\"/usr/bin/zcat\",\"sha256\":\"f0b4d86b6a10064b7f2f41a452ab5437f61d4f17d8b1ab3488f3f345519f4f8d\"},{\"command\":\"zcmp\",\"executable\":\"/usr/bin/zcmp\",\"sha256\":\"6e6da15f127e06d61cbdabb59d3ec9b28b8605178dbe2acf7d275aa6d22e2d0f\"},{\"command\":\"zdiff\",\"executable\":\"/usr/bin/zdiff\",\"sha256\":\"1bcb10de5c01db497f845980ee4e79ec32f025443588a7410ba5001512a61ec9\"},{\"command\":\"zdump\",\"executable\":\"/usr/bin/zdump\",\"sha256\":\"f05239af3242000707dbed1186d973315ab5117464e4538fc3583054830a4abf\"},{\"command\":\"zegrep\",\"executable\":\"/usr/bin/zegrep\",\"sha256\":\"67ee7fadec7ea53b4c1f8cfc3c81427b29c0b1381e80b55642617620c84d0bcc\"},{\"command\":\"zfgrep\",\"executable\":\"/usr/bin/zfgrep\",\"sha256\":\"87ab5f4c7cb344e409d614d1a69cc156b3b1053d6ae0b59d8e2c2131f3e63e5a\"},{\"command\":\"zforce\",\"executable\":\"/usr/bin/zforce\",\"sha256\":\"61b3a0106c72648199611b79caf2e7a8c0800a8ef5745193cc0fa16455a79901\"},{\"command\":\"zgrep\",\"executable\":\"/usr/bin/zgrep\",\"sha256\":\"2f506d3547724df8e8dc9bdfa73bccb1a641b530fd5a40adc9b537f851d86b7f\"},{\"command\":\"zipdetails\",\"executable\":\"/usr/bin/zipdetails\",\"sha256\":\"58439587867aabee0504e493722c74e0725f649f4050848c91c59d48e90cd34f\"},{\"command\":\"zless\",\"executable\":\"/usr/bin/zless\",\"sha256\":\"e29f317fc56ce49eb5bd1e938b7f87923b91b40e5516ec9146f678519330f6bb\"},{\"command\":\"zmore\",\"executable\":\"/usr/bin/zmore\",\"sha256\":\"bb9ee270bee119238c74779fb5fa5cddc7939ec4923a22c5649bcb9aa7d70b76\"},{\"command\":\"znew\",\"executable\":\"/usr/bin/znew\",\"sha256\":\"969931d9eadae06db92a01b00458aa43d86bdf3692020d6f10b0fb8d060e1f38\"}],\"schema\":\"prismpm/sdk-inventory/1\"}\n","manifest_digest":"sha256:fc87624954a1985f2a6594946aa22ca16efc4095fe8d6d9b18f21c69e937f7dc","platform":"linux/amd64"},{"inventory":[{"digest":"sha256:1e88b7e9aa26ad5cd17601aad064de5b07c1251128b5def20f79d24438b5f4be","id":"action","kind":"workflow","version":"0.3.0"},{"digest":"sha256:5d63cd6921f790c8637e716b632d7777899f37166eff0a6010cd19d1e9127044","id":"adapter-compose","kind":"adapter","version":"compose-spec@fee041b381ffd4aad263410980bdce0cdf4beb7d"},{"digest":"sha256:db0425b35e875a36af50fb3a73e491af9badc759b6c290a731d6fd23fd62c119","id":"adapter-github-pages","kind":"adapter","version":"github-pages-artifact@v4"},{"digest":"sha256:59df071a35deca05e62224e43b82d7bc9b5c649f989a3424fd704123633a539e","id":"adapter-github-pages-browser","kind":"adapter","version":"github-pages-artifact@v4"},{"digest":"sha256:12021a034cb9b796f1ab6b4431e5cdbd9803e16181f6378ce580e40764b62ff6","id":"adapter-kubernetes","kind":"adapter","version":"1.36.4"},{"digest":"sha256:6bec0a3910568ff84f28b8fd9c2f63e3fcde7986bebf3e24b1f4649c150d735b","id":"asyncapi-3.1.0-official-corpus","kind":"test-corpus","version":"b3fac5bb522771428ea57b16129b273cd3ea0180"},{"digest":"sha256:87f962245c8ad4fa95a972f8f67ed9804df22ee385197ae403dafae8b375995e","id":"asyncapi-embedded-launcher","kind":"oracle","version":"1"},{"digest":"sha256:b93c35a475df94fa05d817de7d0a78d569b7c9be932004accdb4dad032bbb729","id":"asyncapi-embedded-runtime","kind":"oracle","version":"@asyncapi/parser/3.6.0"},{"digest":"sha256:5bd20ce206d3b3b76a7034951c9e19e15291c54eec0a1424139b465c980f1205","id":"asyncapi-embedded-runtime-lock","kind":"dependency-lock","version":"@asyncapi/parser/3.6.0"},{"digest":"sha256:dbb7252527064804ec138bb391c90b26d08d3db5d47c4995735d56865c3f9882","id":"asyncapi-embedded-runtime-tests","kind":"test-corpus","version":"1"},{"digest":"sha256:b10e96e4bda8f1971585e93fe2c6e3872af558d5ae185374fb7500933992ae60","id":"asyncapi-oracle","kind":"oracle","version":"3.1.0"},{"digest":"sha256:ace18379af8bcc5723f49c7d50e322fadb8bc5c34102cebba2bb4746f1d82b5b","id":"asyncapi-website-adeo-schemas","kind":"test-corpus","version":"20a31a0396b41dd24b1bac877ab7ce3f58037c28"},{"digest":"sha256:24d82f845768c66d79d87052a265a56e28ad576eb31495a31fdaf716cb6ea43d","id":"bootstrap-historical-runner","kind":"binary","version":"0.2.0-runner/1"},{"digest":"sha256:ed0f35e94108a629d4a163417bc13bf61e86a51fc6a7c05455fc7544ce8eec1b","id":"bootstrap-historical-runtime","kind":"binary","version":"0.2.0-runner/1"},{"digest":"sha256:3010124a16784fd361fd3527e8a0e8638d23da8e6ee951108b6e1a0a2c8804bb","id":"browser-account-genesis-construction","kind":"adapter","version":"1"},{"digest":"sha256:1607f069b641cc17df572eaab24fb2ce47288107e8f5a1fc670e94cc9eee3e88","id":"browser-host-primitives","kind":"adapter","version":"1"},{"digest":"sha256:0e2bcaef56d041a486784e54104a81aebe0da44bd03019bd70bc0401e42e4a97","id":"build-base","kind":"base-image","version":"rust-1.97.1-bookworm"},{"digest":"sha256:331555b57a45b264327ec4f034c189f64e20956b630a2d6b9053e767bbb53e90","id":"chromium-input-authority","kind":"dependency-lock","version":"157.0.8099.0"},{"digest":"sha256:ae6f7357f1eea754f07f555dd263d30f2d30ca8cf5440b2494c14facf34743af","id":"chromium-input-installer","kind":"oracle","version":"1"},{"digest":"sha256:48aa53d280e5e78275acfff62ae0173ac06fc86af86c379cad693e05e74a7803","id":"cloudevents-1.0.2-fixtures","kind":"test-corpus","version":"1.0.2"},{"digest":"sha256:519ec1d39566de154730bc87930f274be947d0eff0ce7d5ed00606cb4bda2117","id":"cloudevents-sdk-conformance","kind":"oracle","version":"2.16.2"},{"digest":"sha256:38480c5a48f73d20b8aa0db8366e22ae4ab34c245a370a11b8862cfbdeb5c6d1","id":"cloudevents-sdk-go-corpus","kind":"test-corpus","version":"2.16.2"},{"digest":"sha256:7d91646555ef85ca92aef3c100efd3c36a3b76b1f46000ffa1558b4715a25d58","id":"cloudevents-validator","kind":"oracle","version":"sdk-go/2.16.2"},{"digest":"sha256:cd65e860cbad537bf76598f8e910e9cb027f7c90b1f09252141837df0240d4af","id":"conformance-corpus","kind":"test-corpus","version":"prismpm/ids/1"},{"digest":"sha256:d16d2c85ab2024a98c62f0d8c9fc195f5177ee65e9d6598ac84ecc6e3ede4fed","id":"contracts","kind":"schema","version":"1"},{"digest":"sha256:4e850583cc68ffd8d739ddb8a782b83f2ef9d3bf437ae7c44da4fbfde2613a8e","id":"docker-buildx","kind":"binary","version":"0.28.0"},{"digest":"sha256:cf122ae443d3fcad8b90fe30277d3c37e008c60d56c9658a44848bdb6f2078d4","id":"git-tag-root-akihirosuda","kind":"trust-root","version":"github-key-record-5228653"},{"digest":"sha256:929c5c98f56be683921c84a1ccd542d0d8df3e75657c3711d5557da35267b637","id":"git-tag-root-hayden-io","kind":"trust-root","version":"github-key-record-682831"},{"digest":"sha256:c0f83ab885c007561550bda8d540e620b2ac4e36af0a4b48cd320854a3cf2ea4","id":"git-tag-root-songy23","kind":"trust-root","version":"github-key-record-276780"},{"digest":"sha256:e33e1416f08d6ee24f1c66f3895be7d919ff58c0d4318f2934ec4743f75f0a7e","id":"git-tag-root-sudo-bmitch","kind":"trust-root","version":"github-key-record-2155637"},{"digest":"sha256:6cbad548e30d2e227d1cea0ee23bb09c06c506c27094ccd8f55137d0bef17371","id":"in-toto-attestation-1.0-source","kind":"test-corpus","version":"ee16c68a11dfcfbdc891600cacd767896fe6e724"},{"digest":"sha256:ccda3abd60d6616425f0f4af1b1444dd1245e76c4c9fa1b8bba4d2f65e587f02","id":"intoto-statement-validator","kind":"oracle","version":"1.0@ee16c68a"},{"digest":"sha256:8f63dc2d12ed947bfa4ae4cabab2d5926ecc06d86d054b6a3a4f3454446b5551","id":"json-schema-2020-12-corpus","kind":"test-corpus","version":"c9510e3bf8a896c3cba4e08509cf752b4f30dff8"},{"digest":"sha256:79fb1d26fa5a39385d59fdc48a711a14b0710ca6480271acce99b4d177cea085","id":"lean","kind":"binary","version":"4.32.1"},{"digest":"sha256:29270825b581f950b3914509b7a0613f34964f003eb3c61772636d0805b09148","id":"lean4-prod","kind":"crate","version":"991956fe427bb646498fd0912c89b71be71e7beb"},{"digest":"sha256:a11a0a0245ee53ed4058eed14ca705d12a731131bd519069ce6e8e21bdd6f77d","id":"lean4-prod-exporter","kind":"binary","version":"991956fe427bb646498fd0912c89b71be71e7beb"},{"digest":"sha256:82bba2fcfabbaa1ae29d80331e2459ebfb663d777759ebe1fcd9b6121e61a504","id":"lean4-prod-exporter-seed","kind":"dependency-lock","version":"1"},{"digest":"sha256:8bc50bb93c2d510a366b879161ea5f0741e4039b6c43bd55c3b9b8a7b15f13de","id":"leanchecker","kind":"binary","version":"4.32.1"},{"digest":"sha256:fa5f07242a5ad0bffc563dae614bf83dec075043ad03c5486b54e2b478f752a5","id":"lexlean","kind":"binary","version":"0.3.0"},{"digest":"sha256:c3b22a1cef1975004c948e04005f02c013c02f9698c04da07998e9e13e875acc","id":"oci-distribution-1.1.1-corpus","kind":"test-corpus","version":"a139cc423184af6078077b9b7ee336eddbd03f8f"},{"digest":"sha256:6fa5e5b29dd6727e2e0af3eacdac7f5597a77bde14ef16957467ebfe42cc40fd","id":"oci-distribution-conformance","kind":"oracle","version":"1.1.1@a139cc42"},{"digest":"sha256:6c00d78efd45b6a3acc798497851b21585867042cbdc63dbe0c105825b8dac91","id":"oci-image-1.1.1-corpus","kind":"test-corpus","version":"147f9c13cedb47a0c4d9a11a222961073d585877"},{"digest":"sha256:b1342cb1c38c1072e2c86a0e35343605d2bf5c63affa768a5116c1d5fc68e4b0","id":"oci-image-schema-conformance","kind":"oracle","version":"1.1.1@147f9c13"},{"digest":"sha256:9bf0da1272040438e13ce349a39a1dd036c3432f82e2cec5b17d2aa7db316e8a","id":"oci-runtime-1.3.0-corpus","kind":"test-corpus","version":"92249139eea7161e13745abd4cb6d0ea02a3227a"},{"digest":"sha256:e2a80254467d17855b584e82aaf1c248c7cbe58ad6a18c4af3d7d783b7081b78","id":"oci-runtime-validate","kind":"oracle","version":"1.3.0@92249139"},{"digest":"sha256:7ee100439bc7dc35cda162b85be68140338bdae5aa3c2fb79412cca621bdd9b1","id":"openid-conformance","kind":"oracle","version":"3e09b13b896f"},{"digest":"sha256:a35012f67dccd4296ab0e380eb86a0e053dbbf6bf52522aca3ed961c83812197","id":"openid-conformance-suite-corpus","kind":"test-corpus","version":"3e09b13b896fce95d78c2c0f931feee9614e9452"},{"digest":"sha256:90cdf6a86d9f2f7c9b60f66c9be7c296b394dfef57ac5e28d78965565252f223","id":"opentelemetry-0.136.0-signal-corpus","kind":"test-corpus","version":"0.136.0"},{"digest":"sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e","id":"playwright-chromium","kind":"oracle","version":"1.62.1"},{"digest":"sha256:8d81de4103b7e342d0f997526d84fb334bf92b562f1035bc66da8b77a0b02ab7","id":"playwright-core","kind":"oracle","version":"1.62.1"},{"digest":"sha256:bf3497a2d26912da443d74ef55c0d8155e00a781e3e6c966368d8bd2c8380b5c","id":"playwright-driver","kind":"oracle","version":"1.62.1"},{"digest":"sha256:49e77977a9f39581feb53d2b3e058790417236010d41e982930b3aeafb35a159","id":"playwright-headless-shell","kind":"oracle","version":"157.0.8099.0"},{"digest":"sha256:58f398f5453e170e19842360ac1bb3ceda2ea032306527bbeb3adf6650b52bca","id":"prism-stdlib","kind":"crate","version":"0.2.0"},{"digest":"sha256:62da63d950a9bee4bd2a7d8c5ff254222aca45780c9b5862856a5dff61e9fe7b","id":"prismpm","kind":"binary","version":"0.3.0"},{"digest":"sha256:578e2e0ab7ee0859ee39b6f45d72b6c79ae5680b9f17c22264ed374db7bc1b11","id":"prismpm-conformance","kind":"binary","version":"0.3.0"},{"digest":"sha256:909e32fb88aaa039f362d1bba795ae97762c1957d297223c454a457ed8e90d9a","id":"prismpm-platform-equivalence","kind":"binary","version":"0.3.0"},{"digest":"sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e","id":"runtime-base","kind":"base-image","version":"playwright-v1.62.1-noble"},{"digest":"sha256:22cb82bbc6142c670dfc2b21b225d01edcd036c4e870ef4b668c9e3efa8bb6f1","id":"runtime-os-lock","kind":"dependency-lock","version":"ubuntu-noble@20260901T000000Z"},{"digest":"sha256:2fa9d3ee26c523899ae5314861306daff716320095cd638f1cd54fbff44cd208","id":"sdk-exporter-seed-producer","kind":"schema","version":"1"},{"digest":"sha256:18d8f8d10061d2e4d4ee627cd051481cb79ea366300d191a0e7f81ac8f87f182","id":"sdk-image-input-authorities","kind":"test-corpus","version":"1"},{"digest":"sha256:7f441845b1a471b97b9756b7cbe3f48c6e1997be9acd36cece415111c8453d79","id":"sdk-image-input-verifier","kind":"test-corpus","version":"1"},{"digest":"sha256:d025c5be578b5d2b334c02917cefa3ff60a1fd8b21de7d06348a300ec1b8a072","id":"sdk-metadata-capture","kind":"schema","version":"1"},{"digest":"sha256:d84af5d749355ea4dd97519ee1a7710cc43d8f307d1b8c43cdf93f3e51c24db1","id":"sdk-metadata-cli","kind":"schema","version":"1"},{"digest":"sha256:fb287316d82f21b36386f3a6532af61d4205cee18b74f4c3db2737a90113037d","id":"sdk-metadata-credentials","kind":"schema","version":"1"},{"digest":"sha256:6945bb2808808d2ca6ed237dadfe5749989a0f9c94579ab64280f3e84592cbdf","id":"sdk-metadata-helper","kind":"schema","version":"1"},{"digest":"sha256:3f860b40d5ad29751a592d50f1dc703cdef04a0f0929bcefd90cc844ccc58d43","id":"sdk-metadata-helper-supervisor","kind":"schema","version":"1"},{"digest":"sha256:52951e1caf9eb692436f83c5c5dc0f23ec0a864926140ee3db1e217d823707d5","id":"sdk-metadata-layer","kind":"schema","version":"1"},{"digest":"sha256:ab7c2ce88b40760294514ca846cda0671a8709438c8361f0a18fa1ffa4030732","id":"sdk-metadata-transport","kind":"schema","version":"1"},{"digest":"sha256:870ece6967ce85585dd1935f742ef05d8a4a4111d54ea30b541a43857b43533b","id":"sdk-platform-lock","kind":"schema","version":"2"},{"digest":"sha256:6e0162633a2d8b8ec973c6fb15e1d48e55f92c5889b90961a3a1b17937aa3e97","id":"sdk-vv-advisory","kind":"test-corpus","version":"d5c17953a895cf19e8d3ce66eaa42b6fcfe1fb16"},{"digest":"sha256:f3dd999f5618db154fa06222a06f9de95d86e1dbf683954426ea91c974cbe24c","id":"sdk-vv-bootstrap","kind":"test-corpus","version":"0.2.0"},{"digest":"sha256:f66e5cd2482cf80b5b529b7688b14602753cb8654707a0762c0a49f333d71091","id":"sdk-vv-manifest","kind":"test-corpus","version":"1"},{"digest":"sha256:96c3af78e543b0d02d8972816daee3b58ef421e667cb41d4ea7b421653aa73a9","id":"sdk-vv-policy","kind":"test-corpus","version":"1"},{"digest":"sha256:ecac1c34797bad411cf8a5b9bfe9a1d3c58d33d6c4ec0b25e21be89a92156840","id":"sdk-vv-source","kind":"test-corpus","version":"35e9f01d5415ed4b0b64c152238f291546957ec4"},{"digest":"sha256:d9028fd7692fae3a56dd29848c629ea564e67bbf3f6804f557f6b153a1ceb35c","id":"sdk-vv-verifier","kind":"test-corpus","version":"1"},{"digest":"sha256:844a1c6de3986c9f02070266b25e0d1a2fa99ceccc89f6b9ad90aae47b62a16e","id":"sigstore-trusted-root","kind":"trust-root","version":"cosign-3.1.3-default-services"},{"digest":"sha256:2fa271a49fd04807437003e3a2e8d7d39c3b635b4815a72d1ec2f5f216adaaea","id":"spdx-3.0.1-fixtures","kind":"test-corpus","version":"3.0.1"},{"digest":"sha256:8db53aa63cfc7565f79e057a4da362d4144c546d56320a51b838befe8371b17d","id":"spdx-3.0.1-model","kind":"test-corpus","version":"a745f63e8643d5ae0f0851fcfa6836085308f80b"},{"digest":"sha256:e611189a0028aa1ac4bbd2ee3f06c664a39c7351c65e942b3f2b53e4ab1e3212","id":"spdx-3.0.1-schema","kind":"schema","version":"3.0.1"},{"digest":"sha256:e2670b02913ab07bef777fe30075892652b2fd8b78ca396d83916368946334a1","id":"spdx-validator","kind":"oracle","version":"ajv-8.20.0+spdx-3.0.1"},{"digest":"sha256:54448d21cb1ed3a4af826aa44991e9839b51d97b8975a5b125927c78af922b46","id":"standards-and-oracles","kind":"oracle","version":"prismpm/standards-lock/1"},{"digest":"sha256:840617fbc4df682f893bdefe4f5320de16aebabc20c84936c8a583765e890ff0","id":"stdlib-sources","kind":"crate","version":"0.2.0-sources"},{"digest":"sha256:3629fa180f625d4de2e3fd3b15b12c5d42315e5733ecae6d1550b306abd7d482","id":"timeout","kind":"binary","version":"coreutils-9.4"},{"digest":"sha256:1885ce2b3409b4f2b4a569c378d243f4a75e22fc10d59a69a69a1cacc16dda9e","id":"unicode-17.0.0-normalization-corpus","kind":"test-corpus","version":"17.0.0"},{"digest":"sha256:299e79e16e6c76cd6b770c66763f436e5b6a947b4280926b9d3b4e3ec99c885b","id":"workflow-reusable-sdk","kind":"workflow","version":"0.3.0"}],"inventory_digest":"sha256:48670d0e608c04d2f4a7415a240a3fc7c9082016854fbd240953d15dc3858108","inventory_document":"{\"artifacts\":[{\"digest\":\"sha256:1e88b7e9aa26ad5cd17601aad064de5b07c1251128b5def20f79d24438b5f4be\",\"id\":\"action\",\"kind\":\"workflow\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:5d63cd6921f790c8637e716b632d7777899f37166eff0a6010cd19d1e9127044\",\"id\":\"adapter-compose\",\"kind\":\"adapter\",\"version\":\"compose-spec@fee041b381ffd4aad263410980bdce0cdf4beb7d\"},{\"digest\":\"sha256:db0425b35e875a36af50fb3a73e491af9badc759b6c290a731d6fd23fd62c119\",\"id\":\"adapter-github-pages\",\"kind\":\"adapter\",\"version\":\"github-pages-artifact@v4\"},{\"digest\":\"sha256:59df071a35deca05e62224e43b82d7bc9b5c649f989a3424fd704123633a539e\",\"id\":\"adapter-github-pages-browser\",\"kind\":\"adapter\",\"version\":\"github-pages-artifact@v4\"},{\"digest\":\"sha256:12021a034cb9b796f1ab6b4431e5cdbd9803e16181f6378ce580e40764b62ff6\",\"id\":\"adapter-kubernetes\",\"kind\":\"adapter\",\"version\":\"1.36.4\"},{\"digest\":\"sha256:6bec0a3910568ff84f28b8fd9c2f63e3fcde7986bebf3e24b1f4649c150d735b\",\"id\":\"asyncapi-3.1.0-official-corpus\",\"kind\":\"test-corpus\",\"version\":\"b3fac5bb522771428ea57b16129b273cd3ea0180\"},{\"digest\":\"sha256:87f962245c8ad4fa95a972f8f67ed9804df22ee385197ae403dafae8b375995e\",\"id\":\"asyncapi-embedded-launcher\",\"kind\":\"oracle\",\"version\":\"1\"},{\"digest\":\"sha256:b93c35a475df94fa05d817de7d0a78d569b7c9be932004accdb4dad032bbb729\",\"id\":\"asyncapi-embedded-runtime\",\"kind\":\"oracle\",\"version\":\"@asyncapi/parser/3.6.0\"},{\"digest\":\"sha256:5bd20ce206d3b3b76a7034951c9e19e15291c54eec0a1424139b465c980f1205\",\"id\":\"asyncapi-embedded-runtime-lock\",\"kind\":\"dependency-lock\",\"version\":\"@asyncapi/parser/3.6.0\"},{\"digest\":\"sha256:dbb7252527064804ec138bb391c90b26d08d3db5d47c4995735d56865c3f9882\",\"id\":\"asyncapi-embedded-runtime-tests\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:b10e96e4bda8f1971585e93fe2c6e3872af558d5ae185374fb7500933992ae60\",\"id\":\"asyncapi-oracle\",\"kind\":\"oracle\",\"version\":\"3.1.0\"},{\"digest\":\"sha256:ace18379af8bcc5723f49c7d50e322fadb8bc5c34102cebba2bb4746f1d82b5b\",\"id\":\"asyncapi-website-adeo-schemas\",\"kind\":\"test-corpus\",\"version\":\"20a31a0396b41dd24b1bac877ab7ce3f58037c28\"},{\"digest\":\"sha256:24d82f845768c66d79d87052a265a56e28ad576eb31495a31fdaf716cb6ea43d\",\"id\":\"bootstrap-historical-runner\",\"kind\":\"binary\",\"version\":\"0.2.0-runner/1\"},{\"digest\":\"sha256:ed0f35e94108a629d4a163417bc13bf61e86a51fc6a7c05455fc7544ce8eec1b\",\"id\":\"bootstrap-historical-runtime\",\"kind\":\"binary\",\"version\":\"0.2.0-runner/1\"},{\"digest\":\"sha256:3010124a16784fd361fd3527e8a0e8638d23da8e6ee951108b6e1a0a2c8804bb\",\"id\":\"browser-account-genesis-construction\",\"kind\":\"adapter\",\"version\":\"1\"},{\"digest\":\"sha256:1607f069b641cc17df572eaab24fb2ce47288107e8f5a1fc670e94cc9eee3e88\",\"id\":\"browser-host-primitives\",\"kind\":\"adapter\",\"version\":\"1\"},{\"digest\":\"sha256:0e2bcaef56d041a486784e54104a81aebe0da44bd03019bd70bc0401e42e4a97\",\"id\":\"build-base\",\"kind\":\"base-image\",\"version\":\"rust-1.97.1-bookworm\"},{\"digest\":\"sha256:331555b57a45b264327ec4f034c189f64e20956b630a2d6b9053e767bbb53e90\",\"id\":\"chromium-input-authority\",\"kind\":\"dependency-lock\",\"version\":\"157.0.8099.0\"},{\"digest\":\"sha256:ae6f7357f1eea754f07f555dd263d30f2d30ca8cf5440b2494c14facf34743af\",\"id\":\"chromium-input-installer\",\"kind\":\"oracle\",\"version\":\"1\"},{\"digest\":\"sha256:48aa53d280e5e78275acfff62ae0173ac06fc86af86c379cad693e05e74a7803\",\"id\":\"cloudevents-1.0.2-fixtures\",\"kind\":\"test-corpus\",\"version\":\"1.0.2\"},{\"digest\":\"sha256:519ec1d39566de154730bc87930f274be947d0eff0ce7d5ed00606cb4bda2117\",\"id\":\"cloudevents-sdk-conformance\",\"kind\":\"oracle\",\"version\":\"2.16.2\"},{\"digest\":\"sha256:38480c5a48f73d20b8aa0db8366e22ae4ab34c245a370a11b8862cfbdeb5c6d1\",\"id\":\"cloudevents-sdk-go-corpus\",\"kind\":\"test-corpus\",\"version\":\"2.16.2\"},{\"digest\":\"sha256:7d91646555ef85ca92aef3c100efd3c36a3b76b1f46000ffa1558b4715a25d58\",\"id\":\"cloudevents-validator\",\"kind\":\"oracle\",\"version\":\"sdk-go/2.16.2\"},{\"digest\":\"sha256:cd65e860cbad537bf76598f8e910e9cb027f7c90b1f09252141837df0240d4af\",\"id\":\"conformance-corpus\",\"kind\":\"test-corpus\",\"version\":\"prismpm/ids/1\"},{\"digest\":\"sha256:d16d2c85ab2024a98c62f0d8c9fc195f5177ee65e9d6598ac84ecc6e3ede4fed\",\"id\":\"contracts\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:4e850583cc68ffd8d739ddb8a782b83f2ef9d3bf437ae7c44da4fbfde2613a8e\",\"id\":\"docker-buildx\",\"kind\":\"binary\",\"version\":\"0.28.0\"},{\"digest\":\"sha256:cf122ae443d3fcad8b90fe30277d3c37e008c60d56c9658a44848bdb6f2078d4\",\"id\":\"git-tag-root-akihirosuda\",\"kind\":\"trust-root\",\"version\":\"github-key-record-5228653\"},{\"digest\":\"sha256:929c5c98f56be683921c84a1ccd542d0d8df3e75657c3711d5557da35267b637\",\"id\":\"git-tag-root-hayden-io\",\"kind\":\"trust-root\",\"version\":\"github-key-record-682831\"},{\"digest\":\"sha256:c0f83ab885c007561550bda8d540e620b2ac4e36af0a4b48cd320854a3cf2ea4\",\"id\":\"git-tag-root-songy23\",\"kind\":\"trust-root\",\"version\":\"github-key-record-276780\"},{\"digest\":\"sha256:e33e1416f08d6ee24f1c66f3895be7d919ff58c0d4318f2934ec4743f75f0a7e\",\"id\":\"git-tag-root-sudo-bmitch\",\"kind\":\"trust-root\",\"version\":\"github-key-record-2155637\"},{\"digest\":\"sha256:6cbad548e30d2e227d1cea0ee23bb09c06c506c27094ccd8f55137d0bef17371\",\"id\":\"in-toto-attestation-1.0-source\",\"kind\":\"test-corpus\",\"version\":\"ee16c68a11dfcfbdc891600cacd767896fe6e724\"},{\"digest\":\"sha256:ccda3abd60d6616425f0f4af1b1444dd1245e76c4c9fa1b8bba4d2f65e587f02\",\"id\":\"intoto-statement-validator\",\"kind\":\"oracle\",\"version\":\"1.0@ee16c68a\"},{\"digest\":\"sha256:8f63dc2d12ed947bfa4ae4cabab2d5926ecc06d86d054b6a3a4f3454446b5551\",\"id\":\"json-schema-2020-12-corpus\",\"kind\":\"test-corpus\",\"version\":\"c9510e3bf8a896c3cba4e08509cf752b4f30dff8\"},{\"digest\":\"sha256:79fb1d26fa5a39385d59fdc48a711a14b0710ca6480271acce99b4d177cea085\",\"id\":\"lean\",\"kind\":\"binary\",\"version\":\"4.32.1\"},{\"digest\":\"sha256:29270825b581f950b3914509b7a0613f34964f003eb3c61772636d0805b09148\",\"id\":\"lean4-prod\",\"kind\":\"crate\",\"version\":\"991956fe427bb646498fd0912c89b71be71e7beb\"},{\"digest\":\"sha256:a11a0a0245ee53ed4058eed14ca705d12a731131bd519069ce6e8e21bdd6f77d\",\"id\":\"lean4-prod-exporter\",\"kind\":\"binary\",\"version\":\"991956fe427bb646498fd0912c89b71be71e7beb\"},{\"digest\":\"sha256:82bba2fcfabbaa1ae29d80331e2459ebfb663d777759ebe1fcd9b6121e61a504\",\"id\":\"lean4-prod-exporter-seed\",\"kind\":\"dependency-lock\",\"version\":\"1\"},{\"digest\":\"sha256:8bc50bb93c2d510a366b879161ea5f0741e4039b6c43bd55c3b9b8a7b15f13de\",\"id\":\"leanchecker\",\"kind\":\"binary\",\"version\":\"4.32.1\"},{\"digest\":\"sha256:fa5f07242a5ad0bffc563dae614bf83dec075043ad03c5486b54e2b478f752a5\",\"id\":\"lexlean\",\"kind\":\"binary\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:c3b22a1cef1975004c948e04005f02c013c02f9698c04da07998e9e13e875acc\",\"id\":\"oci-distribution-1.1.1-corpus\",\"kind\":\"test-corpus\",\"version\":\"a139cc423184af6078077b9b7ee336eddbd03f8f\"},{\"digest\":\"sha256:6fa5e5b29dd6727e2e0af3eacdac7f5597a77bde14ef16957467ebfe42cc40fd\",\"id\":\"oci-distribution-conformance\",\"kind\":\"oracle\",\"version\":\"1.1.1@a139cc42\"},{\"digest\":\"sha256:6c00d78efd45b6a3acc798497851b21585867042cbdc63dbe0c105825b8dac91\",\"id\":\"oci-image-1.1.1-corpus\",\"kind\":\"test-corpus\",\"version\":\"147f9c13cedb47a0c4d9a11a222961073d585877\"},{\"digest\":\"sha256:b1342cb1c38c1072e2c86a0e35343605d2bf5c63affa768a5116c1d5fc68e4b0\",\"id\":\"oci-image-schema-conformance\",\"kind\":\"oracle\",\"version\":\"1.1.1@147f9c13\"},{\"digest\":\"sha256:9bf0da1272040438e13ce349a39a1dd036c3432f82e2cec5b17d2aa7db316e8a\",\"id\":\"oci-runtime-1.3.0-corpus\",\"kind\":\"test-corpus\",\"version\":\"92249139eea7161e13745abd4cb6d0ea02a3227a\"},{\"digest\":\"sha256:e2a80254467d17855b584e82aaf1c248c7cbe58ad6a18c4af3d7d783b7081b78\",\"id\":\"oci-runtime-validate\",\"kind\":\"oracle\",\"version\":\"1.3.0@92249139\"},{\"digest\":\"sha256:7ee100439bc7dc35cda162b85be68140338bdae5aa3c2fb79412cca621bdd9b1\",\"id\":\"openid-conformance\",\"kind\":\"oracle\",\"version\":\"3e09b13b896f\"},{\"digest\":\"sha256:a35012f67dccd4296ab0e380eb86a0e053dbbf6bf52522aca3ed961c83812197\",\"id\":\"openid-conformance-suite-corpus\",\"kind\":\"test-corpus\",\"version\":\"3e09b13b896fce95d78c2c0f931feee9614e9452\"},{\"digest\":\"sha256:90cdf6a86d9f2f7c9b60f66c9be7c296b394dfef57ac5e28d78965565252f223\",\"id\":\"opentelemetry-0.136.0-signal-corpus\",\"kind\":\"test-corpus\",\"version\":\"0.136.0\"},{\"digest\":\"sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e\",\"id\":\"playwright-chromium\",\"kind\":\"oracle\",\"version\":\"1.62.1\"},{\"digest\":\"sha256:8d81de4103b7e342d0f997526d84fb334bf92b562f1035bc66da8b77a0b02ab7\",\"id\":\"playwright-core\",\"kind\":\"oracle\",\"version\":\"1.62.1\"},{\"digest\":\"sha256:bf3497a2d26912da443d74ef55c0d8155e00a781e3e6c966368d8bd2c8380b5c\",\"id\":\"playwright-driver\",\"kind\":\"oracle\",\"version\":\"1.62.1\"},{\"digest\":\"sha256:49e77977a9f39581feb53d2b3e058790417236010d41e982930b3aeafb35a159\",\"id\":\"playwright-headless-shell\",\"kind\":\"oracle\",\"version\":\"157.0.8099.0\"},{\"digest\":\"sha256:58f398f5453e170e19842360ac1bb3ceda2ea032306527bbeb3adf6650b52bca\",\"id\":\"prism-stdlib\",\"kind\":\"crate\",\"version\":\"0.2.0\"},{\"digest\":\"sha256:62da63d950a9bee4bd2a7d8c5ff254222aca45780c9b5862856a5dff61e9fe7b\",\"id\":\"prismpm\",\"kind\":\"binary\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:578e2e0ab7ee0859ee39b6f45d72b6c79ae5680b9f17c22264ed374db7bc1b11\",\"id\":\"prismpm-conformance\",\"kind\":\"binary\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:909e32fb88aaa039f362d1bba795ae97762c1957d297223c454a457ed8e90d9a\",\"id\":\"prismpm-platform-equivalence\",\"kind\":\"binary\",\"version\":\"0.3.0\"},{\"digest\":\"sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e\",\"id\":\"runtime-base\",\"kind\":\"base-image\",\"version\":\"playwright-v1.62.1-noble\"},{\"digest\":\"sha256:22cb82bbc6142c670dfc2b21b225d01edcd036c4e870ef4b668c9e3efa8bb6f1\",\"id\":\"runtime-os-lock\",\"kind\":\"dependency-lock\",\"version\":\"ubuntu-noble@20260901T000000Z\"},{\"digest\":\"sha256:2fa9d3ee26c523899ae5314861306daff716320095cd638f1cd54fbff44cd208\",\"id\":\"sdk-exporter-seed-producer\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:18d8f8d10061d2e4d4ee627cd051481cb79ea366300d191a0e7f81ac8f87f182\",\"id\":\"sdk-image-input-authorities\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:7f441845b1a471b97b9756b7cbe3f48c6e1997be9acd36cece415111c8453d79\",\"id\":\"sdk-image-input-verifier\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:d025c5be578b5d2b334c02917cefa3ff60a1fd8b21de7d06348a300ec1b8a072\",\"id\":\"sdk-metadata-capture\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:d84af5d749355ea4dd97519ee1a7710cc43d8f307d1b8c43cdf93f3e51c24db1\",\"id\":\"sdk-metadata-cli\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:fb287316d82f21b36386f3a6532af61d4205cee18b74f4c3db2737a90113037d\",\"id\":\"sdk-metadata-credentials\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:6945bb2808808d2ca6ed237dadfe5749989a0f9c94579ab64280f3e84592cbdf\",\"id\":\"sdk-metadata-helper\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:3f860b40d5ad29751a592d50f1dc703cdef04a0f0929bcefd90cc844ccc58d43\",\"id\":\"sdk-metadata-helper-supervisor\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:52951e1caf9eb692436f83c5c5dc0f23ec0a864926140ee3db1e217d823707d5\",\"id\":\"sdk-metadata-layer\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:ab7c2ce88b40760294514ca846cda0671a8709438c8361f0a18fa1ffa4030732\",\"id\":\"sdk-metadata-transport\",\"kind\":\"schema\",\"version\":\"1\"},{\"digest\":\"sha256:870ece6967ce85585dd1935f742ef05d8a4a4111d54ea30b541a43857b43533b\",\"id\":\"sdk-platform-lock\",\"kind\":\"schema\",\"version\":\"2\"},{\"digest\":\"sha256:6e0162633a2d8b8ec973c6fb15e1d48e55f92c5889b90961a3a1b17937aa3e97\",\"id\":\"sdk-vv-advisory\",\"kind\":\"test-corpus\",\"version\":\"d5c17953a895cf19e8d3ce66eaa42b6fcfe1fb16\"},{\"digest\":\"sha256:f3dd999f5618db154fa06222a06f9de95d86e1dbf683954426ea91c974cbe24c\",\"id\":\"sdk-vv-bootstrap\",\"kind\":\"test-corpus\",\"version\":\"0.2.0\"},{\"digest\":\"sha256:f66e5cd2482cf80b5b529b7688b14602753cb8654707a0762c0a49f333d71091\",\"id\":\"sdk-vv-manifest\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:96c3af78e543b0d02d8972816daee3b58ef421e667cb41d4ea7b421653aa73a9\",\"id\":\"sdk-vv-policy\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:ecac1c34797bad411cf8a5b9bfe9a1d3c58d33d6c4ec0b25e21be89a92156840\",\"id\":\"sdk-vv-source\",\"kind\":\"test-corpus\",\"version\":\"35e9f01d5415ed4b0b64c152238f291546957ec4\"},{\"digest\":\"sha256:d9028fd7692fae3a56dd29848c629ea564e67bbf3f6804f557f6b153a1ceb35c\",\"id\":\"sdk-vv-verifier\",\"kind\":\"test-corpus\",\"version\":\"1\"},{\"digest\":\"sha256:844a1c6de3986c9f02070266b25e0d1a2fa99ceccc89f6b9ad90aae47b62a16e\",\"id\":\"sigstore-trusted-root\",\"kind\":\"trust-root\",\"version\":\"cosign-3.1.3-default-services\"},{\"digest\":\"sha256:2fa271a49fd04807437003e3a2e8d7d39c3b635b4815a72d1ec2f5f216adaaea\",\"id\":\"spdx-3.0.1-fixtures\",\"kind\":\"test-corpus\",\"version\":\"3.0.1\"},{\"digest\":\"sha256:8db53aa63cfc7565f79e057a4da362d4144c546d56320a51b838befe8371b17d\",\"id\":\"spdx-3.0.1-model\",\"kind\":\"test-corpus\",\"version\":\"a745f63e8643d5ae0f0851fcfa6836085308f80b\"},{\"digest\":\"sha256:e611189a0028aa1ac4bbd2ee3f06c664a39c7351c65e942b3f2b53e4ab1e3212\",\"id\":\"spdx-3.0.1-schema\",\"kind\":\"schema\",\"version\":\"3.0.1\"},{\"digest\":\"sha256:e2670b02913ab07bef777fe30075892652b2fd8b78ca396d83916368946334a1\",\"id\":\"spdx-validator\",\"kind\":\"oracle\",\"version\":\"ajv-8.20.0+spdx-3.0.1\"},{\"digest\":\"sha256:54448d21cb1ed3a4af826aa44991e9839b51d97b8975a5b125927c78af922b46\",\"id\":\"standards-and-oracles\",\"kind\":\"oracle\",\"version\":\"prismpm/standards-lock/1\"},{\"digest\":\"sha256:840617fbc4df682f893bdefe4f5320de16aebabc20c84936c8a583765e890ff0\",\"id\":\"stdlib-sources\",\"kind\":\"crate\",\"version\":\"0.2.0-sources\"},{\"digest\":\"sha256:3629fa180f625d4de2e3fd3b15b12c5d42315e5733ecae6d1550b306abd7d482\",\"id\":\"timeout\",\"kind\":\"binary\",\"version\":\"coreutils-9.4\"},{\"digest\":\"sha256:1885ce2b3409b4f2b4a569c378d243f4a75e22fc10d59a69a69a1cacc16dda9e\",\"id\":\"unicode-17.0.0-normalization-corpus\",\"kind\":\"test-corpus\",\"version\":\"17.0.0\"},{\"digest\":\"sha256:299e79e16e6c76cd6b770c66763f436e5b6a947b4280926b9d3b4e3ec99c885b\",\"id\":\"workflow-reusable-sdk\",\"kind\":\"workflow\",\"version\":\"0.3.0\"}],\"commands\":[{\"command\":\"Xvfb\",\"executable\":\"/usr/bin/Xvfb\",\"sha256\":\"5ca4be733f4b4599f684563771f87d4672f1caf9a06b55613ec5dff66fec8bd9\"},{\"command\":\"[\",\"executable\":\"/usr/bin/[\",\"sha256\":\"598445e174e4da2c39135e7a8d92e7595eb1ccfb38c4e8583ed15f22a1703339\"},{\"command\":\"aarch64-linux-gnu-addr2line\",\"executable\":\"/usr/bin/aarch64-linux-gnu-addr2line\",\"sha256\":\"ed4a2a90659b5a37a0c5b11cabb87cf98dfc1b3ece62ef11d66758bbb0af8d5c\"},{\"command\":\"aarch64-linux-gnu-ar\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ar\",\"sha256\":\"f4583a612510e038dbc1ae8afb5eae5f0445c435bdd7c4c28e78acc7e757d2b1\"},{\"command\":\"aarch64-linux-gnu-as\",\"executable\":\"/usr/bin/aarch64-linux-gnu-as\",\"sha256\":\"1ffda50efb6d91b6b05ef933aced099595c36577594c0296c91161f2d13db374\"},{\"command\":\"aarch64-linux-gnu-c++filt\",\"executable\":\"/usr/bin/aarch64-linux-gnu-c++filt\",\"sha256\":\"aa08d269fe1c87b8737179c9c07813f615366185d4e7668c7c503e8278daa62f\"},{\"command\":\"aarch64-linux-gnu-cpp\",\"executable\":\"/usr/bin/aarch64-linux-gnu-cpp-13\",\"sha256\":\"f1cb3f991a50e83bce2b9f9573fe280a2572208ef88805adcf5de317f86f230e\"},{\"command\":\"aarch64-linux-gnu-cpp-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-cpp-13\",\"sha256\":\"f1cb3f991a50e83bce2b9f9573fe280a2572208ef88805adcf5de317f86f230e\"},{\"command\":\"aarch64-linux-gnu-dwp\",\"executable\":\"/usr/bin/aarch64-linux-gnu-dwp\",\"sha256\":\"5c3139afd1082faea0e0e42af65af52f15a2bc2f6dcce7014a2d0bd77309486c\"},{\"command\":\"aarch64-linux-gnu-elfedit\",\"executable\":\"/usr/bin/aarch64-linux-gnu-elfedit\",\"sha256\":\"9289f2befbe76fbf8cb8ef0087bed8fbdf5d964d507afce2607662bc600ec514\"},{\"command\":\"aarch64-linux-gnu-g++\",\"executable\":\"/usr/bin/aarch64-linux-gnu-g++-13\",\"sha256\":\"fc02363794280f404c6ca6f5da1c8fe469be902e9de140d35d8573bb3393f53b\"},{\"command\":\"aarch64-linux-gnu-g++-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-g++-13\",\"sha256\":\"fc02363794280f404c6ca6f5da1c8fe469be902e9de140d35d8573bb3393f53b\"},{\"command\":\"aarch64-linux-gnu-gcc\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-13\",\"sha256\":\"a20520ee21543f243d40636a9181a142c45ecd989de31ab86b99a8ea5ada870d\"},{\"command\":\"aarch64-linux-gnu-gcc-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-13\",\"sha256\":\"a20520ee21543f243d40636a9181a142c45ecd989de31ab86b99a8ea5ada870d\"},{\"command\":\"aarch64-linux-gnu-gcc-ar\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-ar-13\",\"sha256\":\"ffc6a16e898aa3e5a0e3c6d418b41c815498d282be19e01d060eef0e1433ccfe\"},{\"command\":\"aarch64-linux-gnu-gcc-ar-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-ar-13\",\"sha256\":\"ffc6a16e898aa3e5a0e3c6d418b41c815498d282be19e01d060eef0e1433ccfe\"},{\"command\":\"aarch64-linux-gnu-gcc-nm\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-nm-13\",\"sha256\":\"5f145435894fbe10cc4bfb841e256381351bff398d19d8e9d85b5f009734e1a0\"},{\"command\":\"aarch64-linux-gnu-gcc-nm-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-nm-13\",\"sha256\":\"5f145435894fbe10cc4bfb841e256381351bff398d19d8e9d85b5f009734e1a0\"},{\"command\":\"aarch64-linux-gnu-gcc-ranlib\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-ranlib-13\",\"sha256\":\"e79a258937f68762e1a86f2b4aabd7eca20ba0d5970b725f12d8836208f228fe\"},{\"command\":\"aarch64-linux-gnu-gcc-ranlib-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-ranlib-13\",\"sha256\":\"e79a258937f68762e1a86f2b4aabd7eca20ba0d5970b725f12d8836208f228fe\"},{\"command\":\"aarch64-linux-gnu-gcov\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-13\",\"sha256\":\"7d7e793195f80c6164b220ca4b7339a102a9f57bc04cfed79fd581ae54bab688\"},{\"command\":\"aarch64-linux-gnu-gcov-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-13\",\"sha256\":\"7d7e793195f80c6164b220ca4b7339a102a9f57bc04cfed79fd581ae54bab688\"},{\"command\":\"aarch64-linux-gnu-gcov-dump\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-dump-13\",\"sha256\":\"26b03d13aea8cb68156618ec79b091c58a2d877d1bc2ef5aca27d03aec41cb97\"},{\"command\":\"aarch64-linux-gnu-gcov-dump-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-dump-13\",\"sha256\":\"26b03d13aea8cb68156618ec79b091c58a2d877d1bc2ef5aca27d03aec41cb97\"},{\"command\":\"aarch64-linux-gnu-gcov-tool\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-tool-13\",\"sha256\":\"1e1dec404a3b6c21b1c0470a67eecb6e937e70dcf95995380d6d69d0b6aea2ee\"},{\"command\":\"aarch64-linux-gnu-gcov-tool-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-tool-13\",\"sha256\":\"1e1dec404a3b6c21b1c0470a67eecb6e937e70dcf95995380d6d69d0b6aea2ee\"},{\"command\":\"aarch64-linux-gnu-gold\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ld.gold\",\"sha256\":\"91be8ad8ab23070ae4d55989793e457d507370cb3537338b403f6f5e8229b6d9\"},{\"command\":\"aarch64-linux-gnu-gp-archive\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-archive\",\"sha256\":\"2f26b485311c0ca7d741c5221221056fb8d72397965a3cf4f21cd5aad5b23358\"},{\"command\":\"aarch64-linux-gnu-gp-collect-app\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-collect-app\",\"sha256\":\"47dc715a7ae9eab495de6e741cbe938a96d9a39df1113eae82cd22d45f75e2af\"},{\"command\":\"aarch64-linux-gnu-gp-display-html\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-display-html\",\"sha256\":\"538acc2bcc24a50de51e88b2d733d50b69237ebfee14660e45a0255215d9f582\"},{\"command\":\"aarch64-linux-gnu-gp-display-src\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-display-src\",\"sha256\":\"fd2d6a61e0d8a75986e85a1ee7728755fd209fad15798db8e01a419a6472c3e5\"},{\"command\":\"aarch64-linux-gnu-gp-display-text\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-display-text\",\"sha256\":\"4d72c93772d03cd6de507678b532bcfdb8a7c761898cb2ba7a227618fe53b511\"},{\"command\":\"aarch64-linux-gnu-gprof\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gprof\",\"sha256\":\"fafe04ca52d0dbddaa1eaca63f4d58f484c1400434182b6f69e5db6bb864b02f\"},{\"command\":\"aarch64-linux-gnu-gprofng\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gprofng\",\"sha256\":\"8fe24cd8b82f26ddd41f0d7493bf5883c967e60f7b1cc85dbec21cae36c664cc\"},{\"command\":\"aarch64-linux-gnu-ld\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ld.bfd\",\"sha256\":\"1e4d3369b76845fa8e099b83513bf28f6f722e046f9b2cde1378c9e27f96d19c\"},{\"command\":\"aarch64-linux-gnu-ld.bfd\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ld.bfd\",\"sha256\":\"1e4d3369b76845fa8e099b83513bf28f6f722e046f9b2cde1378c9e27f96d19c\"},{\"command\":\"aarch64-linux-gnu-ld.gold\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ld.gold\",\"sha256\":\"91be8ad8ab23070ae4d55989793e457d507370cb3537338b403f6f5e8229b6d9\"},{\"command\":\"aarch64-linux-gnu-lto-dump\",\"executable\":\"/usr/bin/aarch64-linux-gnu-lto-dump-13\",\"sha256\":\"388e29e8f31599e067ee5ffdccc3722a55fb449276a58dbe4de03bab92c0a9ad\"},{\"command\":\"aarch64-linux-gnu-lto-dump-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-lto-dump-13\",\"sha256\":\"388e29e8f31599e067ee5ffdccc3722a55fb449276a58dbe4de03bab92c0a9ad\"},{\"command\":\"aarch64-linux-gnu-nm\",\"executable\":\"/usr/bin/aarch64-linux-gnu-nm\",\"sha256\":\"338d018c73ef394539da2566405a1f2f50a808e3c15ef72e9b48dd2f0b0d262f\"},{\"command\":\"aarch64-linux-gnu-objcopy\",\"executable\":\"/usr/bin/aarch64-linux-gnu-objcopy\",\"sha256\":\"1216ee3b084501a5132643fef4bba7221186f4b7dc99cd46e2bf9e3e7d37c344\"},{\"command\":\"aarch64-linux-gnu-objdump\",\"executable\":\"/usr/bin/aarch64-linux-gnu-objdump\",\"sha256\":\"f2e917a5d118ebf5679b24740e20d30338308e7f3f0630527c469de452d5a250\"},{\"command\":\"aarch64-linux-gnu-pkg-config\",\"executable\":\"/usr/bin/pkgconf\",\"sha256\":\"b21b58e97876992968c82d823d74034abbc6a4176f8c9d5f2e0400f343e73fc1\"},{\"command\":\"aarch64-linux-gnu-pkgconf\",\"executable\":\"/usr/bin/pkgconf\",\"sha256\":\"b21b58e97876992968c82d823d74034abbc6a4176f8c9d5f2e0400f343e73fc1\"},{\"command\":\"aarch64-linux-gnu-ranlib\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ranlib\",\"sha256\":\"824de22ce448c3567e631425f7754a6df72e90bd758079daa94f1aa6edf41513\"},{\"command\":\"aarch64-linux-gnu-readelf\",\"executable\":\"/usr/bin/aarch64-linux-gnu-readelf\",\"sha256\":\"6bca2bbd23b072db9e9a19ae0e65cf7b7c15c08a3c2cf01dd56453e1ac9340b1\"},{\"command\":\"aarch64-linux-gnu-size\",\"executable\":\"/usr/bin/aarch64-linux-gnu-size\",\"sha256\":\"59043ac56a8c2c059cd4cad6de00d80d0efd004c69efbb40f00a44b530323973\"},{\"command\":\"aarch64-linux-gnu-strings\",\"executable\":\"/usr/bin/aarch64-linux-gnu-strings\",\"sha256\":\"f6b809537477dfed119b80ad8c0da1653a2b9ed0173ebb72ebf236a1c94ce018\"},{\"command\":\"aarch64-linux-gnu-strip\",\"executable\":\"/usr/bin/aarch64-linux-gnu-strip\",\"sha256\":\"3a69e3786ea2884baf4d9811e509ba6d16be03d5d6f541103b8de317a2465fca\"},{\"command\":\"addpart\",\"executable\":\"/usr/bin/addpart\",\"sha256\":\"6081cff147546f210115fbaf9319df29097fd22198eb50b238b66c346d7595b6\"},{\"command\":\"addr2line\",\"executable\":\"/usr/bin/aarch64-linux-gnu-addr2line\",\"sha256\":\"ed4a2a90659b5a37a0c5b11cabb87cf98dfc1b3ece62ef11d66758bbb0af8d5c\"},{\"command\":\"apt\",\"executable\":\"/usr/bin/apt\",\"sha256\":\"25091d790a7f2e44a0df654d985bb555976e0cfb54eade2a7cb81f81d7c45345\"},{\"command\":\"apt-cache\",\"executable\":\"/usr/bin/apt-cache\",\"sha256\":\"86961892a2a0f6d3b70234b334fcfaaccc2f0c015924d43101647553856f750d\"},{\"command\":\"apt-cdrom\",\"executable\":\"/usr/bin/apt-cdrom\",\"sha256\":\"8c7f4ad4f4171b24238e18659447cc3cb7777d13b44bb6b7569d9a0e54013ded\"},{\"command\":\"apt-config\",\"executable\":\"/usr/bin/apt-config\",\"sha256\":\"2e791791b1149da102b375b36915fc5902f450e05f6fe1711f593a56223ee319\"},{\"command\":\"apt-get\",\"executable\":\"/usr/bin/apt-get\",\"sha256\":\"72a25a79b0549eddd159182c427e9f65a60a2e393232524687b7cbe9b163232d\"},{\"command\":\"apt-key\",\"executable\":\"/usr/bin/apt-key\",\"sha256\":\"45ec8c948cb0f17b38f27b4d8235596b17ece3b7eea5afcbb3be8b1ee5a98c77\"},{\"command\":\"apt-mark\",\"executable\":\"/usr/bin/apt-mark\",\"sha256\":\"847f7abe00572ea4c136225a231cd42a56a2513e2c170f5fa174a0dd70b1576f\"},{\"command\":\"ar\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ar\",\"sha256\":\"f4583a612510e038dbc1ae8afb5eae5f0445c435bdd7c4c28e78acc7e757d2b1\"},{\"command\":\"arch\",\"executable\":\"/usr/bin/arch\",\"sha256\":\"7d10e00d288c23ce8aa229d7e79fd5c37bc436c45c6dfc45a6d6c00b18b7fbd5\"},{\"command\":\"as\",\"executable\":\"/usr/bin/aarch64-linux-gnu-as\",\"sha256\":\"1ffda50efb6d91b6b05ef933aced099595c36577594c0296c91161f2d13db374\"},{\"command\":\"asyncapi-official\",\"executable\":\"/opt/prismpm/asyncapi-official/scripts/launcher.sh\",\"sha256\":\"b06adb1cd61f9258e2b351314ffbd6cae1ed608a3623da201ac2879676bb302e\"},{\"command\":\"asyncapi-parser\",\"executable\":\"/opt/prismpm/oracles/asyncapi-parser.mjs\",\"sha256\":\"849b552ffa8ef7330511173b4fbd03d77f01ef0e7115abf64394d9160add5caf\"},{\"command\":\"awk\",\"executable\":\"/usr/bin/mawk\",\"sha256\":\"38a07fb3962f22f50f09ed60bb7cc945053f25cd48519b974e597c4ee7a97a0c\"},{\"command\":\"b2sum\",\"executable\":\"/usr/bin/b2sum\",\"sha256\":\"0051a2a383507ea1ab388b5c57d1a2ac9aaf3d259aa1974fa4084b029f62132d\"},{\"command\":\"base32\",\"executable\":\"/usr/bin/base32\",\"sha256\":\"dfcbb1f1ec0cfc5d8ab92e6717db46306b792f42531dd03e5a8bb3015de168ed\"},{\"command\":\"base64\",\"executable\":\"/usr/bin/base64\",\"sha256\":\"e2908860aa083442b9a059a4df8ce27444dfa74d9fdfb45f92c14d747d076e91\"},{\"command\":\"basename\",\"executable\":\"/usr/bin/basename\",\"sha256\":\"6f59798300ab8020d300226e74f6600e11f3ccc19501e834fdb8c7e494087037\"},{\"command\":\"basenc\",\"executable\":\"/usr/bin/basenc\",\"sha256\":\"4bada29d4480fac3866b6b36e4027248dcf93e30d0a31e3c6dd47185ac1535a5\"},{\"command\":\"bash\",\"executable\":\"/usr/bin/bash\",\"sha256\":\"af955ef55333c8fc9c5aa50df91ad1a629d9a79a9afa125cd5e9629585f78015\"},{\"command\":\"bashbug\",\"executable\":\"/usr/bin/bashbug\",\"sha256\":\"a676ca94526cfba4eeb6f743406d0a650e48567bd4fbcb77c9326a00c19bef4b\"},{\"command\":\"bdftopcf\",\"executable\":\"/usr/bin/bdftopcf\",\"sha256\":\"fadf48a2177aba43ef5f1b38fd6be8e03bb41996df9ab19978e23ace2981b364\"},{\"command\":\"bdftruncate\",\"executable\":\"/usr/bin/bdftruncate\",\"sha256\":\"b3d987d8b29819061fb11ee25c61025368caa3d2274d3cb5f1a3773715b67f20\"},{\"command\":\"bunzip2\",\"executable\":\"/usr/bin/bunzip2\",\"sha256\":\"18dc92a2280b181d2ef764dad96a9266ac1bf42a186e42f1aecb84b1bb7cb439\"},{\"command\":\"busctl\",\"executable\":\"/usr/bin/busctl\",\"sha256\":\"27bb72a32a312b0871d46b8502216a73c398a499a65d7213d380f4cdff54aa4e\"},{\"command\":\"bzcat\",\"executable\":\"/usr/bin/bzcat\",\"sha256\":\"18dc92a2280b181d2ef764dad96a9266ac1bf42a186e42f1aecb84b1bb7cb439\"},{\"command\":\"bzcmp\",\"executable\":\"/usr/bin/bzdiff\",\"sha256\":\"d115316919735ea43b057063dad2609b05051a11f3819291a403ecceb55ba102\"},{\"command\":\"bzdiff\",\"executable\":\"/usr/bin/bzdiff\",\"sha256\":\"d115316919735ea43b057063dad2609b05051a11f3819291a403ecceb55ba102\"},{\"command\":\"bzegrep\",\"executable\":\"/usr/bin/bzgrep\",\"sha256\":\"3300749d903f145a8815c07fa1389dba04268fee1fec97ca1f01abf07ac5ee04\"},{\"command\":\"bzexe\",\"executable\":\"/usr/bin/bzexe\",\"sha256\":\"bd3ab362765b5313aef3bdd1845ef4743f33ce98ab970b045d872a2cb4536951\"},{\"command\":\"bzfgrep\",\"executable\":\"/usr/bin/bzgrep\",\"sha256\":\"3300749d903f145a8815c07fa1389dba04268fee1fec97ca1f01abf07ac5ee04\"},{\"command\":\"bzgrep\",\"executable\":\"/usr/bin/bzgrep\",\"sha256\":\"3300749d903f145a8815c07fa1389dba04268fee1fec97ca1f01abf07ac5ee04\"},{\"command\":\"bzip2\",\"executable\":\"/usr/bin/bzip2\",\"sha256\":\"18dc92a2280b181d2ef764dad96a9266ac1bf42a186e42f1aecb84b1bb7cb439\"},{\"command\":\"bzip2recover\",\"executable\":\"/usr/bin/bzip2recover\",\"sha256\":\"54e08e8a9806076a9b186db82680b44fc91b6a9900693e9aa5bdf880d9ab1e4c\"},{\"command\":\"bzless\",\"executable\":\"/usr/bin/bzmore\",\"sha256\":\"0e7ca63849eebc9ea476ea1fefab05e60b0ac8066f73c7d58e8ff607c941f212\"},{\"command\":\"bzmore\",\"executable\":\"/usr/bin/bzmore\",\"sha256\":\"0e7ca63849eebc9ea476ea1fefab05e60b0ac8066f73c7d58e8ff607c941f212\"},{\"command\":\"c++\",\"executable\":\"/usr/bin/aarch64-linux-gnu-g++-13\",\"sha256\":\"fc02363794280f404c6ca6f5da1c8fe469be902e9de140d35d8573bb3393f53b\"},{\"command\":\"c++filt\",\"executable\":\"/usr/bin/aarch64-linux-gnu-c++filt\",\"sha256\":\"aa08d269fe1c87b8737179c9c07813f615366185d4e7668c7c503e8278daa62f\"},{\"command\":\"c89\",\"executable\":\"/usr/bin/c89-gcc\",\"sha256\":\"999b40b67f690638f601d76b756d529dd40a4325f42dfd9fd2e629ad0a91947c\"},{\"command\":\"c89-gcc\",\"executable\":\"/usr/bin/c89-gcc\",\"sha256\":\"999b40b67f690638f601d76b756d529dd40a4325f42dfd9fd2e629ad0a91947c\"},{\"command\":\"c99\",\"executable\":\"/usr/bin/c99-gcc\",\"sha256\":\"5d3a3621b0f1272264a4d37e379300f2495aabef997eb12c2f8b48cf16d01366\"},{\"command\":\"c99-gcc\",\"executable\":\"/usr/bin/c99-gcc\",\"sha256\":\"5d3a3621b0f1272264a4d37e379300f2495aabef997eb12c2f8b48cf16d01366\"},{\"command\":\"c_rehash\",\"executable\":\"/usr/bin/c_rehash\",\"sha256\":\"e500ac3e4b1a18d117bd1c4b47f3e4f96584040b6ea4a484398fff7ddc3a7d12\"},{\"command\":\"captoinfo\",\"executable\":\"/usr/bin/tic\",\"sha256\":\"71234d7ee819f7391990856281f772d578b19ae3b4e7f4626976c926310c2aae\"},{\"command\":\"cargo\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"cargo-clippy\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"cargo-deny\",\"executable\":\"/usr/local/bin/cargo-deny\",\"sha256\":\"21e797104e371854dde7f05f52d834e70312749d361c168429ced996f2194462\"},{\"command\":\"cargo-fmt\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"cargo-local-registry\",\"executable\":\"/usr/local/cargo/bin/cargo-local-registry\",\"sha256\":\"fe3bced4bd5f98c0278dc7b4931079fb987aece78602dc6cf984e205dd13b399\"},{\"command\":\"cargo-miri\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"cat\",\"executable\":\"/usr/bin/cat\",\"sha256\":\"604ff8110ab37748594c3e61d6ba52140788c7c29500fb0edc314e08db155f2a\"},{\"command\":\"cc\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-13\",\"sha256\":\"a20520ee21543f243d40636a9181a142c45ecd989de31ab86b99a8ea5ada870d\"},{\"command\":\"chage\",\"executable\":\"/usr/bin/chage\",\"sha256\":\"c47a9d4e8b9cc11124a660f8d4b5e4dd6d42e9059f9fcc925a19014b69418983\"},{\"command\":\"chattr\",\"executable\":\"/usr/bin/chattr\",\"sha256\":\"58650d7f80deb4e41f4af258c364402acd2a113cb3bdf34fb4d8909219c090f7\"},{\"command\":\"chcon\",\"executable\":\"/usr/bin/chcon\",\"sha256\":\"2273b478cae7bb7a045ce06fa8dbf4c94b5dd390edf6ce1adcd9f06dd8795bb1\"},{\"command\":\"chfn\",\"executable\":\"/usr/bin/chfn\",\"sha256\":\"ad99bfbcedc731883446b2402a3ac51603d3d2d21daec02b11e9c84db5ed7e96\"},{\"command\":\"chgrp\",\"executable\":\"/usr/bin/chgrp\",\"sha256\":\"69aa129ffc8499e2dc7047ec467a0d0f6e094f0416d9dd47ff07955e6b090aaa\"},{\"command\":\"chmod\",\"executable\":\"/usr/bin/chmod\",\"sha256\":\"4fe3b161f39da2cd87d2c55fe8c4f8d61aa3080b9eeaaf21ca7b693c4f4ca473\"},{\"command\":\"choom\",\"executable\":\"/usr/bin/choom\",\"sha256\":\"fbfe99fb1582eb6614548dcdf59c625609bed837a6f159c55c79bc1c7ee0d0a8\"},{\"command\":\"chown\",\"executable\":\"/usr/bin/chown\",\"sha256\":\"2501dd8710dc928c97740f2014d0795f778fea6f7eb7e374228865a33e65be7f\"},{\"command\":\"chrt\",\"executable\":\"/usr/bin/chrt\",\"sha256\":\"90793624278879b50f2a9c392923b9a36fffa9db2d1070ea46cda955044ae3b4\"},{\"command\":\"chsh\",\"executable\":\"/usr/bin/chsh\",\"sha256\":\"bd0c486a0f316d99405abbc7553260fbb9611293ec2239f95d760dbf4224a6fb\"},{\"command\":\"cksum\",\"executable\":\"/usr/bin/cksum\",\"sha256\":\"130c8404dcc0254ec6e4835215513f7bc725b40dce83230d952dc740950af2d5\"},{\"command\":\"clear\",\"executable\":\"/usr/bin/clear\",\"sha256\":\"022bd7fc9938b62008e4e252ec329e24ddabd571fd6d01027386178c1d29d95b\"},{\"command\":\"clear_console\",\"executable\":\"/usr/bin/clear_console\",\"sha256\":\"22f0ee4504073fb21f9554b7190c68240840d27738113f2943e7c3b3f2676034\"},{\"command\":\"clippy-driver\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"cloudevents-sdk-conformance\",\"executable\":\"/usr/local/bin/cloudevents-sdk-conformance\",\"sha256\":\"519ec1d39566de154730bc87930f274be947d0eff0ce7d5ed00606cb4bda2117\"},{\"command\":\"cloudevents-validator\",\"executable\":\"/usr/local/bin/cloudevents-validator\",\"sha256\":\"7d91646555ef85ca92aef3c100efd3c36a3b76b1f46000ffa1558b4715a25d58\"},{\"command\":\"cmp\",\"executable\":\"/usr/bin/cmp\",\"sha256\":\"e7a3863a965c20d9b4beaad4736ff4406108bb88ba2d09a122c931ca246a0db4\"},{\"command\":\"comm\",\"executable\":\"/usr/bin/comm\",\"sha256\":\"6f9efb0ca067e135ffda9e2dd4c2c505df38306e517cd156226614110b39954d\"},{\"command\":\"corelist\",\"executable\":\"/usr/bin/corelist\",\"sha256\":\"667bc0d6d8de3048ec84678355647805a9e1ecfc53169a780edbc49b5a0da7b5\"},{\"command\":\"corepack\",\"executable\":\"/usr/local/lib/node_modules/corepack/dist/corepack.js\",\"sha256\":\"3655bc798f300951f2070fee411b337d626b0c3ae80c2d24c46ccac4595d4bf9\"},{\"command\":\"cosign\",\"executable\":\"/usr/local/bin/cosign\",\"sha256\":\"c5d324e091826b0d7a78eb16fef316450b4eb9aaec045611c08ba06f5e73220a\"},{\"command\":\"cp\",\"executable\":\"/usr/bin/cp\",\"sha256\":\"3ec1dff780dc05085e68c636879751629e2972ad05e4c02a1e57ac67ad16f2fc\"},{\"command\":\"cpan\",\"executable\":\"/usr/bin/cpan\",\"sha256\":\"d4fba91c6370b8ef2c77850205d6e7eab6d8aeebd57993793fad9eff7720ea5e\"},{\"command\":\"cpan5.38-aarch64-linux-gnu\",\"executable\":\"/usr/bin/cpan5.38-aarch64-linux-gnu\",\"sha256\":\"536a6678c135f196e2e5e5f6b66d0e5ff9544abe224b3340c87b09f259c04171\"},{\"command\":\"cpp\",\"executable\":\"/usr/bin/aarch64-linux-gnu-cpp-13\",\"sha256\":\"f1cb3f991a50e83bce2b9f9573fe280a2572208ef88805adcf5de317f86f230e\"},{\"command\":\"cpp-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-cpp-13\",\"sha256\":\"f1cb3f991a50e83bce2b9f9573fe280a2572208ef88805adcf5de317f86f230e\"},{\"command\":\"csplit\",\"executable\":\"/usr/bin/csplit\",\"sha256\":\"9e52812e43e93aca218294e77da44a0a14ed74cdf15441323ccaf097871b1468\"},{\"command\":\"curl\",\"executable\":\"/usr/bin/curl\",\"sha256\":\"67054bcf748d42e1bf4b2a0eb4ba768e37dde8681313a64edd2f343c5d17a0ac\"},{\"command\":\"cut\",\"executable\":\"/usr/bin/cut\",\"sha256\":\"e2cdff490904b029d89ea8e0f39b709d4674e2f828637fad324bd8985381a1d2\"},{\"command\":\"dash\",\"executable\":\"/usr/bin/dash\",\"sha256\":\"c883d9c27228339580994a1d0ea960645368c7d1b960a712bd0c655860c2d0d7\"},{\"command\":\"date\",\"executable\":\"/usr/bin/date\",\"sha256\":\"90b4b67c4de251db8c845731670d78ec3fe40ae9f60477a975f83d6dc42efc59\"},{\"command\":\"dbus-cleanup-sockets\",\"executable\":\"/usr/bin/dbus-cleanup-sockets\",\"sha256\":\"34a63db64db4b4af4d5d8dffa8d609dc092c73cef2f33bb3d47cda41d07f36c8\"},{\"command\":\"dbus-daemon\",\"executable\":\"/usr/bin/dbus-daemon\",\"sha256\":\"42f32cef025bf558013890bd28062932c253710c083e8428fc79ae34d7ccf7c2\"},{\"command\":\"dbus-monitor\",\"executable\":\"/usr/bin/dbus-monitor\",\"sha256\":\"ab893e8562750704a45e9b8f76fada69791fac6356fa41489aae2a16896c12e0\"},{\"command\":\"dbus-run-session\",\"executable\":\"/usr/bin/dbus-run-session\",\"sha256\":\"e3877b5c268bc07ec1a4df0527b89b1321e8ba301b2f92663f9e3bd2fcba5289\"},{\"command\":\"dbus-send\",\"executable\":\"/usr/bin/dbus-send\",\"sha256\":\"01465ee4b342baf957bc32c7f3999834604ea438952701f61dda13b63c0b010d\"},{\"command\":\"dbus-update-activation-environment\",\"executable\":\"/usr/bin/dbus-update-activation-environment\",\"sha256\":\"f54e4b73d79d3d65e55dafcd83ff739b515b754bd11118b1993d849fb98194ca\"},{\"command\":\"dbus-uuidgen\",\"executable\":\"/usr/bin/dbus-uuidgen\",\"sha256\":\"27ec5ee57a6ae62a335797c582c3eacce6fa07914f7708c4c70f7d06ef805d76\"},{\"command\":\"dd\",\"executable\":\"/usr/bin/dd\",\"sha256\":\"04e9763f3e05f6b47b859b521697d55b1b05d4078cb26576c58f52a3d30e21d8\"},{\"command\":\"deb-systemd-helper\",\"executable\":\"/usr/bin/deb-systemd-helper\",\"sha256\":\"a895d5f077651960b6ca4ed9c53f8b36eae422ae170f61c972d0c6579e9f8732\"},{\"command\":\"deb-systemd-invoke\",\"executable\":\"/usr/bin/deb-systemd-invoke\",\"sha256\":\"92eadae89f4df4cd6088f6316f5390b685faf8d0e312a4e5af3a507caaf81bdb\"},{\"command\":\"debconf\",\"executable\":\"/usr/bin/debconf\",\"sha256\":\"d5beef1820da2445e173c90ba14c535f566db12cd7de0cb3d4385a6aa4bcd8e3\"},{\"command\":\"debconf-apt-progress\",\"executable\":\"/usr/bin/debconf-apt-progress\",\"sha256\":\"ab24031d661b531961bab055a344c97d66ded2718c9a4c48ddbe0392273897e0\"},{\"command\":\"debconf-communicate\",\"executable\":\"/usr/bin/debconf-communicate\",\"sha256\":\"95dd9cc45752692e9288eed9abf9d0bbd22bb78ffe59a78cbfcbe96cffefbba5\"},{\"command\":\"debconf-copydb\",\"executable\":\"/usr/bin/debconf-copydb\",\"sha256\":\"02f27a04a3485f487e654051a4e72a806e9aff40ccf87934f896f59c29fd6db2\"},{\"command\":\"debconf-escape\",\"executable\":\"/usr/bin/debconf-escape\",\"sha256\":\"b1e81e2ac04c2a6c286514f2f410c57b9ac6188ed33ed558722f3bc252e93e87\"},{\"command\":\"debconf-set-selections\",\"executable\":\"/usr/bin/debconf-set-selections\",\"sha256\":\"1f32e8a3daba11364b8f4ca795e1fad83b688f02ab27df8066f5c552d1070f98\"},{\"command\":\"debconf-show\",\"executable\":\"/usr/bin/debconf-show\",\"sha256\":\"314fa1730e1efe15db17307848e7a53e450d0093009b6f1596cd3fe0ffec1b67\"},{\"command\":\"delpart\",\"executable\":\"/usr/bin/delpart\",\"sha256\":\"93dae401e3876c7e23eefe99b5f637520e62cca06ede336c843711fc1f66d252\"},{\"command\":\"devcontainer\",\"executable\":\"/opt/prismpm/devcontainer-cli/node_modules/@devcontainers/cli/devcontainer.js\",\"sha256\":\"e6df20af860208e00365d7b73f64d3940bad087ea8049de12223d1e7376522e3\"},{\"command\":\"devcontainer-validator\",\"executable\":\"/opt/prismpm/oracles/devcontainer-validator.mjs\",\"sha256\":\"05e99e6a92cf44ee2f91accef71823bd06ee92281db29089e8bb784ab4926b58\"},{\"command\":\"df\",\"executable\":\"/usr/bin/df\",\"sha256\":\"03633dca1cc85bf7a0acd19e8554c39b4e0d070539ac73a9a9a5a7227469438f\"},{\"command\":\"diff\",\"executable\":\"/usr/bin/diff\",\"sha256\":\"8a4e71dc45f025517c4df4bb4ff97e671754dbe6eb365f71cfbb57c6aad3cf20\"},{\"command\":\"diff3\",\"executable\":\"/usr/bin/diff3\",\"sha256\":\"9c245bf3c888d25e0befabec6032d48a87e61e70d19e822558a1a6041b261b3e\"},{\"command\":\"dir\",\"executable\":\"/usr/bin/dir\",\"sha256\":\"5204b89312af150b5c1060c12035460c84b3dd28608b7e0cbaad4f1b6e01a7ac\"},{\"command\":\"dircolors\",\"executable\":\"/usr/bin/dircolors\",\"sha256\":\"d5780d1983643ee6c99a351b2b493a2e6a5e8776483b6fe1e8f73536035a1d3a\"},{\"command\":\"dirmngr\",\"executable\":\"/usr/bin/dirmngr\",\"sha256\":\"28e20fb6faa3c908b61b1d3dd905af7e467a85c6eb37b3bbe9d02d491f13335a\"},{\"command\":\"dirmngr-client\",\"executable\":\"/usr/bin/dirmngr-client\",\"sha256\":\"67a7d2dfad417fc2d49fb362fc168a65ecab39c27ccd4eb3d16520629d9ef5e8\"},{\"command\":\"dirname\",\"executable\":\"/usr/bin/dirname\",\"sha256\":\"0aed6960221e6ec4f6dc82c1009aee99fb26ddbc1dd5634c2be697e2e03782c6\"},{\"command\":\"dmesg\",\"executable\":\"/usr/bin/dmesg\",\"sha256\":\"ffbf1baa7e19f7498862828915a9263a51c1a4c9f24726f8bfb7748db309eabb\"},{\"command\":\"dnsdomainname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"529801b643662701c07a120d133850a3a1d407fd0edd8390b3f2db759715eb8f\"},{\"command\":\"docker\",\"executable\":\"/usr/local/bin/docker\",\"sha256\":\"5813af76173228c7744670ce7370f7d93924f095bfa5dba2df6ac46a039ccf3c\"},{\"command\":\"docker-buildx\",\"executable\":\"/usr/local/libexec/docker/cli-plugins/docker-buildx\",\"sha256\":\"4e850583cc68ffd8d739ddb8a782b83f2ef9d3bf437ae7c44da4fbfde2613a8e\"},{\"command\":\"docker-compose\",\"executable\":\"/usr/local/libexec/docker/cli-plugins/docker-compose\",\"sha256\":\"fc5d1371f1ec7987e703da94ede49af3fbfb240b83f22991a98511de7bc4b93b\"},{\"command\":\"domainname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"529801b643662701c07a120d133850a3a1d407fd0edd8390b3f2db759715eb8f\"},{\"command\":\"dpkg\",\"executable\":\"/usr/bin/dpkg\",\"sha256\":\"32cf5b3ab2fd7166eb9bbb9aea29efbe552c520907641207020fc5f031e24888\"},{\"command\":\"dpkg-architecture\",\"executable\":\"/usr/bin/dpkg-architecture\",\"sha256\":\"ce16700da9905ac300963e09e9716004c8c35c780b06d108de8b9c93d6ddbbaf\"},{\"command\":\"dpkg-buildapi\",\"executable\":\"/usr/bin/dpkg-buildapi\",\"sha256\":\"69d8be5bc1d2e8b17fc6096912b07b72bcda3759de2301062c2fa5a0aa9e842d\"},{\"command\":\"dpkg-buildflags\",\"executable\":\"/usr/bin/dpkg-buildflags\",\"sha256\":\"4a363aa71affdea49cf5fc894783f3ff13ed66fcfe75646a82809ca7607e953a\"},{\"command\":\"dpkg-buildpackage\",\"executable\":\"/usr/bin/dpkg-buildpackage\",\"sha256\":\"f1a04680031ada877a331bf744aea7ed1cb32ebac24914c7d0b9f5a0267b0d1d\"},{\"command\":\"dpkg-buildtree\",\"executable\":\"/usr/bin/dpkg-buildtree\",\"sha256\":\"9befe7704c770ee771fa90e6dd80d86b191d5a92ee3623eec4e1cd938275e941\"},{\"command\":\"dpkg-checkbuilddeps\",\"executable\":\"/usr/bin/dpkg-checkbuilddeps\",\"sha256\":\"869d51a380a2f7e438af8f836b20ac0232f1a5b45f156ca51955f130cb2c28fa\"},{\"command\":\"dpkg-deb\",\"executable\":\"/usr/bin/dpkg-deb\",\"sha256\":\"3cf93403af757e938bda51322774697b8ff1e1d030b333008b2308e0b79a8dd6\"},{\"command\":\"dpkg-distaddfile\",\"executable\":\"/usr/bin/dpkg-distaddfile\",\"sha256\":\"48a66e608a612ee9948c0c0dc34db41b9fd62bc3fd658a7ceb8d362563a90e13\"},{\"command\":\"dpkg-divert\",\"executable\":\"/usr/bin/dpkg-divert\",\"sha256\":\"433ab574fe26fac3f3c03ad08e7195af63585764a410f5dd557f7a5cee7b3d38\"},{\"command\":\"dpkg-genbuildinfo\",\"executable\":\"/usr/bin/dpkg-genbuildinfo\",\"sha256\":\"ea892fe9ccde89d43d3ab990a00a098cafc0826251973f2eebb01464aa067cf0\"},{\"command\":\"dpkg-genchanges\",\"executable\":\"/usr/bin/dpkg-genchanges\",\"sha256\":\"4b3688a9e0c011c5ecebf9cdf6a80cc5ffd49ce8a05c4d93e671c73527e4a5cd\"},{\"command\":\"dpkg-gencontrol\",\"executable\":\"/usr/bin/dpkg-gencontrol\",\"sha256\":\"21a07292d7f2b969c1746163044adbce7fd48762dfa1b4619d3300af274d0235\"},{\"command\":\"dpkg-gensymbols\",\"executable\":\"/usr/bin/dpkg-gensymbols\",\"sha256\":\"2a7cbc5ff261e22282da62ff54b293e40c6aeccd1f89faace7f40ac6d443d6b6\"},{\"command\":\"dpkg-maintscript-helper\",\"executable\":\"/usr/bin/dpkg-maintscript-helper\",\"sha256\":\"c1ebe2d1281240872a38dd16dcaea57d48a66978f500eeeca58689ae006ca342\"},{\"command\":\"dpkg-mergechangelogs\",\"executable\":\"/usr/bin/dpkg-mergechangelogs\",\"sha256\":\"72d5bb1f9c93730cf1a67e1d93065b7582a9ef3ff9013d89e07071f47fba13e5\"},{\"command\":\"dpkg-name\",\"executable\":\"/usr/bin/dpkg-name\",\"sha256\":\"35019db2113124b0d3db3b44f02615e3ec2be6f365f9986d913c0596930d62f5\"},{\"command\":\"dpkg-parsechangelog\",\"executable\":\"/usr/bin/dpkg-parsechangelog\",\"sha256\":\"1240425d626ff7b28de7022a09222e6f4b88c66c0d481776eea69006c0e22bd4\"},{\"command\":\"dpkg-query\",\"executable\":\"/usr/bin/dpkg-query\",\"sha256\":\"eea6a1a5fc4fff653dfc733c9b4a551625d5fb7720a84952013076cacdb0927f\"},{\"command\":\"dpkg-realpath\",\"executable\":\"/usr/bin/dpkg-realpath\",\"sha256\":\"209be6ae092e387589b11752c165e943f0c8d6e940694025d5cd41df4cb49642\"},{\"command\":\"dpkg-scanpackages\",\"executable\":\"/usr/bin/dpkg-scanpackages\",\"sha256\":\"6f2a4e932d7cc8dc1c3010541297adddd09a96c3460f87b6edbde3203679d848\"},{\"command\":\"dpkg-scansources\",\"executable\":\"/usr/bin/dpkg-scansources\",\"sha256\":\"d91bb4217786e327e16f62185daf9632c8e04f5be8d251d90f00b9945b905006\"},{\"command\":\"dpkg-shlibdeps\",\"executable\":\"/usr/bin/dpkg-shlibdeps\",\"sha256\":\"06d7129cf40b0186dfa961f277e79664970d9f9207ae23ab11f8135aef488b02\"},{\"command\":\"dpkg-source\",\"executable\":\"/usr/bin/dpkg-source\",\"sha256\":\"785b2ef79335db87fef3447181503007171b4dfb8f9cbfc52236e6b84847e634\"},{\"command\":\"dpkg-split\",\"executable\":\"/usr/bin/dpkg-split\",\"sha256\":\"c9793b76878167723dd0857e4c6697b7d4f16c235b17390174ff93b9af77a890\"},{\"command\":\"dpkg-statoverride\",\"executable\":\"/usr/bin/dpkg-statoverride\",\"sha256\":\"bd5d0e517b474214b1e99d7ea19c1ebd2a8d325649ef4026e7a38cdf8905af55\"},{\"command\":\"dpkg-trigger\",\"executable\":\"/usr/bin/dpkg-trigger\",\"sha256\":\"547263d4e4533de161a3b80ee60f41dea2d1e8e7fed427b62236f16801e38374\"},{\"command\":\"dpkg-vendor\",\"executable\":\"/usr/bin/dpkg-vendor\",\"sha256\":\"603e32f2d611f57b240005c3faca99eaf8c91c63e191bb76f3d9567acb82bebc\"},{\"command\":\"du\",\"executable\":\"/usr/bin/du\",\"sha256\":\"c2bae24e0e31eed0e04801c5f2c2ed5340bfbe56ef171ff5f9795fcddd3b8293\"},{\"command\":\"dwp\",\"executable\":\"/usr/bin/aarch64-linux-gnu-dwp\",\"sha256\":\"5c3139afd1082faea0e0e42af65af52f15a2bc2f6dcce7014a2d0bd77309486c\"},{\"command\":\"echo\",\"executable\":\"/usr/bin/echo\",\"sha256\":\"263080dc70c33401517a7f465e15bb6c1cf7e6d7b673399de264396cc09cc2a3\"},{\"command\":\"egrep\",\"executable\":\"/usr/bin/egrep\",\"sha256\":\"10caa507f39367738ca977a5f2014406159064b072dbade0c0c23a40597f66da\"},{\"command\":\"elan\",\"executable\":\"/usr/local/elan/bin/elan\",\"sha256\":\"3985b63010981974c86c01c8e17f0c72ad5350104253f9cac8c7c87f8183de8d\"},{\"command\":\"elfedit\",\"executable\":\"/usr/bin/aarch64-linux-gnu-elfedit\",\"sha256\":\"9289f2befbe76fbf8cb8ef0087bed8fbdf5d964d507afce2607662bc600ec514\"},{\"command\":\"enc2xs\",\"executable\":\"/usr/bin/enc2xs\",\"sha256\":\"9005200ebb19c0328ac671d9a9f72702dd7c3015112878565ffd30f1671bff5d\"},{\"command\":\"encguess\",\"executable\":\"/usr/bin/encguess\",\"sha256\":\"f616952ea1c19fd8159c5a4d25cae587bed2c5cfd45df2b238da88cf7595dc21\"},{\"command\":\"env\",\"executable\":\"/usr/bin/env\",\"sha256\":\"dde57443115af498aa981159ba6517b156547173342af36487ed58631d9e47c3\"},{\"command\":\"expand\",\"executable\":\"/usr/bin/expand\",\"sha256\":\"4b69b7e551135b387eed4c117c4ae75042fe670523022d91e83e2c1c5a20c3c7\"},{\"command\":\"expiry\",\"executable\":\"/usr/bin/expiry\",\"sha256\":\"7aea9e8f2a8eb693f1b4dcb0fc4d02d6399960ff9f854ace890b0e091c6452e6\"},{\"command\":\"expr\",\"executable\":\"/usr/bin/expr\",\"sha256\":\"0a83825e4bb9d11c2997f8fa355c0f01a9ddb1d6e558b21373ae8ec6c85d92b0\"},{\"command\":\"factor\",\"executable\":\"/usr/bin/factor\",\"sha256\":\"6cfebfe3a7565df5eff3e973f8b42182c5b5758122c53024afb0564ec803afc7\"},{\"command\":\"faillog\",\"executable\":\"/usr/bin/faillog\",\"sha256\":\"eb028bfd65a96a0b80e80c0fca3a696d26442764ded26bb7e33ec0ee0d4d51a2\"},{\"command\":\"fallocate\",\"executable\":\"/usr/bin/fallocate\",\"sha256\":\"a45934061861fe7966891b529e3642015749109845ccf4fd87ef2053b2226b38\"},{\"command\":\"false\",\"executable\":\"/usr/bin/false\",\"sha256\":\"9b2b3f201c1350102f909a3c17e547229e038591c4cc24881b5c140c97763df5\"},{\"command\":\"fc-cache\",\"executable\":\"/usr/bin/fc-cache\",\"sha256\":\"96569edc4cd9d86c8d713bb8193ed4d113a663aff19d8836f88be4ad9bb218f8\"},{\"command\":\"fc-cat\",\"executable\":\"/usr/bin/fc-cat\",\"sha256\":\"4e9f6a41c435aeb7193018d072afc930628b81bfd571c4f26afbe5b1b1cc83e5\"},{\"command\":\"fc-conflist\",\"executable\":\"/usr/bin/fc-conflist\",\"sha256\":\"50f4e57c89462322950c808a81e83431ed5d0ac1a534b9bf490a1fc2c14dc248\"},{\"command\":\"fc-list\",\"executable\":\"/usr/bin/fc-list\",\"sha256\":\"32b9d29afabc3291a355ea2f5022dfdbd211ccd86ab521e69962edf851c33ee0\"},{\"command\":\"fc-match\",\"executable\":\"/usr/bin/fc-match\",\"sha256\":\"39ab22956a614d998a127d5d52eef22eae6ae06c46fbf3579d7a0afee0ffe854\"},{\"command\":\"fc-pattern\",\"executable\":\"/usr/bin/fc-pattern\",\"sha256\":\"befbe4ec03d679e7c3587e80dfa427ec001fcd751d21a34f629a20875548421e\"},{\"command\":\"fc-query\",\"executable\":\"/usr/bin/fc-query\",\"sha256\":\"a1b7030e9374b7c6fc31bd8da8a2e81ae5fa9b1926d549300d450079c5c1dfed\"},{\"command\":\"fc-scan\",\"executable\":\"/usr/bin/fc-scan\",\"sha256\":\"83439931082c19c4760ffc91c898c08aca3a7493d8e3692faa4f38fd4e4a4e29\"},{\"command\":\"fc-validate\",\"executable\":\"/usr/bin/fc-validate\",\"sha256\":\"be5eb52c5ffd264a3c8abea33c12e5cde92ea6b2c92699074a41a046cca8ae17\"},{\"command\":\"fgrep\",\"executable\":\"/usr/bin/fgrep\",\"sha256\":\"f1bdb63da98989d55e56cef651139f70448d4c8f6ea40bb02610be439e29bf0c\"},{\"command\":\"find\",\"executable\":\"/usr/bin/find\",\"sha256\":\"1ee9e96c55e9d3551cebb991882087c5b21d18c4b4ead73203ca84ab54940ce1\"},{\"command\":\"findmnt\",\"executable\":\"/usr/bin/findmnt\",\"sha256\":\"0ce223f42a582d43fc2a43b6aa23cada2da2b3b8f69906b2c3c939c0336d9055\"},{\"command\":\"flock\",\"executable\":\"/usr/bin/flock\",\"sha256\":\"2cd7af43ad6967d6049c882ccd914623e30db81e29e7d69e430c4aaa59d44144\"},{\"command\":\"fmt\",\"executable\":\"/usr/bin/fmt\",\"sha256\":\"39f2f76159e5c75739e9ca0e3606f74aabb78aab8acbcbc4f31d4e3b3db920c6\"},{\"command\":\"fold\",\"executable\":\"/usr/bin/fold\",\"sha256\":\"4025f1cef02d7666bc369e4fced9fab6741729905a49b6d1867639da3a99cca9\"},{\"command\":\"fonttosfnt\",\"executable\":\"/usr/bin/fonttosfnt\",\"sha256\":\"52e2955e5bd7bc4ada0414b7f8087dad38a95757b2f79756bd9f94d253fc3188\"},{\"command\":\"free\",\"executable\":\"/usr/bin/free\",\"sha256\":\"75f10d9f7265e2d7aa3a422c609315a30cf5befbd81cf61d5506b247d57c3371\"},{\"command\":\"g++\",\"executable\":\"/usr/bin/aarch64-linux-gnu-g++-13\",\"sha256\":\"fc02363794280f404c6ca6f5da1c8fe469be902e9de140d35d8573bb3393f53b\"},{\"command\":\"g++-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-g++-13\",\"sha256\":\"fc02363794280f404c6ca6f5da1c8fe469be902e9de140d35d8573bb3393f53b\"},{\"command\":\"gcc\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-13\",\"sha256\":\"a20520ee21543f243d40636a9181a142c45ecd989de31ab86b99a8ea5ada870d\"},{\"command\":\"gcc-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-13\",\"sha256\":\"a20520ee21543f243d40636a9181a142c45ecd989de31ab86b99a8ea5ada870d\"},{\"command\":\"gcc-ar\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-ar-13\",\"sha256\":\"ffc6a16e898aa3e5a0e3c6d418b41c815498d282be19e01d060eef0e1433ccfe\"},{\"command\":\"gcc-ar-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-ar-13\",\"sha256\":\"ffc6a16e898aa3e5a0e3c6d418b41c815498d282be19e01d060eef0e1433ccfe\"},{\"command\":\"gcc-nm\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-nm-13\",\"sha256\":\"5f145435894fbe10cc4bfb841e256381351bff398d19d8e9d85b5f009734e1a0\"},{\"command\":\"gcc-nm-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-nm-13\",\"sha256\":\"5f145435894fbe10cc4bfb841e256381351bff398d19d8e9d85b5f009734e1a0\"},{\"command\":\"gcc-ranlib\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-ranlib-13\",\"sha256\":\"e79a258937f68762e1a86f2b4aabd7eca20ba0d5970b725f12d8836208f228fe\"},{\"command\":\"gcc-ranlib-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcc-ranlib-13\",\"sha256\":\"e79a258937f68762e1a86f2b4aabd7eca20ba0d5970b725f12d8836208f228fe\"},{\"command\":\"gcov\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-13\",\"sha256\":\"7d7e793195f80c6164b220ca4b7339a102a9f57bc04cfed79fd581ae54bab688\"},{\"command\":\"gcov-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-13\",\"sha256\":\"7d7e793195f80c6164b220ca4b7339a102a9f57bc04cfed79fd581ae54bab688\"},{\"command\":\"gcov-dump\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-dump-13\",\"sha256\":\"26b03d13aea8cb68156618ec79b091c58a2d877d1bc2ef5aca27d03aec41cb97\"},{\"command\":\"gcov-dump-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-dump-13\",\"sha256\":\"26b03d13aea8cb68156618ec79b091c58a2d877d1bc2ef5aca27d03aec41cb97\"},{\"command\":\"gcov-tool\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-tool-13\",\"sha256\":\"1e1dec404a3b6c21b1c0470a67eecb6e937e70dcf95995380d6d69d0b6aea2ee\"},{\"command\":\"gcov-tool-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gcov-tool-13\",\"sha256\":\"1e1dec404a3b6c21b1c0470a67eecb6e937e70dcf95995380d6d69d0b6aea2ee\"},{\"command\":\"gencat\",\"executable\":\"/usr/bin/gencat\",\"sha256\":\"29c0722ad12bce55dcd805036b42aad59b7e4d99380ddb4fd8711c81206a7495\"},{\"command\":\"getconf\",\"executable\":\"/usr/bin/getconf\",\"sha256\":\"7c9dd928cf45b89d34652f2626ca2fc236cba32bc3460d216576d709aaa7b6cc\"},{\"command\":\"getent\",\"executable\":\"/usr/bin/getent\",\"sha256\":\"7cbb5cb86b917b37b855dc5d43f9d9f258a72c7c444260c696f208f54678a3bc\"},{\"command\":\"getopt\",\"executable\":\"/usr/bin/getopt\",\"sha256\":\"01ad0c99563e8b7b452be500d5d5cc99fff5901785649691a53d8f478808705d\"},{\"command\":\"git\",\"executable\":\"/usr/bin/git\",\"sha256\":\"aa6540695d076182256dd6e96c8b302e4d56381e3000bbfd5c71bbdfe94a4942\"},{\"command\":\"git-receive-pack\",\"executable\":\"/usr/bin/git\",\"sha256\":\"aa6540695d076182256dd6e96c8b302e4d56381e3000bbfd5c71bbdfe94a4942\"},{\"command\":\"git-shell\",\"executable\":\"/usr/bin/git-shell\",\"sha256\":\"203ceb003bfda9f24357ff5483843a5609940cd065b1047e4deffd92fa9a9152\"},{\"command\":\"git-signature-validator\",\"executable\":\"/opt/prismpm/oracles/git-signature-validator.mjs\",\"sha256\":\"e940cf45ddbf10b21b6e29d64c70390ade3857eb8cd08cd28c9cec36c78c52a9\"},{\"command\":\"git-upload-archive\",\"executable\":\"/usr/bin/git\",\"sha256\":\"aa6540695d076182256dd6e96c8b302e4d56381e3000bbfd5c71bbdfe94a4942\"},{\"command\":\"git-upload-pack\",\"executable\":\"/usr/bin/git\",\"sha256\":\"aa6540695d076182256dd6e96c8b302e4d56381e3000bbfd5c71bbdfe94a4942\"},{\"command\":\"gmake\",\"executable\":\"/usr/bin/make\",\"sha256\":\"abbecc214fcadef6530d1cc137bde7ceb74cae3f6b992c7d10a8669a7314c7e0\"},{\"command\":\"gold\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ld.gold\",\"sha256\":\"91be8ad8ab23070ae4d55989793e457d507370cb3537338b403f6f5e8229b6d9\"},{\"command\":\"gp-archive\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-archive\",\"sha256\":\"2f26b485311c0ca7d741c5221221056fb8d72397965a3cf4f21cd5aad5b23358\"},{\"command\":\"gp-collect-app\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-collect-app\",\"sha256\":\"47dc715a7ae9eab495de6e741cbe938a96d9a39df1113eae82cd22d45f75e2af\"},{\"command\":\"gp-display-html\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-display-html\",\"sha256\":\"538acc2bcc24a50de51e88b2d733d50b69237ebfee14660e45a0255215d9f582\"},{\"command\":\"gp-display-src\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-display-src\",\"sha256\":\"fd2d6a61e0d8a75986e85a1ee7728755fd209fad15798db8e01a419a6472c3e5\"},{\"command\":\"gp-display-text\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gp-display-text\",\"sha256\":\"4d72c93772d03cd6de507678b532bcfdb8a7c761898cb2ba7a227618fe53b511\"},{\"command\":\"gpasswd\",\"executable\":\"/usr/bin/gpasswd\",\"sha256\":\"a9ffc9491711b0e10a49328a39ea5d5fbcfa1b326224152fc95596373a5c6200\"},{\"command\":\"gpg\",\"executable\":\"/usr/bin/gpg\",\"sha256\":\"d0871bc0b26cf1308ace6f6fe800de2a4d914e9b8c67c02f9c1b6adbb778c41e\"},{\"command\":\"gpg-agent\",\"executable\":\"/usr/bin/gpg-agent\",\"sha256\":\"5bd7c61c431192d41478e288e6f5bba0287aa5e766b007db82d25f27c8b8cdd7\"},{\"command\":\"gpg-connect-agent\",\"executable\":\"/usr/bin/gpg-connect-agent\",\"sha256\":\"e6206a01b83afa1b0ce9c594dbb08cdd650c1974214c7f171bf2b25d86704789\"},{\"command\":\"gpgconf\",\"executable\":\"/usr/bin/gpgconf\",\"sha256\":\"c963223a000f287aa8ce6eb264dcd54614e51d5701952694ba73866a8f16e6f5\"},{\"command\":\"gpgv\",\"executable\":\"/usr/bin/gpgv\",\"sha256\":\"a7b1bc1a88927e6f5b30101c415c311aaa9810f51642c12a6b1a824a4c1df1fa\"},{\"command\":\"gprof\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gprof\",\"sha256\":\"fafe04ca52d0dbddaa1eaca63f4d58f484c1400434182b6f69e5db6bb864b02f\"},{\"command\":\"gprofng\",\"executable\":\"/usr/bin/aarch64-linux-gnu-gprofng\",\"sha256\":\"8fe24cd8b82f26ddd41f0d7493bf5883c967e60f7b1cc85dbec21cae36c664cc\"},{\"command\":\"grep\",\"executable\":\"/usr/bin/grep\",\"sha256\":\"fb7efa5f6b958b44258b08ab860b086aaa0446b8b50564b3d43367b2ba4ed407\"},{\"command\":\"groups\",\"executable\":\"/usr/bin/groups\",\"sha256\":\"d4aee2c49d27d63b769d24c1aaded0b7a2c0c105fd3d0f1b18d838512dac5417\"},{\"command\":\"gtk-update-icon-cache\",\"executable\":\"/usr/bin/gtk-update-icon-cache\",\"sha256\":\"9ebe606540501dc57d1057cbcee0336618e3a71f41c1e7db030c1d15de55ff8d\"},{\"command\":\"gunzip\",\"executable\":\"/usr/bin/gunzip\",\"sha256\":\"55c2f67ca4c3cca0ebac659f0075461dd671ec4937ecd6c71123bb49ed322ebd\"},{\"command\":\"gzexe\",\"executable\":\"/usr/bin/gzexe\",\"sha256\":\"ec1bf1611079caf2a981b570453d4b8b5b4a1efb20dd32138f393eb994b70fea\"},{\"command\":\"gzip\",\"executable\":\"/usr/bin/gzip\",\"sha256\":\"51641b277c149e1b1e33b4ff1debcdfe29c9520b5826ae693927eb7c16a182c4\"},{\"command\":\"h2ph\",\"executable\":\"/usr/bin/h2ph\",\"sha256\":\"86c19c01835bba602e1e954e48b69846286c9deaf453ea30d63d72190832bdb0\"},{\"command\":\"h2xs\",\"executable\":\"/usr/bin/h2xs\",\"sha256\":\"7292e1d2b1bcef2a1b05ce8bae00b2651e5f115b5aff07272b1fafbdad9e723f\"},{\"command\":\"hardlink\",\"executable\":\"/usr/bin/hardlink\",\"sha256\":\"b566027c07dcef27edc1d611d4e673068d1f54988a1959f5e601d26f2818b265\"},{\"command\":\"head\",\"executable\":\"/usr/bin/head\",\"sha256\":\"612ef32edfefd3fc4ca1af14fb1bdfd6a48d8318a7901ffb38ffc2a604347f3c\"},{\"command\":\"hostid\",\"executable\":\"/usr/bin/hostid\",\"sha256\":\"d7426ee0610322a1ea25ccfc7aa3a74305aa22c5ed1b0fd34eec4b262fd7bce9\"},{\"command\":\"hostname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"529801b643662701c07a120d133850a3a1d407fd0edd8390b3f2db759715eb8f\"},{\"command\":\"hostnamectl\",\"executable\":\"/usr/bin/hostnamectl\",\"sha256\":\"a7174e82c9db910865316af2aa2a8a98562d6ff5fec5fc43988b497f5e62f503\"},{\"command\":\"iconv\",\"executable\":\"/usr/bin/iconv\",\"sha256\":\"26b702236ab06b8310ea82bd97466d57bafe032f4d2c2ff48a10c8000db5f800\"},{\"command\":\"id\",\"executable\":\"/usr/bin/id\",\"sha256\":\"3b3b0197ad50b7e388e433e4e116bca4c860214148c108909154eb516d2dc9ed\"},{\"command\":\"infocmp\",\"executable\":\"/usr/bin/infocmp\",\"sha256\":\"52fcbe2149f210c71bc3433d0a60c65a62a8544cd66c01822c87cc834acb1496\"},{\"command\":\"infotocap\",\"executable\":\"/usr/bin/tic\",\"sha256\":\"71234d7ee819f7391990856281f772d578b19ae3b4e7f4626976c926310c2aae\"},{\"command\":\"install\",\"executable\":\"/usr/bin/install\",\"sha256\":\"8f4d01e05292943dcd00cb00551cd360c8383c7c4765dda7633f2069cd8afb1f\"},{\"command\":\"instmodsh\",\"executable\":\"/usr/bin/instmodsh\",\"sha256\":\"724aba7a26b1ba4f83af264e7bb31334aee0b56897b41d09c9dfd0b3389d6965\"},{\"command\":\"intoto-statement-validator\",\"executable\":\"/usr/local/bin/intoto-statement-validator\",\"sha256\":\"ccda3abd60d6616425f0f4af1b1444dd1245e76c4c9fa1b8bba4d2f65e587f02\"},{\"command\":\"ionice\",\"executable\":\"/usr/bin/ionice\",\"sha256\":\"5853dfc5b2513284f4e837b837aa5c05747ef98b9ce150cb0ba096b2ede6fa4b\"},{\"command\":\"ipcmk\",\"executable\":\"/usr/bin/ipcmk\",\"sha256\":\"a4815547b082b59d9eadb7d5a12936263acdd2a54d0324ab2b0eb21e1ae3eb97\"},{\"command\":\"ipcrm\",\"executable\":\"/usr/bin/ipcrm\",\"sha256\":\"bb260aef1f4235f53b7adb24bdc390cc27997b11c57dcdc6294b212cd7a8a0e9\"},{\"command\":\"ipcs\",\"executable\":\"/usr/bin/ipcs\",\"sha256\":\"d2e103ed9aa1875d6fca70a51f255eb09af8055e99959c17124f545793bab716\"},{\"command\":\"ischroot\",\"executable\":\"/usr/bin/ischroot\",\"sha256\":\"ca886bc4c52cf50b3239de26fed4da7ff1ae591cc075a581edc9f255462c1966\"},{\"command\":\"ispell-wrapper\",\"executable\":\"/usr/bin/ispell-wrapper\",\"sha256\":\"11ff62f305a09f52885315cb5dd295e5a47861accc596ebe818751022eb95c7f\"},{\"command\":\"join\",\"executable\":\"/usr/bin/join\",\"sha256\":\"e89548de35159655780e7797dde2e5e72c0fef232a1e57d1dc5ca020819c77e5\"},{\"command\":\"journalctl\",\"executable\":\"/usr/bin/journalctl\",\"sha256\":\"2507b16b76d739e587313828ff791f5fe033b437376aa2015fe7cd196a3131a4\"},{\"command\":\"json_pp\",\"executable\":\"/usr/bin/json_pp\",\"sha256\":\"b336e50dc789c31cbd7b0f467d05e0d91188d06c7c27aa4009b904af8c6a4091\"},{\"command\":\"just\",\"executable\":\"/usr/local/bin/just\",\"sha256\":\"ba5140b1d235ad37231a1acce6ce0867741ed241893e25d4ab8d5f33184eb1d2\"},{\"command\":\"kernel-install\",\"executable\":\"/usr/bin/kernel-install\",\"sha256\":\"d1247114e8adefa7e4f480bfb22462243e47f3ce71c16bf7c54dcb64153c8630\"},{\"command\":\"kill\",\"executable\":\"/usr/bin/kill\",\"sha256\":\"073d3e537f9659193d91b546d3dd58e077e2aef4b0dc5bb5b65220137a50a243\"},{\"command\":\"kind\",\"executable\":\"/usr/local/bin/kind\",\"sha256\":\"8e1014e87c34901cc422a1445866835d1e666f2a61301c27e722bdeab5a1f7e4\"},{\"command\":\"kubectl\",\"executable\":\"/usr/local/bin/kubectl\",\"sha256\":\"0ecf44450ee6063bf19dd166a103ee6df4a9034455c2abce626e6eea657d73fb\"},{\"command\":\"kubernetes-validator\",\"executable\":\"/opt/prismpm/oracles/kubernetes-validator.mjs\",\"sha256\":\"3c2555117a2fe092fc9260dc2672edaac415d36bd16e1edbbe32af847f92e737\"},{\"command\":\"lake\",\"executable\":\"/usr/local/elan/bin/lake\",\"sha256\":\"3985b63010981974c86c01c8e17f0c72ad5350104253f9cac8c7c87f8183de8d\"},{\"command\":\"last\",\"executable\":\"/usr/bin/last\",\"sha256\":\"0d89dcde6ca47477c4d91080595c99ae63e7c7d2f2fa79b8fa3507c3f49d919d\"},{\"command\":\"lastb\",\"executable\":\"/usr/bin/last\",\"sha256\":\"0d89dcde6ca47477c4d91080595c99ae63e7c7d2f2fa79b8fa3507c3f49d919d\"},{\"command\":\"lastlog\",\"executable\":\"/usr/bin/lastlog\",\"sha256\":\"5b7f450f259b044ad80187774777dfe645cd652e935d86bd4e258c58b2cd4f16\"},{\"command\":\"ld\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ld.bfd\",\"sha256\":\"1e4d3369b76845fa8e099b83513bf28f6f722e046f9b2cde1378c9e27f96d19c\"},{\"command\":\"ld.bfd\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ld.bfd\",\"sha256\":\"1e4d3369b76845fa8e099b83513bf28f6f722e046f9b2cde1378c9e27f96d19c\"},{\"command\":\"ld.gold\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ld.gold\",\"sha256\":\"91be8ad8ab23070ae4d55989793e457d507370cb3537338b403f6f5e8229b6d9\"},{\"command\":\"ld.so\",\"executable\":\"/usr/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1\",\"sha256\":\"49005ef8e9db9a45691ff875e6ca18dd8723c7ec5c1a863a276a1186dbf22774\"},{\"command\":\"ldd\",\"executable\":\"/usr/bin/ldd\",\"sha256\":\"2d9c1643ea67548e601baa6f6f4f4478cdd93afc5247a10ea94ae88a6e78d788\"},{\"command\":\"lean\",\"executable\":\"/usr/local/elan/bin/lean\",\"sha256\":\"3985b63010981974c86c01c8e17f0c72ad5350104253f9cac8c7c87f8183de8d\"},{\"command\":\"leanc\",\"executable\":\"/usr/local/elan/bin/leanc\",\"sha256\":\"3985b63010981974c86c01c8e17f0c72ad5350104253f9cac8c7c87f8183de8d\"},{\"command\":\"leanchecker\",\"executable\":\"/usr/local/elan/bin/leanchecker\",\"sha256\":\"3985b63010981974c86c01c8e17f0c72ad5350104253f9cac8c7c87f8183de8d\"},{\"command\":\"leanmake\",\"executable\":\"/usr/local/elan/bin/leanmake\",\"sha256\":\"3985b63010981974c86c01c8e17f0c72ad5350104253f9cac8c7c87f8183de8d\"},{\"command\":\"leanpkg\",\"executable\":\"/usr/local/elan/bin/leanpkg\",\"sha256\":\"3985b63010981974c86c01c8e17f0c72ad5350104253f9cac8c7c87f8183de8d\"},{\"command\":\"lexlean\",\"executable\":\"/usr/local/bin/lexlean\",\"sha256\":\"fa5f07242a5ad0bffc563dae614bf83dec075043ad03c5486b54e2b478f752a5\"},{\"command\":\"libnetcfg\",\"executable\":\"/usr/bin/libnetcfg\",\"sha256\":\"78bab79d103416b08a51e070bf599101a897f3753ff729bd3bafd4068f5b2564\"},{\"command\":\"link\",\"executable\":\"/usr/bin/link\",\"sha256\":\"7e9d9817bb0446b0c328c2a2f2fd972da5f1e66a3aecd7e663f0a4af3597a295\"},{\"command\":\"linux32\",\"executable\":\"/usr/bin/setarch\",\"sha256\":\"31d82c92b67440e4efa2331b7a6deb94a08e006696e61900825417120467f640\"},{\"command\":\"linux64\",\"executable\":\"/usr/bin/setarch\",\"sha256\":\"31d82c92b67440e4efa2331b7a6deb94a08e006696e61900825417120467f640\"},{\"command\":\"ln\",\"executable\":\"/usr/bin/ln\",\"sha256\":\"925e8bd7b49c7538616c070f2c17bb8b24908c1138c834dcce6c4117485b6118\"},{\"command\":\"locale\",\"executable\":\"/usr/bin/locale\",\"sha256\":\"a590aeb58b31980aba56df76288b0b5f1326612610fe8b65fba9a99561c93916\"},{\"command\":\"locale-check\",\"executable\":\"/usr/bin/locale-check\",\"sha256\":\"361ad88ab73a210c95ee99c9f1846a373dedd8ce07bc40df746c0e87fde9e169\"},{\"command\":\"localectl\",\"executable\":\"/usr/bin/localectl\",\"sha256\":\"0b6383108c49d2f54219b1d11f9f3bd3ce5c2769bcc7374580fb3b6d4e783b00\"},{\"command\":\"localedef\",\"executable\":\"/usr/bin/localedef\",\"sha256\":\"26fa2163e19f9661d50a5f194fcf29b78e2d33a0d8ec9bebf20496b20f04fd88\"},{\"command\":\"logger\",\"executable\":\"/usr/bin/logger\",\"sha256\":\"0e7a24b7ba0c4edaf0890da16c8d519f2b26d933a008b86447d9544c18fc21c1\"},{\"command\":\"login\",\"executable\":\"/usr/bin/login\",\"sha256\":\"c7274f3267ed4b1a6f620c50022ccbcd3526e73d832e8487f48b9a90f6b9e59a\"},{\"command\":\"loginctl\",\"executable\":\"/usr/bin/loginctl\",\"sha256\":\"6ba92d7b49ef99860e886252e8d643e5b1ff2ae5c3428b2eadef9d9f11a7ce03\"},{\"command\":\"logname\",\"executable\":\"/usr/bin/logname\",\"sha256\":\"54e9ab8bbfca02fff009d3f4b190cb6f08bae156c593ae88b7363e88a2c0068a\"},{\"command\":\"ls\",\"executable\":\"/usr/bin/ls\",\"sha256\":\"87337ebe81d2853af9f16915ad394344b287d0c99df48162fe15cc96c3fe6edf\"},{\"command\":\"lsattr\",\"executable\":\"/usr/bin/lsattr\",\"sha256\":\"cc7997da2d4bf3082c52ad35bb00ebf0cda13b36fb0cb64c181371a9b7a4b763\"},{\"command\":\"lsblk\",\"executable\":\"/usr/bin/lsblk\",\"sha256\":\"1846eb32336e9f15c82ef13126148a9273ed7ca568d422b092de95c8e4c1b646\"},{\"command\":\"lscpu\",\"executable\":\"/usr/bin/lscpu\",\"sha256\":\"e53e77cfa3772963de7585a989298d6049e031a056f5e3477ce42e84c3d464fd\"},{\"command\":\"lsipc\",\"executable\":\"/usr/bin/lsipc\",\"sha256\":\"a1996be797460534218819040b71f99673da3ac5af0f71412ebea87c898b3348\"},{\"command\":\"lslocks\",\"executable\":\"/usr/bin/lslocks\",\"sha256\":\"a9c933ef92d00fcea268bfd004cf38702000da9ecf62f1c531ec70bf677630c4\"},{\"command\":\"lslogins\",\"executable\":\"/usr/bin/lslogins\",\"sha256\":\"98abc2faf3afd380fa88d9d8367aed6e2e9bd69449298ec37eab9a65c8c7bc2f\"},{\"command\":\"lsmem\",\"executable\":\"/usr/bin/lsmem\",\"sha256\":\"e5c6202f54f64c0f9357297a2d455e9b0c0794808272889cf8c53ae03d259c70\"},{\"command\":\"lsns\",\"executable\":\"/usr/bin/lsns\",\"sha256\":\"001037f69f7c75a77e5e13b7f95e679627f9fc9477b789ffe0ffb4b39dfa7a6e\"},{\"command\":\"lto-dump\",\"executable\":\"/usr/bin/aarch64-linux-gnu-lto-dump-13\",\"sha256\":\"388e29e8f31599e067ee5ffdccc3722a55fb449276a58dbe4de03bab92c0a9ad\"},{\"command\":\"lto-dump-13\",\"executable\":\"/usr/bin/aarch64-linux-gnu-lto-dump-13\",\"sha256\":\"388e29e8f31599e067ee5ffdccc3722a55fb449276a58dbe4de03bab92c0a9ad\"},{\"command\":\"lzcat\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"296a7eaf0ac8cc4f37bd29f8fded9c768ed60fc646f64333e83e4f3a9148451d\"},{\"command\":\"lzcmp\",\"executable\":\"/usr/bin/xzdiff\",\"sha256\":\"551e26acd2c7d3f56ab6f43916cfcaafb96955eda66b656f1ed9a708f52e7667\"},{\"command\":\"lzdiff\",\"executable\":\"/usr/bin/xzdiff\",\"sha256\":\"551e26acd2c7d3f56ab6f43916cfcaafb96955eda66b656f1ed9a708f52e7667\"},{\"command\":\"lzegrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"lzfgrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"lzgrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"lzless\",\"executable\":\"/usr/bin/xzless\",\"sha256\":\"a25b3dee9826b993f4fe0043e6d3073c6658925c28afc303917d62b1cf465051\"},{\"command\":\"lzma\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"296a7eaf0ac8cc4f37bd29f8fded9c768ed60fc646f64333e83e4f3a9148451d\"},{\"command\":\"lzmainfo\",\"executable\":\"/usr/bin/lzmainfo\",\"sha256\":\"2d8ac87c84a531e0b3f9cbbd18852e286b23b1e67ed4d9ac95ad87163bec7069\"},{\"command\":\"lzmore\",\"executable\":\"/usr/bin/xzmore\",\"sha256\":\"e40b6cfbd6dcfd6fa46b721f7afb36efbbf3a8fbea1cd20f64b6123400f39306\"},{\"command\":\"make\",\"executable\":\"/usr/bin/make\",\"sha256\":\"abbecc214fcadef6530d1cc137bde7ceb74cae3f6b992c7d10a8669a7314c7e0\"},{\"command\":\"make-first-existing-target\",\"executable\":\"/usr/bin/make-first-existing-target\",\"sha256\":\"1ed1eb3449f3db643b7532550a04b9f0f3acd79a13243c4b474e1546f662e596\"},{\"command\":\"man\",\"executable\":\"/usr/bin/man\",\"sha256\":\"1150abfca60bce252e8a6a449719fec697aa8ac844ae330882a1618a78db05b7\"},{\"command\":\"mawk\",\"executable\":\"/usr/bin/mawk\",\"sha256\":\"38a07fb3962f22f50f09ed60bb7cc945053f25cd48519b974e597c4ee7a97a0c\"},{\"command\":\"mcookie\",\"executable\":\"/usr/bin/mcookie\",\"sha256\":\"5a9b732f10bbccf0ea7e9ec372753218a2d1e5dac4247a20333d90a7efcd55ed\"},{\"command\":\"md5sum\",\"executable\":\"/usr/bin/md5sum\",\"sha256\":\"146c9c1a25715930557f0cb97363228278a079aa869246daf3b731f897b0fcc0\"},{\"command\":\"md5sum.textutils\",\"executable\":\"/usr/bin/md5sum\",\"sha256\":\"146c9c1a25715930557f0cb97363228278a079aa869246daf3b731f897b0fcc0\"},{\"command\":\"mesg\",\"executable\":\"/usr/bin/mesg\",\"sha256\":\"53dbb4a30480568aa316babe88b9b7e0bad6cf299c2a8775dff88cef1bc1bf18\"},{\"command\":\"mkdir\",\"executable\":\"/usr/bin/mkdir\",\"sha256\":\"e0308b807656f115c844f785865ca009e6df2f5789ebfa3efb49c4b01640344e\"},{\"command\":\"mkfifo\",\"executable\":\"/usr/bin/mkfifo\",\"sha256\":\"008cd305d0d8ad589d11154b206a0ca3c4b829117127822959e451102b570668\"},{\"command\":\"mkfontdir\",\"executable\":\"/usr/bin/mkfontdir\",\"sha256\":\"3e42ff36b592706e5846d6133c38422d33881d3eaef87e59e9fda381c591ef78\"},{\"command\":\"mkfontscale\",\"executable\":\"/usr/bin/mkfontscale\",\"sha256\":\"fc059d114fb20ec6a8c5970c6e374f3526302b3ae30c63e712c4b70d7bc7db74\"},{\"command\":\"mknod\",\"executable\":\"/usr/bin/mknod\",\"sha256\":\"0039d8dbac20c752e0ac6147ebdf519ce19facbeaedbd48836ce0cc46eee25fb\"},{\"command\":\"mktemp\",\"executable\":\"/usr/bin/mktemp\",\"sha256\":\"4d082e92bcb9a6a2071fb7247e5785b748f4b5e0f8261ce3fcffeda775f9a05f\"},{\"command\":\"more\",\"executable\":\"/usr/bin/more\",\"sha256\":\"8ee32e17689c2dd4f81b0fca14a12fd1a8332e8f9db0e99b3ab518415d3f3ea6\"},{\"command\":\"mount\",\"executable\":\"/usr/bin/mount\",\"sha256\":\"d1f8e1f8e0b78f702f9d4ee0d996abd27f290ce0aa8a5490aa497d1c87b39092\"},{\"command\":\"mountpoint\",\"executable\":\"/usr/bin/mountpoint\",\"sha256\":\"2110f50f0b485633b997c4b050aa96755e88cc21a758fe19a5e57f636a3fab3a\"},{\"command\":\"mv\",\"executable\":\"/usr/bin/mv\",\"sha256\":\"8d17f81426c154381c58d5e9d957473b66a828589d4adf20f461b476137ae469\"},{\"command\":\"namei\",\"executable\":\"/usr/bin/namei\",\"sha256\":\"52321b7c4e2f3b2b47157d3c1a03ac4860082311e88280f6a25a94a0abecc9f1\"},{\"command\":\"nawk\",\"executable\":\"/usr/bin/mawk\",\"sha256\":\"38a07fb3962f22f50f09ed60bb7cc945053f25cd48519b974e597c4ee7a97a0c\"},{\"command\":\"networkctl\",\"executable\":\"/usr/bin/networkctl\",\"sha256\":\"0489cbbca0b7a567999477b405b3b4807abd07e359f59a8f7cc2f6c266082879\"},{\"command\":\"newgrp\",\"executable\":\"/usr/bin/newgrp\",\"sha256\":\"e8be2a2bd7c015f6bf3f8e721878a844070d17cbbfe354f2d80918a578597d58\"},{\"command\":\"nice\",\"executable\":\"/usr/bin/nice\",\"sha256\":\"0746d1600af7606b356e98974e05a26ce8db22e7c99df5bf4613d06128a3e566\"},{\"command\":\"nisdomainname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"529801b643662701c07a120d133850a3a1d407fd0edd8390b3f2db759715eb8f\"},{\"command\":\"nl\",\"executable\":\"/usr/bin/nl\",\"sha256\":\"5ecde33d3629e777693d979d7092ef264e8fd147c2d1c17cbc4937dcd5523640\"},{\"command\":\"nm\",\"executable\":\"/usr/bin/aarch64-linux-gnu-nm\",\"sha256\":\"338d018c73ef394539da2566405a1f2f50a808e3c15ef72e9b48dd2f0b0d262f\"},{\"command\":\"node\",\"executable\":\"/usr/local/bin/node\",\"sha256\":\"1a638b0fe2b68da0489276aca95526c5122fc61ba54d6a2d0d00c1c92ab7b876\"},{\"command\":\"nodejs\",\"executable\":\"/usr/bin/node\",\"sha256\":\"a990a8ae388fc285ddbce280e63fca48cfd7695f632b66aec6ed581566eace99\"},{\"command\":\"nohup\",\"executable\":\"/usr/bin/nohup\",\"sha256\":\"53051eae19352198441e9bc09e2ef64035941791490d883950bf864dddda6186\"},{\"command\":\"npm\",\"executable\":\"/usr/local/lib/node_modules/npm/bin/npm-cli.js\",\"sha256\":\"8e5f6f3429f8cdbe693cdc29904e9d5a7b127a494bd15c804bd54c7403bfcbe7\"},{\"command\":\"nproc\",\"executable\":\"/usr/bin/nproc\",\"sha256\":\"aca08386960083c1bf7b556d4a9a25e0b0fbe3f7494679e1f26c22893c1d09d3\"},{\"command\":\"npx\",\"executable\":\"/usr/local/lib/node_modules/npm/bin/npx-cli.js\",\"sha256\":\"237adf8f3747cad8b9b62fcfd0d9c8d509a64e550337707f55100afcb79e8900\"},{\"command\":\"nsenter\",\"executable\":\"/usr/bin/nsenter\",\"sha256\":\"cb407a058c84154e192a5b6a4be111f2891b4223f93e11c61bf7620303cc241e\"},{\"command\":\"numfmt\",\"executable\":\"/usr/bin/numfmt\",\"sha256\":\"a7b615e6d54f4cd80214c03ba91bbd0d47cae0301a1059eb3ab00ab818913de9\"},{\"command\":\"objcopy\",\"executable\":\"/usr/bin/aarch64-linux-gnu-objcopy\",\"sha256\":\"1216ee3b084501a5132643fef4bba7221186f4b7dc99cd46e2bf9e3e7d37c344\"},{\"command\":\"objdump\",\"executable\":\"/usr/bin/aarch64-linux-gnu-objdump\",\"sha256\":\"f2e917a5d118ebf5679b24740e20d30338308e7f3f0630527c469de452d5a250\"},{\"command\":\"oci-distribution-conformance\",\"executable\":\"/usr/local/bin/oci-distribution-conformance\",\"sha256\":\"6fa5e5b29dd6727e2e0af3eacdac7f5597a77bde14ef16957467ebfe42cc40fd\"},{\"command\":\"oci-image-schema-conformance\",\"executable\":\"/usr/local/bin/oci-image-schema-conformance\",\"sha256\":\"b1342cb1c38c1072e2c86a0e35343605d2bf5c63affa768a5116c1d5fc68e4b0\"},{\"command\":\"oci-runtime-validate\",\"executable\":\"/usr/local/bin/oci-runtime-validate\",\"sha256\":\"e2a80254467d17855b584e82aaf1c248c7cbe58ad6a18c4af3d7d783b7081b78\"},{\"command\":\"od\",\"executable\":\"/usr/bin/od\",\"sha256\":\"d3020bc8b33d45d395c42a27de9104ae6a0101b3447ffff4a61853acb2f5e43f\"},{\"command\":\"openid-conformance\",\"executable\":\"/usr/local/bin/openid-conformance\",\"sha256\":\"7ee100439bc7dc35cda162b85be68140338bdae5aa3c2fb79412cca621bdd9b1\"},{\"command\":\"openssl\",\"executable\":\"/usr/bin/openssl\",\"sha256\":\"4b181b2ff3334c33d5572dab210b2855375ac5179e2729247afc0a9b6041d588\"},{\"command\":\"oras\",\"executable\":\"/usr/local/bin/oras\",\"sha256\":\"e2b67c4efb35f20a546aacc680e0f81f907d3cf4cf9f1b2040c34bb471c428f1\"},{\"command\":\"osv-scanner\",\"executable\":\"/usr/local/bin/osv-scanner\",\"sha256\":\"44e580752910f0ff36ec99aff59af20f65df1e859aa31e5605a8f0d055b496e9\"},{\"command\":\"otelcol-contrib\",\"executable\":\"/usr/local/bin/otelcol-contrib\",\"sha256\":\"ab2a5776537bdf16c9adc4f986ada565f339fd954c48a25d574e9b72195515fa\"},{\"command\":\"pager\",\"executable\":\"/usr/bin/more\",\"sha256\":\"8ee32e17689c2dd4f81b0fca14a12fd1a8332e8f9db0e99b3ab518415d3f3ea6\"},{\"command\":\"partx\",\"executable\":\"/usr/bin/partx\",\"sha256\":\"4ae7f2ed951d61cf7a270b2cc56bba54d9e2b4018950f5c242acd34e95f1beaa\"},{\"command\":\"passwd\",\"executable\":\"/usr/bin/passwd\",\"sha256\":\"8685741e7fc8089ac84764e55e7a1734e14658d7124d020c1f39f3d25fd8b0ae\"},{\"command\":\"paste\",\"executable\":\"/usr/bin/paste\",\"sha256\":\"16f1811628ecb90917aa45178b47c4ddf41738468e1f7863f9d909bbfc15917e\"},{\"command\":\"patch\",\"executable\":\"/usr/bin/patch\",\"sha256\":\"1b04b2a8dffbcfa9d75d17eb386a73f271415142d4e48baab2acfc10b1cca8f5\"},{\"command\":\"pathchk\",\"executable\":\"/usr/bin/pathchk\",\"sha256\":\"7ae646afc527208c574a65f7072f994f7cf9b93e5d27f3a6624b37c897f42de2\"},{\"command\":\"pdb3\",\"executable\":\"/usr/lib/python3.12/pdb.py\",\"sha256\":\"8d2a36cb0c9a4d8eda57e1a4fe153fff2724570286ecf520648aee4fe7a4fff7\"},{\"command\":\"pdb3.12\",\"executable\":\"/usr/lib/python3.12/pdb.py\",\"sha256\":\"8d2a36cb0c9a4d8eda57e1a4fe153fff2724570286ecf520648aee4fe7a4fff7\"},{\"command\":\"perl\",\"executable\":\"/usr/bin/perl\",\"sha256\":\"e16baa3bf04329253c99ba0ce60f84afc87a7330e271646cdee1e54885c38007\"},{\"command\":\"perl5.38-aarch64-linux-gnu\",\"executable\":\"/usr/bin/perl5.38-aarch64-linux-gnu\",\"sha256\":\"2f95c3bf4c22fbb04242dd9a96cc29eae6baa84e29356ebf9ef27a1483c08f24\"},{\"command\":\"perl5.38.2\",\"executable\":\"/usr/bin/perl5.38.2\",\"sha256\":\"e16baa3bf04329253c99ba0ce60f84afc87a7330e271646cdee1e54885c38007\"},{\"command\":\"perlbug\",\"executable\":\"/usr/bin/perlbug\",\"sha256\":\"f1283dadae7c65a24852623282b6ec235a83e32dfa53c75745de98a672791d41\"},{\"command\":\"perldoc\",\"executable\":\"/usr/bin/perldoc\",\"sha256\":\"d8bebeee62ce30574f40d53182b7fe17619e144233a7f7ddfa3e33ca34deccec\"},{\"command\":\"perlivp\",\"executable\":\"/usr/bin/perlivp\",\"sha256\":\"ea0bc6dfbf245531e7fed7ee22c07d576aaf89e57251bab47a879f40742d565e\"},{\"command\":\"perlthanks\",\"executable\":\"/usr/bin/perlthanks\",\"sha256\":\"f1283dadae7c65a24852623282b6ec235a83e32dfa53c75745de98a672791d41\"},{\"command\":\"pgrep\",\"executable\":\"/usr/bin/pgrep\",\"sha256\":\"62b85644146d2ef2a8441b25220e3b1ea8ab7303ae56a828af12cbd87d7fdb3b\"},{\"command\":\"piconv\",\"executable\":\"/usr/bin/piconv\",\"sha256\":\"0ddc062a05a184cc3f89338a44437364a29811b420f3660c13915bddfdc3a689\"},{\"command\":\"pidof\",\"executable\":\"/usr/sbin/killall5\",\"sha256\":\"7cc77d6d070b63e53336eb1233f1d2ceb131d185c200f0043537bfc7d0e4699c\"},{\"command\":\"pidwait\",\"executable\":\"/usr/bin/pidwait\",\"sha256\":\"62b85644146d2ef2a8441b25220e3b1ea8ab7303ae56a828af12cbd87d7fdb3b\"},{\"command\":\"pinentry\",\"executable\":\"/usr/bin/pinentry-curses\",\"sha256\":\"4f8a668bd0db04683466dc31385c1ac6f317ce8f7dcc0262157b7238aae7a2b3\"},{\"command\":\"pinentry-curses\",\"executable\":\"/usr/bin/pinentry-curses\",\"sha256\":\"4f8a668bd0db04683466dc31385c1ac6f317ce8f7dcc0262157b7238aae7a2b3\"},{\"command\":\"pinky\",\"executable\":\"/usr/bin/pinky\",\"sha256\":\"f685f53acac3d973665b737bb3333edd3af14cd6e77fc5ed9b3ae84d595e8833\"},{\"command\":\"pkg-config\",\"executable\":\"/usr/bin/pkgconf\",\"sha256\":\"b21b58e97876992968c82d823d74034abbc6a4176f8c9d5f2e0400f343e73fc1\"},{\"command\":\"pkgconf\",\"executable\":\"/usr/bin/pkgconf\",\"sha256\":\"b21b58e97876992968c82d823d74034abbc6a4176f8c9d5f2e0400f343e73fc1\"},{\"command\":\"pkill\",\"executable\":\"/usr/bin/pgrep\",\"sha256\":\"62b85644146d2ef2a8441b25220e3b1ea8ab7303ae56a828af12cbd87d7fdb3b\"},{\"command\":\"pl2pm\",\"executable\":\"/usr/bin/pl2pm\",\"sha256\":\"a974fb9e86c76778a249d47d521e6fa1847c331ba3eea6e240a37b1c44dd6a1d\"},{\"command\":\"pldd\",\"executable\":\"/usr/bin/pldd\",\"sha256\":\"9a100429c740c442c0f88b06166460661806d070f2d49ba0484c75a00244d1ce\"},{\"command\":\"pmap\",\"executable\":\"/usr/bin/pmap\",\"sha256\":\"1b22197a71a07653eef28c8dee7ee72358a4694b3b9d444b8c1543fd0e20c96e\"},{\"command\":\"pod2html\",\"executable\":\"/usr/bin/pod2html\",\"sha256\":\"713aa9fdcf27a9b70991c14ee5bc47a8a56ec2cfd804df9b79f90f6024de4750\"},{\"command\":\"pod2man\",\"executable\":\"/usr/bin/pod2man\",\"sha256\":\"fdcf8ff920a7461cad02121890b58039f01206809cea6e09eef84692eb793a17\"},{\"command\":\"pod2text\",\"executable\":\"/usr/bin/pod2text\",\"sha256\":\"e0372745722b8d7eeb3ce932606493381c936886e754913d25578cadfce29a13\"},{\"command\":\"pod2usage\",\"executable\":\"/usr/bin/pod2usage\",\"sha256\":\"6405327f3f8660ed89c068b760f61ffb9bd180e2997e9ba881be00f6989c6da3\"},{\"command\":\"podchecker\",\"executable\":\"/usr/bin/podchecker\",\"sha256\":\"b41c90733b7f4051dbe82d289177add630133f0679660fbfa3f3051ecd309dbb\"},{\"command\":\"pr\",\"executable\":\"/usr/bin/pr\",\"sha256\":\"56a5874a702f793ce3189206e214d3b1a1e1568954e9ad3c94ef574addddd3ee\"},{\"command\":\"printenv\",\"executable\":\"/usr/bin/printenv\",\"sha256\":\"9b05218074e82cb36afa0d1236874bd48e871a29bb91211ce1540238a6af5b26\"},{\"command\":\"printf\",\"executable\":\"/usr/bin/printf\",\"sha256\":\"f431071e7304e8448a4565facfc27afefd2578a993da3f1942b3e457d70f8730\"},{\"command\":\"prismpm\",\"executable\":\"/usr/local/bin/prismpm\",\"sha256\":\"62da63d950a9bee4bd2a7d8c5ff254222aca45780c9b5862856a5dff61e9fe7b\"},{\"command\":\"prismpm-conformance\",\"executable\":\"/usr/local/bin/prismpm-conformance\",\"sha256\":\"578e2e0ab7ee0859ee39b6f45d72b6c79ae5680b9f17c22264ed374db7bc1b11\"},{\"command\":\"prismpm-devcontainer-init\",\"executable\":\"/usr/local/bin/prismpm-devcontainer-init\",\"sha256\":\"b8787fc1f0b996393d4e7c55f84a901916e807570c76f27c027743d27dde487b\"},{\"command\":\"prismpm-platform-equivalence\",\"executable\":\"/usr/local/bin/prismpm-platform-equivalence\",\"sha256\":\"909e32fb88aaa039f362d1bba795ae97762c1957d297223c454a457ed8e90d9a\"},{\"command\":\"prlimit\",\"executable\":\"/usr/bin/prlimit\",\"sha256\":\"2a479939c95a886fb8b52244381639816f8cf1f68eee713a9227d0c5d257c805\"},{\"command\":\"prove\",\"executable\":\"/usr/bin/prove\",\"sha256\":\"30c7fee6225199bbcd242975fe5b2df0436e9ffa9136a5b8972b922dfaf8485b\"},{\"command\":\"ps\",\"executable\":\"/usr/bin/ps\",\"sha256\":\"3fa1c04e29647304817b1ffe9a7600dc80c879ea4c8a9302032799830e0c2133\"},{\"command\":\"ptar\",\"executable\":\"/usr/bin/ptar\",\"sha256\":\"126fc379885309b476100e1150430256ab892c5b5650741af17478984a389758\"},{\"command\":\"ptardiff\",\"executable\":\"/usr/bin/ptardiff\",\"sha256\":\"1d7d45bd4f48409a479886e6cfb6e3e8093fea89b10ce906d399484d92a86cc0\"},{\"command\":\"ptargrep\",\"executable\":\"/usr/bin/ptargrep\",\"sha256\":\"0bca747354107929ecefbab2a8128923763bfa622124e20a1194c7f8a914a20f\"},{\"command\":\"ptx\",\"executable\":\"/usr/bin/ptx\",\"sha256\":\"cea67db2ac5c2a0fca52ca9c23977125618a2b7c6f101cde6b9c6731cc1d6b88\"},{\"command\":\"pwd\",\"executable\":\"/usr/bin/pwd\",\"sha256\":\"e5d415b20c643d99f6268254045f006ddd6609d71b065d490a1501f716da4fd2\"},{\"command\":\"pwdx\",\"executable\":\"/usr/bin/pwdx\",\"sha256\":\"92d622ec724bf1dafe937039cf8b8f3a489c59fcf1d401059a107e72087e0c58\"},{\"command\":\"py3clean\",\"executable\":\"/usr/bin/py3clean\",\"sha256\":\"48c7d9e6a14a349beae906eae5fe8cac9a974bda7a40c3dc3b9e1163251eb250\"},{\"command\":\"py3compile\",\"executable\":\"/usr/bin/py3compile\",\"sha256\":\"4ca3cf6f9fbb47571e11c86222f4f3952a22d87f5df37c060388e96b0ef00813\"},{\"command\":\"py3versions\",\"executable\":\"/usr/share/python3/py3versions.py\",\"sha256\":\"8b0eef6d34bd68477d81d89d8e6bf91d6a991cb5034351d564731aa013b6e7e7\"},{\"command\":\"pydoc3\",\"executable\":\"/usr/bin/pydoc3.12\",\"sha256\":\"ddbcea7349aca28998c76624ac9b4a692b3edd4ab80c279e7d97a6aca813191a\"},{\"command\":\"pydoc3.12\",\"executable\":\"/usr/bin/pydoc3.12\",\"sha256\":\"ddbcea7349aca28998c76624ac9b4a692b3edd4ab80c279e7d97a6aca813191a\"},{\"command\":\"pygettext3\",\"executable\":\"/usr/bin/pygettext3.12\",\"sha256\":\"d6d87fa2841d71debfdec183c7df8752a759ca56af467248a79e2e192f80eda1\"},{\"command\":\"pygettext3.12\",\"executable\":\"/usr/bin/pygettext3.12\",\"sha256\":\"d6d87fa2841d71debfdec183c7df8752a759ca56af467248a79e2e192f80eda1\"},{\"command\":\"python3\",\"executable\":\"/usr/bin/python3.12\",\"sha256\":\"a7d56a8a764faf7bbf5c164055a48fd072be52287bdeb523a9e07b2042f4e7e1\"},{\"command\":\"python3.12\",\"executable\":\"/usr/bin/python3.12\",\"sha256\":\"a7d56a8a764faf7bbf5c164055a48fd072be52287bdeb523a9e07b2042f4e7e1\"},{\"command\":\"ranlib\",\"executable\":\"/usr/bin/aarch64-linux-gnu-ranlib\",\"sha256\":\"824de22ce448c3567e631425f7754a6df72e90bd758079daa94f1aa6edf41513\"},{\"command\":\"rbash\",\"executable\":\"/usr/bin/bash\",\"sha256\":\"af955ef55333c8fc9c5aa50df91ad1a629d9a79a9afa125cd5e9629585f78015\"},{\"command\":\"readelf\",\"executable\":\"/usr/bin/aarch64-linux-gnu-readelf\",\"sha256\":\"6bca2bbd23b072db9e9a19ae0e65cf7b7c15c08a3c2cf01dd56453e1ac9340b1\"},{\"command\":\"readlink\",\"executable\":\"/usr/bin/readlink\",\"sha256\":\"068bf5e7b3cfa43ae02ccf7b854f13863adb05d75d011a2de9e89adafd1a524b\"},{\"command\":\"realpath\",\"executable\":\"/usr/bin/realpath\",\"sha256\":\"8dd4c640bedcb4044098c8fb6aa7725ef92c824d1938084fa9abc9a5be5ffc61\"},{\"command\":\"rename.ul\",\"executable\":\"/usr/bin/rename.ul\",\"sha256\":\"d722c496ff5f9c67ca5072fad141b1c4460d9fc5f83f623a11b06b54e76d95c4\"},{\"command\":\"renice\",\"executable\":\"/usr/bin/renice\",\"sha256\":\"79a5d7f65ec6df91405ba529d1dc9fa4449761272ee3aec10c5ca1e9a86053e5\"},{\"command\":\"reset\",\"executable\":\"/usr/bin/tset\",\"sha256\":\"65369c25251289d5009f7f5481383c021f358a6c565f7d4310f5ebc115362dc8\"},{\"command\":\"resizepart\",\"executable\":\"/usr/bin/resizepart\",\"sha256\":\"c9489b516e682e4e90d330fe4f8d2e486844527fba65ddf44e604b41c0863836\"},{\"command\":\"rev\",\"executable\":\"/usr/bin/rev\",\"sha256\":\"43e429dede9dfd39d02ee407ff7f4ef8180a1f816a5a7e8c5f626c4664f5ef7d\"},{\"command\":\"rgrep\",\"executable\":\"/usr/bin/rgrep\",\"sha256\":\"0a8dd42a068115f058ae57f9f6347e1ef0ae2ffea89bf658b132974246577748\"},{\"command\":\"rls\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"rm\",\"executable\":\"/usr/bin/rm\",\"sha256\":\"acc9c5cb7387a25725bb504bf60fc35fbd487e902dd6b4a725f444d3188e95a6\"},{\"command\":\"rmdir\",\"executable\":\"/usr/bin/rmdir\",\"sha256\":\"e0ccd8e45e85e1b1e3b4c3ca571354937632a2b651d24299c1910c388d4509cc\"},{\"command\":\"rpcgen\",\"executable\":\"/usr/bin/rpcgen\",\"sha256\":\"c08bb44246dc702c11bc3f31b5994addacf62c520f28f00f10dd16c8b76a895f\"},{\"command\":\"run-parts\",\"executable\":\"/usr/bin/run-parts\",\"sha256\":\"a0bf35fb6e8053a4b9026090016d0e8d1e870705cde7c9f750d58445c4aa700d\"},{\"command\":\"runcon\",\"executable\":\"/usr/bin/runcon\",\"sha256\":\"536161f98700f2bc51916690e7c102093d67acd20e501a15bacd2c9e54f7ee87\"},{\"command\":\"rust-analyzer\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"rust-gdb\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"rust-gdbgui\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"rust-lldb\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"rustc\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"rustdoc\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"rustfmt\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"rustup\",\"executable\":\"/usr/local/cargo/bin/rustup\",\"sha256\":\"9732d6c5e2a098d3521fca8145d826ae0aaa067ef2385ead08e6feac88fa5792\"},{\"command\":\"savelog\",\"executable\":\"/usr/bin/savelog\",\"sha256\":\"6a0f55fea1a81f1930c86f534fb5570785b2f12f3da49709e76c3148a89e0197\"},{\"command\":\"scalar\",\"executable\":\"/usr/bin/scalar\",\"sha256\":\"1ddce4a9a6bafc21ba5db7b92a19c6c83e2b5e2596ea6257bb36e184487d0a7e\"},{\"command\":\"scp\",\"executable\":\"/usr/bin/scp\",\"sha256\":\"3fcd364740fc61c5244427412289eae08319275f998a42942a3a7ad4d28a26e4\"},{\"command\":\"script\",\"executable\":\"/usr/bin/script\",\"sha256\":\"f9fb256e6474c30ba9e69976e5a3fbf473e532cdecc37cc27d8fb51dbce90340\"},{\"command\":\"scriptlive\",\"executable\":\"/usr/bin/scriptlive\",\"sha256\":\"d5fb627d6062b976f3b3415dd681a4be52febcdb7178480490699fe4de4d473d\"},{\"command\":\"scriptreplay\",\"executable\":\"/usr/bin/scriptreplay\",\"sha256\":\"7e77b496879e1086bee3fad6c2c4e19ae06ec9aede5f87574112038447517ce0\"},{\"command\":\"sdiff\",\"executable\":\"/usr/bin/sdiff\",\"sha256\":\"661b67f524a61633eba317cbc21d691851841ef95f2dcf91f89d7f9997a11f13\"},{\"command\":\"sed\",\"executable\":\"/usr/bin/sed\",\"sha256\":\"39ca7d42a112f32abd4f2a016c8a0d1777a5fd75608f8e1a5d80ac161337a0fe\"},{\"command\":\"select-default-iwrap\",\"executable\":\"/usr/bin/select-default-iwrap\",\"sha256\":\"8887e11359e088e96a84494f36b38a9b60d13cb9170bf34d8c3f3a79a3894052\"},{\"command\":\"select-editor\",\"executable\":\"/usr/bin/select-editor\",\"sha256\":\"46ce6e3872a1807f83a958d647ededf626f3aab13ad4b078493358c59aa5b97e\"},{\"command\":\"sensible-browser\",\"executable\":\"/usr/bin/sensible-browser\",\"sha256\":\"0da2fd759bef3369bf3ff660ab0285525ac80836c5cc8adff977b0f714be2945\"},{\"command\":\"sensible-editor\",\"executable\":\"/usr/bin/sensible-editor\",\"sha256\":\"3c92be6eb21bf661df4cc75caa3bd1d587378b313d981ec17af318532d00689b\"},{\"command\":\"sensible-pager\",\"executable\":\"/usr/bin/sensible-pager\",\"sha256\":\"c1cc2231c552a691c0a7da73f9e79954cfa785921019385a2b7f1dedb4446940\"},{\"command\":\"sensible-terminal\",\"executable\":\"/usr/bin/sensible-terminal\",\"sha256\":\"98bbedd54ce47886213d09ab622872e4fb1742e9ba325a0202cfb8e3705ac510\"},{\"command\":\"seq\",\"executable\":\"/usr/bin/seq\",\"sha256\":\"55c96307f0875b1a9205ff228cab8afa1af66835e2c472039ecc2b340481e754\"},{\"command\":\"session-migration\",\"executable\":\"/usr/bin/session-migration\",\"sha256\":\"e318b3d0ef3299f9e916f04195bffb647460eae14138f70ceaa62192e04c00ea\"},{\"command\":\"setarch\",\"executable\":\"/usr/bin/setarch\",\"sha256\":\"31d82c92b67440e4efa2331b7a6deb94a08e006696e61900825417120467f640\"},{\"command\":\"setpriv\",\"executable\":\"/usr/bin/setpriv\",\"sha256\":\"aa302d81cc4bccd088cd887d5e729f2c2488eb67cf8c2541385de21db3907c8c\"},{\"command\":\"setsid\",\"executable\":\"/usr/bin/setsid\",\"sha256\":\"fb541a17af14a6c71863a12f24684e813668835654e2b8fb1df170a4568ac725\"},{\"command\":\"setterm\",\"executable\":\"/usr/bin/setterm\",\"sha256\":\"0e783626cf79edffd350fc1a4bb35f3d8678e43f12068af44c5e08dd83e925d0\"},{\"command\":\"setxkbmap\",\"executable\":\"/usr/bin/setxkbmap\",\"sha256\":\"08eb5014ac72cee8982c3754565000b98a23862328ffae4b75868573c060d5d9\"},{\"command\":\"sftp\",\"executable\":\"/usr/bin/sftp\",\"sha256\":\"9e53913afdf26161700611419a5ff7d823d0d05a4c3643657eb27c8703b7bc9b\"},{\"command\":\"sg\",\"executable\":\"/usr/bin/newgrp\",\"sha256\":\"e8be2a2bd7c015f6bf3f8e721878a844070d17cbbfe354f2d80918a578597d58\"},{\"command\":\"sh\",\"executable\":\"/usr/bin/dash\",\"sha256\":\"c883d9c27228339580994a1d0ea960645368c7d1b960a712bd0c655860c2d0d7\"},{\"command\":\"sha1sum\",\"executable\":\"/usr/bin/sha1sum\",\"sha256\":\"fb8a6fcbb64e8cdeb84b0e41cdcdd55ac42edfb9c51f77c68191f352440ee15d\"},{\"command\":\"sha224sum\",\"executable\":\"/usr/bin/sha224sum\",\"sha256\":\"ffb9efbd80cf57bd32de32063e219ff09ca75247523d807276eb3d8e9d6f3b9b\"},{\"command\":\"sha256sum\",\"executable\":\"/usr/bin/sha256sum\",\"sha256\":\"f3d040161f5c29e4c7cd4e3d6bb513ce9a43b9d1bd06f456a6aab3d34d0f1e33\"},{\"command\":\"sha384sum\",\"executable\":\"/usr/bin/sha384sum\",\"sha256\":\"64e145ee1b3507148d8aa3d11b80d73266e52ffff33374500980bb7f42151546\"},{\"command\":\"sha512sum\",\"executable\":\"/usr/bin/sha512sum\",\"sha256\":\"4136092171c939e640db094217b4de0ab17f2ec02b2eb87a4edb05de03ef5b9b\"},{\"command\":\"shasum\",\"executable\":\"/usr/bin/shasum\",\"sha256\":\"e3bad5e7cd244f5a24fbee97be7e9a90ee20993ff5b5213ffeac0e0976cffb7c\"},{\"command\":\"shred\",\"executable\":\"/usr/bin/shred\",\"sha256\":\"aea49cf561626d6450542c27f000d59190f6402ad2ed5a1f386e5641a73f4524\"},{\"command\":\"shuf\",\"executable\":\"/usr/bin/shuf\",\"sha256\":\"051696ca48c1aac3658df7d7bf405cfdbf85af532c888d9eee1daa81977cf3b3\"},{\"command\":\"size\",\"executable\":\"/usr/bin/aarch64-linux-gnu-size\",\"sha256\":\"59043ac56a8c2c059cd4cad6de00d80d0efd004c69efbb40f00a44b530323973\"},{\"command\":\"skill\",\"executable\":\"/usr/bin/skill\",\"sha256\":\"644a8de8bea0bea81a0133fe81ec93d6ad5985b2b69e19fa24d6c52d414e1d7c\"},{\"command\":\"slabtop\",\"executable\":\"/usr/bin/slabtop\",\"sha256\":\"136699d09efd98ea4660687cb18a442054016a1c51710491f90f0866928bc9f3\"},{\"command\":\"sleep\",\"executable\":\"/usr/bin/sleep\",\"sha256\":\"a3202123ba517a3c4f08ca25429e3f48eb9dffae9b888a9d353c21451f807f6a\"},{\"command\":\"slogin\",\"executable\":\"/usr/bin/ssh\",\"sha256\":\"8d595230ff925ba5df41daef600b4e7334d429464629c0072b8fcf78498839c3\"},{\"command\":\"slsa-validator\",\"executable\":\"/opt/prismpm/oracles/slsa-validator.mjs\",\"sha256\":\"04cdd2f287060cc2ba7a93b45ddcb899140451e9375e703aa4aabfee10800b7f\"},{\"command\":\"slsa-verifier\",\"executable\":\"/usr/local/bin/slsa-verifier\",\"sha256\":\"5d3b2349ede7bfec19e7a21569f18b9f7410145ad12e9584b175370669e14061\"},{\"command\":\"snice\",\"executable\":\"/usr/bin/skill\",\"sha256\":\"644a8de8bea0bea81a0133fe81ec93d6ad5985b2b69e19fa24d6c52d414e1d7c\"},{\"command\":\"sort\",\"executable\":\"/usr/bin/sort\",\"sha256\":\"585d23713156762b18afcebc553fee6d46fe2d5848c27f3f46ab13d877341d79\"},{\"command\":\"spdx-validator\",\"executable\":\"/opt/prismpm/oracles/spdx-validator.mjs\",\"sha256\":\"e2670b02913ab07bef777fe30075892652b2fd8b78ca396d83916368946334a1\"},{\"command\":\"splain\",\"executable\":\"/usr/bin/splain\",\"sha256\":\"06b28f957c591b63f3c03dd5829ce85e7ce2daf29c82baa4c24445cdf40d3052\"},{\"command\":\"split\",\"executable\":\"/usr/bin/split\",\"sha256\":\"a8efa448605a658c10407d7c7c49fb754ae70984be050f9eb29f13d2787233e7\"},{\"command\":\"ssh\",\"executable\":\"/usr/bin/ssh\",\"sha256\":\"8d595230ff925ba5df41daef600b4e7334d429464629c0072b8fcf78498839c3\"},{\"command\":\"ssh-add\",\"executable\":\"/usr/bin/ssh-add\",\"sha256\":\"83a77d6d92665756f1fbccf4ee084b1f10c4ea161f4efc0c607b34346e162a8b\"},{\"command\":\"ssh-agent\",\"executable\":\"/usr/bin/ssh-agent\",\"sha256\":\"79a3a7ed7c3fba571dc3de7468c0c498f4081dc3d30029dd1850e5d5f3218115\"},{\"command\":\"ssh-argv0\",\"executable\":\"/usr/bin/ssh-argv0\",\"sha256\":\"fcf4ffdfab652a0882b7b2417a25265d07a936c4268e2d3f4dec14797a9e5734\"},{\"command\":\"ssh-copy-id\",\"executable\":\"/usr/bin/ssh-copy-id\",\"sha256\":\"b625120eeff8b0e64e4e8c71e5ed3a7878fd69d318a88ce0a22e115725f6b815\"},{\"command\":\"ssh-keygen\",\"executable\":\"/usr/bin/ssh-keygen\",\"sha256\":\"621136662bb8552f45bdec675fa676d47d2ba9f258574bc58efeccb813b14bc0\"},{\"command\":\"ssh-keyscan\",\"executable\":\"/usr/bin/ssh-keyscan\",\"sha256\":\"97dc9d62283a0435c43edd8185c518707ba2f830b68937255818bd43d73245ba\"},{\"command\":\"stat\",\"executable\":\"/usr/bin/stat\",\"sha256\":\"86b89355842f54a49698069b345eabb94c2f26d2f33b5734ec91c68de8fe6f7a\"},{\"command\":\"stdbuf\",\"executable\":\"/usr/bin/stdbuf\",\"sha256\":\"9fb39588cadcc6bbec9e1da3f84789c6e409cc3ee58577f860ea0de3d6a32da2\"},{\"command\":\"streamzip\",\"executable\":\"/usr/bin/streamzip\",\"sha256\":\"672ee1b2d50455c34d9fc4c294b68e757c4920196d6fdfb4295dd2d76e7696f8\"},{\"command\":\"strings\",\"executable\":\"/usr/bin/aarch64-linux-gnu-strings\",\"sha256\":\"f6b809537477dfed119b80ad8c0da1653a2b9ed0173ebb72ebf236a1c94ce018\"},{\"command\":\"strip\",\"executable\":\"/usr/bin/aarch64-linux-gnu-strip\",\"sha256\":\"3a69e3786ea2884baf4d9811e509ba6d16be03d5d6f541103b8de317a2465fca\"},{\"command\":\"stty\",\"executable\":\"/usr/bin/stty\",\"sha256\":\"9d7bb61f709ddc6f8d427b2388ff5f632436a111ee5ab7c9cc3892f613e592bc\"},{\"command\":\"su\",\"executable\":\"/usr/bin/su\",\"sha256\":\"26a3c00a4e11be92a4f7f9b2eb36b5543efbf722b34d5651bd03833e786389d4\"},{\"command\":\"sum\",\"executable\":\"/usr/bin/sum\",\"sha256\":\"174719077667beffcef4fe041b9e4f647a601a795d8d4d4df6b9e2a76a96b29e\"},{\"command\":\"sync\",\"executable\":\"/usr/bin/sync\",\"sha256\":\"2108de36adb79e402ebf43ada3eb84e6dd05078a9d1ade2f32d501a2b9f9485d\"},{\"command\":\"systemctl\",\"executable\":\"/usr/bin/systemctl\",\"sha256\":\"f158408c8ff84e0dfd2eda0678b7939a028a7c3c19039ef5792511a92a36267e\"},{\"command\":\"systemd\",\"executable\":\"/usr/lib/systemd/systemd\",\"sha256\":\"2c89a676735d70cf4142b4e8e76c9c524e0d8d53d8a629565e08fe81303a5c4a\"},{\"command\":\"systemd-ac-power\",\"executable\":\"/usr/bin/systemd-ac-power\",\"sha256\":\"a8d16fe6fe57241de9bdfde7e0ce4b40b6436b43cf20c8e9e1a97243d4563d16\"},{\"command\":\"systemd-analyze\",\"executable\":\"/usr/bin/systemd-analyze\",\"sha256\":\"ade358aec5d0dd48fef6ff8ff8d810f35852a27fd213e237e6ea800eaeb8f4e9\"},{\"command\":\"systemd-ask-password\",\"executable\":\"/usr/bin/systemd-ask-password\",\"sha256\":\"b54b9d9ad705244781e3132e4b858a7f90e75afee9083b6eac764f8e3d1571ee\"},{\"command\":\"systemd-cat\",\"executable\":\"/usr/bin/systemd-cat\",\"sha256\":\"0547f98fb603909fb025220cd5ee310b2820658a15ddd8650c291eb941c7066f\"},{\"command\":\"systemd-cgls\",\"executable\":\"/usr/bin/systemd-cgls\",\"sha256\":\"31f203b067ccfc101f2ffa7a8cc2f47012b846e92f09a17e3781473853a4329a\"},{\"command\":\"systemd-cgtop\",\"executable\":\"/usr/bin/systemd-cgtop\",\"sha256\":\"2c2534b4ff4e512e87ea957a9b228d59108d0733fdb449d963a0611650a9aa05\"},{\"command\":\"systemd-confext\",\"executable\":\"/usr/bin/systemd-sysext\",\"sha256\":\"7787e8ee8a31ee1e0be8c3e6769195102de2c71818df95539f693b0c0c536065\"},{\"command\":\"systemd-creds\",\"executable\":\"/usr/bin/systemd-creds\",\"sha256\":\"05da3a8bdac15a0e2440694021ff644ec4b7cb3a9ab7b6a33f4bcaa0e04a23b7\"},{\"command\":\"systemd-cryptenroll\",\"executable\":\"/usr/bin/systemd-cryptenroll\",\"sha256\":\"49cf688a19410086b43b5c5642e7417c59a49348808b154211596aaf806e2a38\"},{\"command\":\"systemd-cryptsetup\",\"executable\":\"/usr/bin/systemd-cryptsetup\",\"sha256\":\"0668c33382c0c6e47eb9aeb1e692131b61c77f23f196ca1a6607403ab0cfe7e4\"},{\"command\":\"systemd-delta\",\"executable\":\"/usr/bin/systemd-delta\",\"sha256\":\"a8d7859033acc883ac163e9c2b0202df64e717f0d8a4feed66fd5d3000d57818\"},{\"command\":\"systemd-detect-virt\",\"executable\":\"/usr/bin/systemd-detect-virt\",\"sha256\":\"d7168d841bcfe28de8feeed6f09a7c1df37d98d7db3f87302428a983cccfc16f\"},{\"command\":\"systemd-escape\",\"executable\":\"/usr/bin/systemd-escape\",\"sha256\":\"9aa98887e683deedc877ca578450ae785bf4a80a6071d6238387f8d77126b4e1\"},{\"command\":\"systemd-firstboot\",\"executable\":\"/usr/bin/systemd-firstboot\",\"sha256\":\"270c4cad77fabe7d3402e27bf6363aa23634c32f5e0f89526943226b79b7265f\"},{\"command\":\"systemd-id128\",\"executable\":\"/usr/bin/systemd-id128\",\"sha256\":\"bac4557255fc4a98bcbe948290ee3adb2cee53f1b71db216bbcab8cbcbc9ad45\"},{\"command\":\"systemd-inhibit\",\"executable\":\"/usr/bin/systemd-inhibit\",\"sha256\":\"8c6bf9d71e0e3877d82297ef704765e8a6f188b56a1e5d5097defc316df7a9b2\"},{\"command\":\"systemd-machine-id-setup\",\"executable\":\"/usr/bin/systemd-machine-id-setup\",\"sha256\":\"2e474bbc30385ea51f576c43ebf699ef2f21d553598a28dbbabda55e285f82d5\"},{\"command\":\"systemd-mount\",\"executable\":\"/usr/bin/systemd-mount\",\"sha256\":\"acdfab06af7b288dc3ca0098d3a9b9b9bb1703be77db3f79e528baf5e281659b\"},{\"command\":\"systemd-notify\",\"executable\":\"/usr/bin/systemd-notify\",\"sha256\":\"8baeab8f50e4111e626827e651b40020b993d5bd8721a1014035a937e2c5ecf4\"},{\"command\":\"systemd-path\",\"executable\":\"/usr/bin/systemd-path\",\"sha256\":\"0f4c3a986630981b8ffe2613c5e9f29a76384d55093aa7db437a14fb2e35d720\"},{\"command\":\"systemd-repart\",\"executable\":\"/usr/bin/systemd-repart\",\"sha256\":\"548f294b41aff518f5de7c8887b79742e0be05ad16ecf72a7f9a4351f461f75d\"},{\"command\":\"systemd-run\",\"executable\":\"/usr/bin/systemd-run\",\"sha256\":\"02cdd2f7cd4a62523c54681e785aeb091106fa5df32d0a09a696dadaec700939\"},{\"command\":\"systemd-socket-activate\",\"executable\":\"/usr/bin/systemd-socket-activate\",\"sha256\":\"02724ccdfad3709f18894603f60b7a35e52f7fde26e564824b56f8c13c319d3e\"},{\"command\":\"systemd-stdio-bridge\",\"executable\":\"/usr/bin/systemd-stdio-bridge\",\"sha256\":\"210bfd9081cb65e91b4e586f7dfef832c7307ee000860528728be3531e536566\"},{\"command\":\"systemd-sysext\",\"executable\":\"/usr/bin/systemd-sysext\",\"sha256\":\"7787e8ee8a31ee1e0be8c3e6769195102de2c71818df95539f693b0c0c536065\"},{\"command\":\"systemd-sysusers\",\"executable\":\"/usr/bin/systemd-sysusers\",\"sha256\":\"13c5e0ed907c80fd61611774efb0628491fe406ae5e0beeb60af386efffa0ba1\"},{\"command\":\"systemd-tmpfiles\",\"executable\":\"/usr/bin/systemd-tmpfiles\",\"sha256\":\"f1f9ad14b6ff16ea6d9093550cf885d664c4ee4187a1b771396bdfadbbae8837\"},{\"command\":\"systemd-tty-ask-password-agent\",\"executable\":\"/usr/bin/systemd-tty-ask-password-agent\",\"sha256\":\"5e02bf85a6d73b32d1a1a9bbc5bfff660c50ba52e84fcb29f5836ecdb55e3578\"},{\"command\":\"systemd-umount\",\"executable\":\"/usr/bin/systemd-mount\",\"sha256\":\"acdfab06af7b288dc3ca0098d3a9b9b9bb1703be77db3f79e528baf5e281659b\"},{\"command\":\"tabs\",\"executable\":\"/usr/bin/tabs\",\"sha256\":\"c75a273d7427a12ef86b5091936397f354b39930955c5fcbcf65d0e855011f20\"},{\"command\":\"tac\",\"executable\":\"/usr/bin/tac\",\"sha256\":\"74a16f6addd590730f201d1555271799b02140f0097c30876a130a4bfea5318a\"},{\"command\":\"tail\",\"executable\":\"/usr/bin/tail\",\"sha256\":\"bda3fdb8d345067d09204aa35301fd6b5d4f4de3b3b7f15e0dcdb92e9451992f\"},{\"command\":\"tar\",\"executable\":\"/usr/bin/tar\",\"sha256\":\"867ff0dfd2d702cfebcff6a64eee5835c928fe359b9deced92e442211362d16d\"},{\"command\":\"taskset\",\"executable\":\"/usr/bin/taskset\",\"sha256\":\"ddd2f16366b29b9887de9185059ceb085fa3fd3952a685047255bca02d6b5c25\"},{\"command\":\"tee\",\"executable\":\"/usr/bin/tee\",\"sha256\":\"5b6aa05ad8c4294197cdf38cc5b18693b387be9ab4838f8cba71bf0f78544d94\"},{\"command\":\"tempfile\",\"executable\":\"/usr/bin/tempfile\",\"sha256\":\"dad4dd9872307c09aeee6cc003815d7c58fd60364a5616b289e8526efdc1cbf6\"},{\"command\":\"test\",\"executable\":\"/usr/bin/test\",\"sha256\":\"38ea770724b003a328beee7a859c8755c46a40a0342ea7dd55c3b51591f66037\"},{\"command\":\"tic\",\"executable\":\"/usr/bin/tic\",\"sha256\":\"71234d7ee819f7391990856281f772d578b19ae3b4e7f4626976c926310c2aae\"},{\"command\":\"timedatectl\",\"executable\":\"/usr/bin/timedatectl\",\"sha256\":\"14797b3d88d212c44005eb519efb27566e4bc062bd74061321c188542f34ca65\"},{\"command\":\"timeout\",\"executable\":\"/usr/bin/timeout\",\"sha256\":\"2db30bc57746c940a0643581cd5e2671e505442bea16164143f0ea8ff4e36453\"},{\"command\":\"tload\",\"executable\":\"/usr/bin/tload\",\"sha256\":\"5cfd3cb2a129708b64a60d0a871ca9c30efe615e47843f4a7730ad7a948e31f1\"},{\"command\":\"toe\",\"executable\":\"/usr/bin/toe\",\"sha256\":\"439615b7112a79c06164072ac79e463eed4fce73d650519290703b0215048358\"},{\"command\":\"top\",\"executable\":\"/usr/bin/top\",\"sha256\":\"c87663a75421984791e955deb071cd233930a69dc5f2acbf89f71ed196c3f264\"},{\"command\":\"touch\",\"executable\":\"/usr/bin/touch\",\"sha256\":\"6d99d27b87a756a755a0904238579ccc2d88ab35e529935bbf67ecc2696abb27\"},{\"command\":\"tput\",\"executable\":\"/usr/bin/tput\",\"sha256\":\"778f6fcb587cd99c0c01f59acfea145b10e81dae8c8ed87e6e4b8b7494457a6d\"},{\"command\":\"tr\",\"executable\":\"/usr/bin/tr\",\"sha256\":\"98805355098cc9a3c6efb8c766d8ccbb01226070bdd13f386655d2713d9b1f6c\"},{\"command\":\"true\",\"executable\":\"/usr/bin/true\",\"sha256\":\"69851c424c4519cd11af710b69d52ddf44b929b74470a02e62e0aab227c07543\"},{\"command\":\"truncate\",\"executable\":\"/usr/bin/truncate\",\"sha256\":\"ee92d80b9ad881ed98a0a8437f9e2afa699e474f0e294abd9d945e486f5a1d49\"},{\"command\":\"tset\",\"executable\":\"/usr/bin/tset\",\"sha256\":\"65369c25251289d5009f7f5481383c021f358a6c565f7d4310f5ebc115362dc8\"},{\"command\":\"tsort\",\"executable\":\"/usr/bin/tsort\",\"sha256\":\"f747c130b5cf778c2a4c3d775b91e40524b75f42d2e033ed6ba67413cc2f2d74\"},{\"command\":\"tty\",\"executable\":\"/usr/bin/tty\",\"sha256\":\"1e0147333087a4b2c480ceef5d14292bb4bdb7059f9520d3fc618993e266d4f9\"},{\"command\":\"tzselect\",\"executable\":\"/usr/bin/tzselect\",\"sha256\":\"cd14fec50b626461cc68ccc830c269a839cae3bd56bb19b1caab34e16d531768\"},{\"command\":\"uclampset\",\"executable\":\"/usr/bin/uclampset\",\"sha256\":\"b41d1841ffed1e12806c182e20be475fe41a26f1b5fba4f1b059eb30c264a604\"},{\"command\":\"ucs2any\",\"executable\":\"/usr/bin/ucs2any\",\"sha256\":\"66ad342ea0a7e397c48a716a74e62d91f2894f151ee94018141285a8d130c956\"},{\"command\":\"umount\",\"executable\":\"/usr/bin/umount\",\"sha256\":\"75d109a00d6489feae6eb9fd0e99511d82e6f6cb0d933e02cfd48afd525c27f5\"},{\"command\":\"uname\",\"executable\":\"/usr/bin/uname\",\"sha256\":\"37b5a64a72058548742fca7fa0c11e30c88b9042a533ab0c8433409ddc61f4f9\"},{\"command\":\"uncompress\",\"executable\":\"/usr/bin/uncompress\",\"sha256\":\"55c2f67ca4c3cca0ebac659f0075461dd671ec4937ecd6c71123bb49ed322ebd\"},{\"command\":\"unexpand\",\"executable\":\"/usr/bin/unexpand\",\"sha256\":\"ae07391d1d9c82b1ec8b7bd8ac3a912172dba998275641b7fb68354a0d4afd6f\"},{\"command\":\"uniq\",\"executable\":\"/usr/bin/uniq\",\"sha256\":\"0f883fac36de9b1b40debd103e98613bb308c1b914586fadab3c2ecec0f67bbc\"},{\"command\":\"unlink\",\"executable\":\"/usr/bin/unlink\",\"sha256\":\"6748cc16c407bc2a555ca9471fb9bda981841724718637fe8cb79f8d10223dd4\"},{\"command\":\"unlzma\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"296a7eaf0ac8cc4f37bd29f8fded9c768ed60fc646f64333e83e4f3a9148451d\"},{\"command\":\"unminimize\",\"executable\":\"/usr/bin/unminimize\",\"sha256\":\"36a235214133e557df60d3a417df146fe113cf54b36c8757c4f15d6378cdc5dc\"},{\"command\":\"unshare\",\"executable\":\"/usr/bin/unshare\",\"sha256\":\"d6380bede9030d3c776ce658b40373c7edf36717ea37e4f2b4c32a8e814c6816\"},{\"command\":\"unxz\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"296a7eaf0ac8cc4f37bd29f8fded9c768ed60fc646f64333e83e4f3a9148451d\"},{\"command\":\"update-alternatives\",\"executable\":\"/usr/bin/update-alternatives\",\"sha256\":\"f3fc8c13fa8fbe37f95723f98b13201db90a9e75fc35928472cf8b827bbc62c5\"},{\"command\":\"update-mime-database\",\"executable\":\"/usr/bin/update-mime-database\",\"sha256\":\"0412fee8d633b97a0c6cee8008f70eadc31a0f574b365431494ea68921f08956\"},{\"command\":\"uptime\",\"executable\":\"/usr/bin/uptime\",\"sha256\":\"42164f8374ef9688afa1d3a261de1c89a7f6541ea494f49d0328f69cc00d0f43\"},{\"command\":\"users\",\"executable\":\"/usr/bin/users\",\"sha256\":\"d56b17a97be7cd69ecf2b85a18291ff73c5c978bd7d476e9cac572e9846dfba5\"},{\"command\":\"utmpdump\",\"executable\":\"/usr/bin/utmpdump\",\"sha256\":\"93364b0d8695d2ae4831ed0176a8e38001da60e720e45c4029b2d951104fae50\"},{\"command\":\"varlinkctl\",\"executable\":\"/usr/bin/varlinkctl\",\"sha256\":\"1b9cc8bafbc95815c1a0144aa0abd83c5c68513f653eb9066f70294f6c82b662\"},{\"command\":\"vdir\",\"executable\":\"/usr/bin/vdir\",\"sha256\":\"f605bd2d1368664330bf517957e85654e61abb3c8b7125b06e637f0c06589f28\"},{\"command\":\"vmstat\",\"executable\":\"/usr/bin/vmstat\",\"sha256\":\"73924192f6f599514e4fcf3c43456a5d1b921db57f3a25e36cfd2311090e872a\"},{\"command\":\"w\",\"executable\":\"/usr/bin/w\",\"sha256\":\"f83cfbccfb00e658088397fc002158b3fe21c643c22751f9cb9ca01baf3447b5\"},{\"command\":\"wall\",\"executable\":\"/usr/bin/wall\",\"sha256\":\"d02989894186fbfa7aa04a5484ed85f54819c9f35cb7f1242c30ccf9ad76577b\"},{\"command\":\"wasm-bindgen\",\"executable\":\"/usr/local/cargo/bin/wasm-bindgen\",\"sha256\":\"2551c3211e22dbd6002555c9aad77197a3e61d6669b6c7c3061a53e8667af9d3\"},{\"command\":\"wasm-bindgen-test-runner\",\"executable\":\"/usr/local/cargo/bin/wasm-bindgen-test-runner\",\"sha256\":\"4817b134f2e39f5322af339f2c43327f48ab1e582363e6c233546938cd179e37\"},{\"command\":\"wasm-tools\",\"executable\":\"/usr/local/cargo/bin/wasm-tools\",\"sha256\":\"62033463f5fdc2f257ee3de7f6f3212870e3dc84aa3c29aa96d282e1264f1520\"},{\"command\":\"wasm2es6js\",\"executable\":\"/usr/local/cargo/bin/wasm2es6js\",\"sha256\":\"6bebe96e10f7974228187c38d6ff22bccdb7953a39918daa4d03e245584a0d5a\"},{\"command\":\"wasmtime\",\"executable\":\"/usr/local/cargo/bin/wasmtime\",\"sha256\":\"d6f187e0d549c3f7df37df572d26177d8cc43adeaf4af490c7f18b4a68ab7492\"},{\"command\":\"watch\",\"executable\":\"/usr/bin/watch\",\"sha256\":\"d498378ce59aed8f1c9713ccd7dd378d06532d5f37905ecabf2fbcc9bc5172a6\"},{\"command\":\"wc\",\"executable\":\"/usr/bin/wc\",\"sha256\":\"4bab599a0dbd6d87e5bcedaa021b727d9306777741850fdb5a4b8a1804e486fe\"},{\"command\":\"wdctl\",\"executable\":\"/usr/bin/wdctl\",\"sha256\":\"4e8269475d2c83823b2ddb7365a626c99488fb57b56da10bbe24f841366e92e6\"},{\"command\":\"wget\",\"executable\":\"/usr/bin/wget\",\"sha256\":\"d32eaf3aaa9580ce87aec57aa53740fd44dc8c9a5b33e44e1c36551ed9033374\"},{\"command\":\"whereis\",\"executable\":\"/usr/bin/whereis\",\"sha256\":\"1d9b24e89d52c024ca7d17649679856805f846cc78f877c6c45fd702837b88ca\"},{\"command\":\"which\",\"executable\":\"/usr/bin/which.debianutils\",\"sha256\":\"59e7cf8b9bd8711ae1aa6f7bbbd4132b61492409c3afe8e1505225efda1cb8f6\"},{\"command\":\"which.debianutils\",\"executable\":\"/usr/bin/which.debianutils\",\"sha256\":\"59e7cf8b9bd8711ae1aa6f7bbbd4132b61492409c3afe8e1505225efda1cb8f6\"},{\"command\":\"who\",\"executable\":\"/usr/bin/who\",\"sha256\":\"aee0f4429b0452e41b1831a3805dd44c8dbdba95b63da75314f52b77d63ff89b\"},{\"command\":\"whoami\",\"executable\":\"/usr/bin/whoami\",\"sha256\":\"bd9f4553e4407f93c53af8e7b0db39b89df0b89ddde83b4d9cb445a64112e56d\"},{\"command\":\"xargs\",\"executable\":\"/usr/bin/xargs\",\"sha256\":\"e4d376e8f56a26f8e968566585c6cdbf593e5c77d271b5a16d85d449e57d5993\"},{\"command\":\"xauth\",\"executable\":\"/usr/bin/xauth\",\"sha256\":\"66924d27d60e30aacba01ddcbe2fc1accb1a1a79d9a954078aaa24d891800e8d\"},{\"command\":\"xkbbell\",\"executable\":\"/usr/bin/xkbbell\",\"sha256\":\"97fdec2d7d8773eb1f7f7a800aaecbe5a868d656485ba0b7c350cb7f9b54c654\"},{\"command\":\"xkbcomp\",\"executable\":\"/usr/bin/xkbcomp\",\"sha256\":\"7c666b5dd7321507deae224a381078a7ea264fd98df9258ffca39571c93f207e\"},{\"command\":\"xkbevd\",\"executable\":\"/usr/bin/xkbevd\",\"sha256\":\"8a004003748fd4db8af526bb1eec9d42011f428988e61ad1db13d317434e630d\"},{\"command\":\"xkbprint\",\"executable\":\"/usr/bin/xkbprint\",\"sha256\":\"1298db0547971f49dbbf147f663603cb969e21c1d0f17bc7123eb760bf03f1cf\"},{\"command\":\"xkbvleds\",\"executable\":\"/usr/bin/xkbvleds\",\"sha256\":\"61285505de8551325107ec2cf710b3428081b8546a1cf87fa727fdae7a2d0dcb\"},{\"command\":\"xkbwatch\",\"executable\":\"/usr/bin/xkbwatch\",\"sha256\":\"17e1e03014ddc58af7b6de1f98b6b3f8888dffce48c0f8be28e508392257acbd\"},{\"command\":\"xsubpp\",\"executable\":\"/usr/bin/xsubpp\",\"sha256\":\"c8c0f265dd2f3f247f179a5464bddfe6391b9e06996e961fa15c51c2e26e39a3\"},{\"command\":\"xvfb-run\",\"executable\":\"/usr/bin/xvfb-run\",\"sha256\":\"48ee444c30fdaaede4cc311644b30e554162e956f949b206858e37eb8ba1ae05\"},{\"command\":\"xz\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"296a7eaf0ac8cc4f37bd29f8fded9c768ed60fc646f64333e83e4f3a9148451d\"},{\"command\":\"xzcat\",\"executable\":\"/usr/bin/xz\",\"sha256\":\"296a7eaf0ac8cc4f37bd29f8fded9c768ed60fc646f64333e83e4f3a9148451d\"},{\"command\":\"xzcmp\",\"executable\":\"/usr/bin/xzdiff\",\"sha256\":\"551e26acd2c7d3f56ab6f43916cfcaafb96955eda66b656f1ed9a708f52e7667\"},{\"command\":\"xzdiff\",\"executable\":\"/usr/bin/xzdiff\",\"sha256\":\"551e26acd2c7d3f56ab6f43916cfcaafb96955eda66b656f1ed9a708f52e7667\"},{\"command\":\"xzegrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"xzfgrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"xzgrep\",\"executable\":\"/usr/bin/xzgrep\",\"sha256\":\"e83ca59b0c0e5eb2170abc6d89a34980fd04891399a65ceea18d810301a275e3\"},{\"command\":\"xzless\",\"executable\":\"/usr/bin/xzless\",\"sha256\":\"a25b3dee9826b993f4fe0043e6d3073c6658925c28afc303917d62b1cf465051\"},{\"command\":\"xzmore\",\"executable\":\"/usr/bin/xzmore\",\"sha256\":\"e40b6cfbd6dcfd6fa46b721f7afb36efbbf3a8fbea1cd20f64b6123400f39306\"},{\"command\":\"yarn\",\"executable\":\"/usr/lib/node_modules/yarn/bin/yarn.js\",\"sha256\":\"148e19db309ec9eaf7720b28df811337906eea8a1758deaa54afee60a6305e04\"},{\"command\":\"yarnpkg\",\"executable\":\"/usr/lib/node_modules/yarn/bin/yarn.js\",\"sha256\":\"148e19db309ec9eaf7720b28df811337906eea8a1758deaa54afee60a6305e04\"},{\"command\":\"yes\",\"executable\":\"/usr/bin/yes\",\"sha256\":\"ab478e91bc00ad1dd5dac40a6d2110f148f777d2f8cdacd216392ffc54413f63\"},{\"command\":\"ypdomainname\",\"executable\":\"/usr/bin/hostname\",\"sha256\":\"529801b643662701c07a120d133850a3a1d407fd0edd8390b3f2db759715eb8f\"},{\"command\":\"zcat\",\"executable\":\"/usr/bin/zcat\",\"sha256\":\"f0b4d86b6a10064b7f2f41a452ab5437f61d4f17d8b1ab3488f3f345519f4f8d\"},{\"command\":\"zcmp\",\"executable\":\"/usr/bin/zcmp\",\"sha256\":\"6e6da15f127e06d61cbdabb59d3ec9b28b8605178dbe2acf7d275aa6d22e2d0f\"},{\"command\":\"zdiff\",\"executable\":\"/usr/bin/zdiff\",\"sha256\":\"1bcb10de5c01db497f845980ee4e79ec32f025443588a7410ba5001512a61ec9\"},{\"command\":\"zdump\",\"executable\":\"/usr/bin/zdump\",\"sha256\":\"8cdbc0face3816488f998b1a1e82b51000ecadfc2e305fd7d4ec29950386bba2\"},{\"command\":\"zegrep\",\"executable\":\"/usr/bin/zegrep\",\"sha256\":\"67ee7fadec7ea53b4c1f8cfc3c81427b29c0b1381e80b55642617620c84d0bcc\"},{\"command\":\"zfgrep\",\"executable\":\"/usr/bin/zfgrep\",\"sha256\":\"87ab5f4c7cb344e409d614d1a69cc156b3b1053d6ae0b59d8e2c2131f3e63e5a\"},{\"command\":\"zforce\",\"executable\":\"/usr/bin/zforce\",\"sha256\":\"61b3a0106c72648199611b79caf2e7a8c0800a8ef5745193cc0fa16455a79901\"},{\"command\":\"zgrep\",\"executable\":\"/usr/bin/zgrep\",\"sha256\":\"2f506d3547724df8e8dc9bdfa73bccb1a641b530fd5a40adc9b537f851d86b7f\"},{\"command\":\"zipdetails\",\"executable\":\"/usr/bin/zipdetails\",\"sha256\":\"58439587867aabee0504e493722c74e0725f649f4050848c91c59d48e90cd34f\"},{\"command\":\"zless\",\"executable\":\"/usr/bin/zless\",\"sha256\":\"e29f317fc56ce49eb5bd1e938b7f87923b91b40e5516ec9146f678519330f6bb\"},{\"command\":\"zmore\",\"executable\":\"/usr/bin/zmore\",\"sha256\":\"bb9ee270bee119238c74779fb5fa5cddc7939ec4923a22c5649bcb9aa7d70b76\"},{\"command\":\"znew\",\"executable\":\"/usr/bin/znew\",\"sha256\":\"969931d9eadae06db92a01b00458aa43d86bdf3692020d6f10b0fb8d060e1f38\"}],\"schema\":\"prismpm/sdk-inventory/1\"}\n","manifest_digest":"sha256:b08c38d43b7045b3af347f4a21c5ce27fc0eda7cef2beae11e4a40f6cfe59c37","platform":"linux/arm64"}],"schema":"prismpm/sdk-lock/2","sdk_image":"ghcr.io/uor-foundation/prismpm-sdk-candidate@sha256:cd3b47d7a370c4a26b8285f5e9c3bb15e639973c55505c3809ddbe55352fea58","sdk_index":"{\"schemaVersion\":2,\"mediaType\":\"application/vnd.oci.image.index.v1+json\",\"manifests\":[{\"mediaType\":\"application/vnd.oci.image.manifest.v1+json\",\"digest\":\"sha256:fc87624954a1985f2a6594946aa22ca16efc4095fe8d6d9b18f21c69e937f7dc\",\"size\":6177,\"platform\":{\"architecture\":\"amd64\",\"os\":\"linux\"}},{\"mediaType\":\"application/vnd.oci.image.manifest.v1+json\",\"digest\":\"sha256:b08c38d43b7045b3af347f4a21c5ce27fc0eda7cef2beae11e4a40f6cfe59c37\",\"size\":6177,\"platform\":{\"architecture\":\"arm64\",\"os\":\"linux\"}}]}","sdk_version":"0.3.0","standards_lock":"sha256:54448d21cb1ed3a4af826aa44991e9839b51d97b8975a5b125927c78af922b46"} \ No newline at end of file diff --git a/product/PRISMPM-LICENSE-MIT.txt b/product/PRISMPM-LICENSE-MIT.txt new file mode 100644 index 0000000..3bd0b7d --- /dev/null +++ b/product/PRISMPM-LICENSE-MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Alex Flom + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/product/THIRD_PARTY_NOTICES.md b/product/THIRD_PARTY_NOTICES.md new file mode 100644 index 0000000..14bf423 --- /dev/null +++ b/product/THIRD_PARTY_NOTICES.md @@ -0,0 +1,16 @@ +# Third-party source notice + +`app/src/Foundation/Arch.lex.tex` adapts the architecture data types from +UOR Foundation's PrismPM `stdlib/src/Foundation/Arch.lex.tex`, commit +`fe5b8b73a94134c316329a8d1b09ebc97b555c5f`. + +The original project offers MIT OR Apache-2.0. The copied subset is used under +MIT, whose original notice is retained in `PRISMPM-LICENSE-MIT.txt` beside this +file. Changes: retained only the type declarations through `View`, omitted +upstream demonstration values and later types, and changed the document title +to an available local glossary phrase. The official qualified type ownership +and field shapes are unchanged. + +This notice does not establish the provenance or redistribution terms of the +existing v86, BIOS or Linux image files. Those remain separately unresolved in +the product model and generated contract register. diff --git a/product/UORUST-LICENSE-MIT.txt b/product/UORUST-LICENSE-MIT.txt new file mode 100644 index 0000000..8f12286 --- /dev/null +++ b/product/UORUST-LICENSE-MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 The UOR Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/product/contracts.json b/product/contracts.json new file mode 100644 index 0000000..e596ad4 --- /dev/null +++ b/product/contracts.json @@ -0,0 +1,3209 @@ +{ + "format": "Stitch project-owned product contract register", + "version": 1, + "assurance": "Source contracts and local byte inventory, not a Prism receipt or whole-browser proof", + "reference": { + "repository": "https://github.com/UOR-Foundation/PrismPM", + "revision": "fe5b8b73a94134c316329a8d1b09ebc97b555c5f", + "specSections": [ + "2", + "11" + ], + "scope": "Product-contract convention reference; expanded types have separate exact provenance", + "facetTypeProvenance": "product/facet-type-provenance.json", + "foundationArch": "Type-only declarations and pinned UORust design-view extensions; source identities and derivation scope are recorded in facet-type-provenance.json; no proof admission implied", + "sdk": "Existing prismpm.lock; no dependency or profile upgrade" + }, + "releaseBlockers": [], + "components": [ + { + "declaration": "componentAdmission", + "type": "Component", + "id": "admission", + "role": "Four-dimensional reservation ledger", + "implementation": [ + "src/layer2-schedulers/policy.js" + ], + "models": [ + "Stitch.Budget" + ], + "trustBoundary": false + }, + { + "declaration": "componentBrowser", + "type": "Component", + "id": "browser", + "role": "Interactive five-layer Stitch product", + "implementation": [ + "site/catalog.js", + "site/site.css", + "site/explorer.js", + "site/stitch-fabric.svg", + "site/facets.json", + "index.html", + "src/product-experience.js", + "src/recovery-ui.js", + "src/authority-ui.js" + ], + "models": [ + "Product.Experience", + "Stitch.Recovery", + "Product.Host", + "Product.Model" + ], + "trustBoundary": true + }, + { + "declaration": "componentCompute", + "type": "Component", + "id": "compute", + "role": "Deterministic program and checkpoint replay", + "implementation": [ + "src/layer4-compute/index.js", + "src/layer4-compute/replay.js" + ], + "models": [ + "Stitch.Compute" + ], + "trustBoundary": false + }, + { + "declaration": "componentCryptography", + "type": "Component", + "id": "cryptography", + "role": "Browser WebCrypto SHA-256 and Ed25519", + "implementation": [], + "models": [ + "Stitch.Identity", + "Stitch.Pointer" + ], + "trustBoundary": true + }, + { + "declaration": "componentDiscovery", + "type": "Component", + "id": "discovery", + "role": "DNS-over-HTTPS resolver and scoped DNS writer", + "implementation": [ + "src/layer5-transport/index.js", + "src/layer5-transport/dns-wire.js" + ], + "models": [ + "Stitch.Pointer", + "Stitch.Observation" + ], + "trustBoundary": true + }, + { + "declaration": "componentIdentity", + "type": "Component", + "id": "identity", + "role": "Canonical bytes, full commitments, raw encoding and fragments", + "implementation": [ + "src/layer1-uor/contracts.js", + "src/layer1-uor/custody.js", + "src/layer1-uor/generated-model.js" + ], + "models": [ + "Stitch.Identity", + "Stitch.Encoding", + "Stitch.Fragments" + ], + "trustBoundary": false + }, + { + "declaration": "componentLegacy", + "type": "Component", + "id": "legacy", + "role": "Historical UOR and simulation conformance", + "implementation": [ + "src/layer1-uor/index.js", + "src/layer3-storage/index.js", + "src/lib.rs" + ], + "models": [], + "trustBoundary": false + }, + { + "declaration": "componentNativeRouting", + "type": "Component", + "id": "nativeRouting", + "role": "External Linux routing daemon; absent from browser", + "implementation": [], + "models": [], + "trustBoundary": true + }, + { + "declaration": "componentPeers", + "type": "Component", + "id": "peers", + "role": "Untrusted remote holders and compute peers", + "implementation": [], + "models": [ + "Stitch.Custody", + "Stitch.Observation" + ], + "trustBoundary": true + }, + { + "declaration": "componentPointerAuthority", + "type": "Component", + "id": "pointerAuthority", + "role": "Independently pinned single-writer key", + "implementation": [ + "src/layer1-uor/pointer.js", + "src/layer1-uor/browser-authority.js" + ], + "models": [ + "Stitch.Authority", + "Stitch.Pointer", + "Stitch.Effects", + "Product.Host", + "Product.Experience" + ], + "trustBoundary": true + }, + { + "declaration": "componentPrismId", + "type": "Component", + "id": "prismId", + "role": "Login-free prism identity: devices linked out of band, private boundary, substrate sync", + "implementation": [ + "src/prism-id.js", + "src/layer1-uor/generated-model.js" + ], + "models": [ + "Stitch.PrismId" + ], + "trustBoundary": true + }, + { + "declaration": "componentPublicRelay", + "type": "Component", + "id": "publicRelay", + "role": "Optional public ntfy warm cache", + "implementation": [ + "src/layer5-transport/relay-framing.js" + ], + "models": [ + "Stitch.Relay", + "Stitch.Evidence" + ], + "trustBoundary": true + }, + { + "declaration": "componentRuntimeHost", + "type": "Component", + "id": "runtimeHost", + "role": "Browser, OS, clocks, RAM, networking and permissions", + "implementation": [], + "models": [ + "Product.Host" + ], + "trustBoundary": true + }, + { + "declaration": "componentScheduler", + "type": "Component", + "id": "scheduler", + "role": "Experimental proposals under enforced admission", + "implementation": [ + "src/layer2-schedulers/index.js" + ], + "models": [ + "Stitch.Budget", + "Stitch.Observation" + ], + "trustBoundary": false + }, + { + "declaration": "componentSignaling", + "type": "Component", + "id": "signaling", + "role": "Public ntfy SDP/ICE signaling; BroadcastChannel on same origin", + "implementation": [ + "src/layer5-transport/signaling.js", + "src/layer5-transport/relay-framing.js" + ], + "models": [ + "Stitch.Signaling", + "Stitch.Relay", + "Stitch.Effects", + "Product.Host" + ], + "trustBoundary": true + }, + { + "declaration": "componentStaticHost", + "type": "Component", + "id": "staticHost", + "role": "Same-origin publication of application and VM assets", + "implementation": [], + "models": [], + "trustBoundary": true + }, + { + "declaration": "componentStorage", + "type": "Component", + "id": "storage", + "role": "Ephemeral local cache and conditional peer custody", + "implementation": [ + "src/layer3-storage/custody.js", + "src/layer3-storage/index.js", + "src/recovery.js" + ], + "models": [ + "Stitch.Custody", + "Stitch.System", + "Stitch.Recovery" + ], + "trustBoundary": false + }, + { + "declaration": "componentTransport", + "type": "Component", + "id": "transport", + "role": "WebRTC channels, bounded messages and VM Ethernet bridge", + "implementation": [ + "src/layer5-transport/index.js", + "src/layer5-transport/channel-flow.js" + ], + "models": [ + "Stitch.Observation", + "Stitch.ChannelFlow", + "Product.Host" + ], + "trustBoundary": true + }, + { + "declaration": "componentVm", + "type": "Component", + "id": "vm", + "role": "v86 x86 Linux guest and 9p filesystem bridge", + "implementation": [ + "src/layer4-compute/index.js", + "src/layer4-compute/vm-administration.js", + "v86/libv86.js", + "v86/v86.wasm", + "v86/seabios.bin", + "v86/vgabios.bin", + "images/buildroot-bzimage.bin" + ], + "models": [ + "Product.Host", + "Stitch.VmAdministration" + ], + "trustBoundary": true + } + ], + "assumptions": [ + { + "declaration": "assumptionArtifactConformance", + "type": "Assumption", + "id": "artifactConformance", + "statement": "Released runtime and model match their exact reviewed source and dependency bytes.", + "evidence": "Exact local artifact hashes plus pinned-SDK source and build acceptance.", + "scope": "Full product; runtime source hashing alone does not prove behavior." + }, + { + "declaration": "assumptionBrowserSemantics", + "type": "Assumption", + "id": "browserSemantics", + "statement": "The browser correctly implements DOM, typed arrays, WebAssembly, WebCrypto, WebRTC and fetch; optional saved authority and DNS publication additionally require correct IndexedDB CryptoKey structured cloning, transaction commit and Web Locks context-lifetime exclusion.", + "evidence": "Browser vendor assurance and independent integration testing, not a Stitch kernel theorem.", + "scope": "Host API behavior." + }, + { + "declaration": "assumptionCryptographicSecurity", + "type": "Assumption", + "id": "cryptographicSecurity", + "statement": "SHA-256 collision resistance and Ed25519 unforgeability hold for the selected implementations.", + "evidence": "Cryptographic assumptions and implementation review.", + "scope": "Commitments and pointer signatures only." + }, + { + "declaration": "assumptionDisclosureConsent", + "type": "Assumption", + "id": "disclosureConsent", + "statement": "External publication is authorized for the exact destination and content. Public relay and signaling are not private.", + "evidence": "Explicit user choice and configured destination.", + "scope": "Signaling, DNS writes and optional public payload relay." + }, + { + "declaration": "assumptionFailureDomains", + "type": "Assumption", + "id": "failureDomains", + "statement": "Different holder identifiers are independently failing machines only if separate evidence establishes that fact.", + "evidence": "Physical deployment and correlated-failure measurement.", + "scope": "Availability and durability claims." + }, + { + "declaration": "assumptionNetworkAvailability", + "type": "Assumption", + "id": "networkAvailability", + "statement": "DoH, DNS provider, STUN, signaling and optional relay are reachable and honor their APIs and policies.", + "evidence": "Live provider checks and physical multi-network trials.", + "scope": "No finite field observation establishes indefinite service." + }, + { + "declaration": "assumptionObserverAnchor", + "type": "Assumption", + "id": "observerAnchor", + "statement": "The pointer writer key and recent retained head are obtained independently and protected from rollback.", + "evidence": "Independently pinned key and retained observer head, or separately accepted exact recent digest explicitly restored into that same live scope. Both heads and anchor trust remain session-only.", + "scope": "Single-writer authority and freshness." + }, + { + "declaration": "assumptionPeerAssertion", + "type": "Assumption", + "id": "peerAssertion", + "statement": "A local checked acknowledgment is an assertion by the named holder, not authenticated durable custody.", + "evidence": "Receipt authentication, retained bytes and reachability require external evidence.", + "scope": "Conditional placement and lease observations." + }, + { + "declaration": "assumptionSerializedJournal", + "type": "Assumption", + "id": "serializedJournal", + "statement": "Host transitions are serialized and their budgets, action IDs, trusted head and journal are retained for the required lifetime.", + "evidence": "Application adapter review and crash/concurrency tests.", + "scope": "Pure state transitions do not provide durable atomic storage." + }, + { + "declaration": "assumptionTimeSources", + "type": "Assumption", + "id": "timeSources", + "statement": "Monotonic elapsed time does not regress; pointer wall-clock error is within a separately accepted bound.", + "evidence": "Clock integration tests and independent clock policy.", + "scope": "Freshness, budgets and leases; no global time oracle." + }, + { + "declaration": "assumptionVmIsolation", + "type": "Assumption", + "id": "vmIsolation", + "statement": "v86, BIOS, guest image and 9p/Ethernet bridge obey their reviewed isolation and resource contracts.", + "evidence": "Exact binary inventory, upstream provenance, security review and VM integration tests.", + "scope": "Arbitrary guest effects are not ring-program semantics." + } + ], + "capabilities": [ + { + "declaration": "capabilityDom", + "type": "CapabilityContract", + "id": "dom", + "owner": "browser", + "capability": "Dom", + "operation": "Render and collect explicit UI actions", + "source": "index.html", + "inputs": [ + "local UI state" + ], + "outputs": [ + "rendered DOM", + "user action" + ], + "preconditions": [ + "browser API available" + ], + "failures": [ + "unsupported browser", + "handler failure" + ], + "assumptions": [ + "browserSemantics" + ], + "proofScope": "Presentation only; no storage or network evidence.", + "enabledByDefault": true + }, + { + "declaration": "capabilityCrypto", + "type": "CapabilityContract", + "id": "crypto", + "owner": "cryptography", + "capability": "Cryptography", + "operation": "Hash commitments and verify pointer signatures", + "source": "src/layer1-uor/custody.js", + "inputs": [ + "canonical bytes", + "domain", + "pinned writer key" + ], + "outputs": [ + "full digest", + "signature-valid observation" + ], + "preconditions": [ + "exact canonicalization", + "supported algorithm" + ], + "failures": [ + "digest mismatch", + "invalid signature", + "crypto unavailable" + ], + "assumptions": [ + "browserSemantics", + "cryptographicSecurity", + "observerAnchor" + ], + "proofScope": "Integrity/signature observations; no authority bootstrap or retention.", + "enabledByDefault": true + }, + { + "declaration": "capabilityMonotonicClock", + "type": "CapabilityContract", + "id": "monotonicClock", + "owner": "runtimeHost", + "capability": "MonotonicClock", + "operation": "Observe elapsed time for admission", + "source": "src/layer2-schedulers/policy.js", + "inputs": [ + "epoch and retained last time" + ], + "outputs": [ + "nondecreasing elapsed observation" + ], + "preconditions": [ + "same clock origin and epoch" + ], + "failures": [ + "clock regression", + "epoch expired" + ], + "assumptions": [ + "timeSources", + "serializedJournal" + ], + "proofScope": "Elapsed admission only; not UTC, liveness or global order.", + "enabledByDefault": true + }, + { + "declaration": "capabilityWallClock", + "type": "CapabilityContract", + "id": "wallClock", + "owner": "runtimeHost", + "capability": "WallClock", + "operation": "Check pointer and lease validity intervals", + "source": "src/layer1-uor/pointer.js", + "inputs": [ + "not-before and expiry" + ], + "outputs": [ + "observer-local wall time" + ], + "preconditions": [ + "declared clock uncertainty accepted" + ], + "failures": [ + "outside validity interval", + "clock unavailable" + ], + "assumptions": [ + "timeSources" + ], + "proofScope": "No proof of clock accuracy or network propagation.", + "enabledByDefault": true + }, + { + "declaration": "capabilitySessionStorage", + "type": "CapabilityContract", + "id": "sessionStorage", + "owner": "storage", + "capability": "SessionStorage", + "operation": "Retain checked bytes and local state in RAM", + "source": "src/layer3-storage/index.js", + "inputs": [ + "verified manifest and fragment bytes" + ], + "outputs": [ + "session-local cached bytes" + ], + "preconditions": [ + "storage reservation", + "bounded input", + "integrity checks" + ], + "failures": [ + "capacity exhausted", + "tab lost", + "browser eviction" + ], + "assumptions": [ + "browserSemantics", + "serializedJournal" + ], + "proofScope": "RAM is ephemeral; no disk persistence or total-loss recovery.", + "enabledByDefault": true + }, + { + "declaration": "capabilityPeerChannel", + "type": "CapabilityContract", + "id": "peerChannel", + "owner": "transport", + "capability": "PeerChannel", + "operation": "Open channel and exchange bounded messages", + "source": "src/layer5-transport/index.js", + "inputs": [ + "peer observation", + "SDP and ICE", + "bounded payload" + ], + "outputs": [ + "DataChannel event", + "untrusted peer response" + ], + "preconditions": [ + "network reservation", + "payload limits", + "domain validation before acceptance" + ], + "failures": [ + "ICE failure", + "timeout", + "disconnect", + "malformed payload" + ], + "assumptions": [ + "browserSemantics", + "networkAvailability", + "peerAssertion" + ], + "proofScope": "Opened channel is not authenticated holder identity or durable placement.", + "enabledByDefault": false + }, + { + "declaration": "capabilityLocalBroadcast", + "type": "CapabilityContract", + "id": "localBroadcast", + "owner": "signaling", + "capability": "LocalBroadcast", + "operation": "Exchange same-origin tab signals", + "source": "src/layer5-transport/index.js", + "inputs": [ + "channel topic", + "signal envelope" + ], + "outputs": [ + "same-origin tab message" + ], + "preconditions": [ + "explicit mesh join" + ], + "failures": [ + "API unavailable", + "tab closes" + ], + "assumptions": [ + "browserSemantics" + ], + "proofScope": "Same-origin only; not remote peer discovery.", + "enabledByDefault": false + }, + { + "declaration": "capabilityPublicSignaling", + "type": "CapabilityContract", + "id": "publicSignaling", + "owner": "signaling", + "capability": "PublicSignaling", + "operation": "Publish and receive SDP/ICE through ntfy", + "source": "src/layer5-transport/index.js", + "inputs": [ + "channel topic", + "SDP and ICE candidates" + ], + "outputs": [ + "public signaling response" + ], + "preconditions": [ + "explicit mesh join", + "disclosure accepted", + "network reservation" + ], + "failures": [ + "provider unavailable", + "untrusted signal", + "topic collision" + ], + "assumptions": [ + "disclosureConsent", + "networkAvailability" + ], + "proofScope": "Ed25519 key-owned session signaling with replay rejection; public metadata disclosure. Keys are not trusted human identity or holder authorization; topics are not privacy.", + "enabledByDefault": false + }, + { + "declaration": "capabilityDnsRead", + "type": "CapabilityContract", + "id": "dnsRead", + "owner": "discovery", + "capability": "DnsRead", + "operation": "Read full pointers and SRV records through DoH", + "source": "src/layer5-transport/index.js", + "inputs": [ + "query name", + "record type" + ], + "outputs": [ + "bounded untrusted DNS answer" + ], + "preconditions": [ + "response-byte ceiling", + "network reservation", + "pointer authority and successor admission" + ], + "failures": [ + "HTTP error", + "invalid answer", + "stale or conflicting pointer" + ], + "assumptions": [ + "networkAvailability", + "observerAnchor", + "timeSources" + ], + "proofScope": "DoH observation cannot inspect all recursive caches or establish consensus.", + "enabledByDefault": false + }, + { + "declaration": "capabilityDnsWrite", + "type": "CapabilityContract", + "id": "dnsWrite", + "owner": "discovery", + "capability": "DnsWrite", + "operation": "Write full signed pointer as multipart Cloudflare TXT", + "source": "src/layer5-transport/index.js", + "inputs": [ + "zone and record reference", + "signed full pointer", + "scoped token reference" + ], + "outputs": [ + "provider response and record identifier" + ], + "preconditions": [ + "explicit publish action", + "exact destination authorized", + "authority key pinned", + "network reservation" + ], + "failures": [ + "provider rejected", + "unknown outcome", + "token missing", + "DuckDNS full-pointer serialization refused" + ], + "assumptions": [ + "disclosureConsent", + "networkAvailability", + "observerAnchor" + ], + "proofScope": "Provider acknowledgment is not global DNS propagation; secrets are not source data.", + "enabledByDefault": false + }, + { + "declaration": "capabilityPublicRelay", + "type": "CapabilityContract", + "id": "publicRelay", + "owner": "publicRelay", + "capability": "PublicRelay", + "operation": "Publish or retrieve explicitly public warm-cache payloads", + "source": "src/layer5-transport/index.js", + "inputs": [ + "bounded object fragments or checkpoint", + "topic" + ], + "outputs": [ + "public relay response" + ], + "preconditions": [ + "relay separately enabled", + "public disclosure accepted", + "network reservation", + "received domain admission" + ], + "failures": [ + "disabled", + "provider unavailable", + "expired payload", + "tampered payload" + ], + "assumptions": [ + "disclosureConsent", + "networkAvailability" + ], + "proofScope": "Sufficient fragments disclose the object; no encryption, confidentiality or indefinite retention.", + "enabledByDefault": false + }, + { + "declaration": "capabilityVm", + "type": "CapabilityContract", + "id": "vm", + "owner": "vm", + "capability": "VirtualMachine", + "operation": "Boot guest, mirror object files, run shell and bridge Ethernet", + "source": "src/layer4-compute/index.js", + "inputs": [ + "five local v86/BIOS/kernel assets", + "guest command or object bytes" + ], + "outputs": [ + "guest output bytes", + "Ethernet frames" + ], + "preconditions": [ + "explicit VM action", + "all assets available", + "runtime deadline configured before boot", + "guarded local 9p allocation installed before run" + ], + "failures": [ + "missing asset", + "boot failure", + "guest timeout or runtime expiry", + "filesystem or bounded-result limit", + "stop outcome unknown", + "bridge failure" + ], + "assumptions": [ + "browserSemantics", + "vmIsolation" + ], + "proofScope": "Source predicates govern local 9p allocation and bounded result reads. Runtime expiry and dispatched-command cancellation request whole-VM stop; prior effects remain unknown. Browser scheduling and host VM behavior are assumptions, not guest isolation or ring-work metering.", + "enabledByDefault": false + }, + { + "declaration": "capabilityArtifactFetch", + "type": "CapabilityContract", + "id": "artifactFetch", + "owner": "staticHost", + "capability": "ArtifactFetch", + "operation": "Serve and load exact local application assets", + "source": "index.html", + "inputs": [ + "relative same-origin path" + ], + "outputs": [ + "asset bytes" + ], + "preconditions": [ + "published asset inventory", + "trusted static origin" + ], + "failures": [ + "missing file", + "substituted bytes", + "HTTP failure" + ], + "assumptions": [ + "artifactConformance", + "browserSemantics" + ], + "proofScope": "Inventory hashes identify checked local files; current UI does not verify every fetched asset at load time.", + "enabledByDefault": true + }, + { + "declaration": "capabilityNativeRouting", + "type": "CapabilityContract", + "id": "nativeRouting", + "owner": "nativeRouting", + "capability": "NativeRouting", + "operation": "External BIRD/FRR or DN42 routing daemon", + "source": "CONTRACT.json", + "inputs": [], + "outputs": [], + "preconditions": [ + "separate Linux daemon and network authority" + ], + "failures": [ + "unsupported in browser" + ], + "assumptions": [ + "networkAvailability" + ], + "proofScope": "Unsupported boundary; browser has no BGP or WireGuard implementation.", + "enabledByDefault": false + }, + { + "declaration": "capabilityOriginStorage", + "type": "CapabilityContract", + "id": "originStorage", + "owner": "pointerAuthority", + "capability": "OriginStorage", + "operation": "Explicitly retain nonextractable signing authority and exact DNS write-ahead intent", + "source": "src/layer1-uor/browser-authority.js", + "inputs": [ + "explicit authority setup", + "signed scoped publication candidate" + ], + "outputs": [ + "restored CryptoKey", + "committed origin-local journal" + ], + "preconditions": [ + "IndexedDB and CryptoKey structured cloning available", + "successful transaction commit before provider mutation" + ], + "failures": [ + "quota or transaction abort", + "private browsing loss or eviction", + "invalid retained authority" + ], + "assumptions": [ + "browserSemantics", + "serializedJournal" + ], + "proofScope": "Origin-local retention only; no backup, cross-device durability, automatic key rotation or provider exactly-once guarantee.", + "enabledByDefault": false + }, + { + "declaration": "capabilityWebLock", + "type": "CapabilityContract", + "id": "webLock", + "owner": "pointerAuthority", + "capability": "WebLock", + "operation": "Exclude same-origin concurrent DNS writers while reading, committing and settling", + "source": "src/layer1-uor/browser-authority.js", + "inputs": [ + "exact database zone name and authority scope" + ], + "outputs": [ + "exclusive context-lifetime operation" + ], + "preconditions": [ + "Web Locks available", + "same-origin lock scope" + ], + "failures": [ + "API unavailable", + "owner context termination leaves journal unknown" + ], + "assumptions": [ + "browserSemantics", + "serializedJournal" + ], + "proofScope": "No timeout takeover, cross-device exclusion, provider CAS or ordering outside this application origin.", + "enabledByDefault": false + } + ], + "dependencies": [ + { + "declaration": "dependencyBrowserApis", + "type": "Dependency", + "id": "browserApis", + "consumer": "runtimeHost", + "kind": "host", + "locator": "browser DOM/WebAssembly/WebCrypto/fetch/WebRTC; optional authority publication requires IndexedDB/Web Locks", + "versionPolicy": "Host-selected implementation; not byte-pinned", + "trust": "External API and OS trust boundary", + "required": true + }, + { + "declaration": "dependencyCloudflareDns", + "type": "Dependency", + "id": "cloudflareDns", + "consumer": "discovery", + "kind": "external-service", + "locator": "https://cloudflare-dns.com/dns-query", + "versionPolicy": "RFC8484 DNS-message client; optional provider JSON mode; no immutable service version", + "trust": "Read results untrusted until domain admission", + "required": false + }, + { + "declaration": "dependencyCloudflareWriter", + "type": "Dependency", + "id": "cloudflareWriter", + "consumer": "discovery", + "kind": "external-service", + "locator": "https://api.cloudflare.com/client/v4", + "versionPolicy": "Cloudflare API v4; scoped secret reference only", + "trust": "Writes need explicit destination and content approval", + "required": false + }, + { + "declaration": "dependencyGoogleStun", + "type": "Dependency", + "id": "googleStun", + "consumer": "transport", + "kind": "external-service", + "locator": "stun:stun.l.google.com:19302", + "versionPolicy": "Host ICE provider; no immutable service version", + "trust": "Endpoint discovery only", + "required": false + }, + { + "declaration": "dependencyCloudflareStun", + "type": "Dependency", + "id": "cloudflareStun", + "consumer": "transport", + "kind": "external-service", + "locator": "stun:stun.cloudflare.com:3478", + "versionPolicy": "Host ICE provider; no immutable service version", + "trust": "Endpoint discovery only", + "required": false + }, + { + "declaration": "dependencyNtfySignaling", + "type": "Dependency", + "id": "ntfySignaling", + "consumer": "signaling", + "kind": "external-service", + "locator": "https://ntfy.sh", + "versionPolicy": "Public HTTP/WebSocket API; no immutable service version", + "trust": "Signaling disclosure and service availability", + "required": false + }, + { + "declaration": "dependencyNtfyRelay", + "type": "Dependency", + "id": "ntfyRelay", + "consumer": "publicRelay", + "kind": "external-service", + "locator": "https://ntfy.sh", + "versionPolicy": "Optional public cache; no persistence promise", + "trust": "Payload disclosure requires opt-in", + "required": false + }, + { + "declaration": "dependencyStaticOrigin", + "type": "Dependency", + "id": "staticOrigin", + "consumer": "staticHost", + "kind": "hosting", + "locator": "same-origin relative application paths", + "versionPolicy": "Publication-selected HTTPS origin", + "trust": "No release/deployment authority inferred", + "required": true + }, + { + "declaration": "dependencyVmAssets", + "type": "Dependency", + "id": "vmAssets", + "consumer": "vm", + "kind": "vendored-binary", + "locator": "v86/ and images/buildroot-bzimage.bin", + "versionPolicy": "Exact bytes in generated product artifact register", + "trust": "Exact upstream origins and accompanying source/license materials recorded in vendor/distribution.json; guest source pinned in vendor/guest/SOURCE-NOTICE.md", + "required": false + }, + { + "declaration": "dependencyPrismSdk", + "type": "Dependency", + "id": "prismSdk", + "consumer": "identity", + "kind": "build-tool", + "locator": "prismpm.lock and standards.lock", + "versionPolicy": "Exact SDK OCI digest and standards lock", + "trust": "Only real SDK verify may report source/kernel/artifact acceptance", + "required": true + }, + { + "declaration": "dependencyPrismCode", + "type": "Dependency", + "id": "prismCode", + "consumer": "identity", + "kind": "build-tool", + "locator": "package-lock.json", + "versionPolicy": "prism-code 0.7.2 exact npm lock", + "trust": "Adapter and package verification, not browser host semantics", + "required": true + } + ], + "deployments": [ + { + "declaration": "deploymentBrowserSession", + "type": "Deployment", + "id": "browserSession", + "kind": "static-browser", + "entry": "index.html", + "files": [ + "index.html", + "src/**/*.js", + "v86/libv86.js", + "v86/v86.wasm", + "v86/seabios.bin", + "v86/vgabios.bin", + "images/buildroot-bzimage.bin" + ], + "requiredCapabilities": [ + "dom", + "crypto", + "monotonicClock", + "wallClock", + "sessionStorage", + "artifactFetch" + ], + "secrets": [ + "Cloudflare scoped DNS token only when explicitly supplied; session-local, never in repository" + ], + "readiness": "Asset load and interactive flow checks required; pure probe acceptance is insufficient.", + "rollback": "Retain prior complete asset set; session state may be lost on reload.", + "releaseGate": "Runtime tests, artifact closure, vendor license/provenance review, exact SDK model verification and browser integration checks." + }, + { + "declaration": "deploymentPureProbe", + "type": "Deployment", + "id": "pureProbe", + "kind": "prism-text-application", + "entry": "app/src/StitchApp.lex.tex", + "files": [ + "SDK-generated holo and browser closure" + ], + "requiredCapabilities": [], + "secrets": [], + "readiness": "Only actual pinned-SDK verify establishes probe acceptance.", + "rollback": "Retain previous immutable holo and exact source lock.", + "releaseGate": "lexlean check, Lean and leanchecker, exact axioms, PrismPM artifact and vector verification." + } + ], + "assets": [ + { + "declaration": "assetFile17", + "type": "Asset", + "path": "images/buildroot-bzimage.bin", + "role": "vendored VM dependency", + "origin": "Linux 6.18.7 from Buildroot 7fdeadb3b9f12f78e5fccca914d7fef47090ab9a; image 313a6b545290a2b47856b49bfcc4c7577469749b315932ae008d39fe70fc7f07", + "licenseStatus": "Corresponding source, configs, patches and licenses published at immutable commit fd59fae669e9a40271fb584ca071270d8ed0b8f8; preserve vendor/guest/SOURCE-NOTICE.md and equivalent source access with image", + "redistributionCleared": true, + "bytes": 8053248, + "sha256": "313a6b545290a2b47856b49bfcc4c7577469749b315932ae008d39fe70fc7f07" + }, + { + "declaration": "assetFile0", + "type": "Asset", + "path": "index.html", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 101972, + "sha256": "b8e573b5b50c533114532ef4a6f851efc1508082c3a42d2d1002e20f22400801" + }, + { + "declaration": "assetSiteCatalog", + "type": "Asset", + "path": "site/catalog.js", + "role": "Source-derived facet catalog presentation with explicit assurance limits", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 2473, + "sha256": "b72eea8eafcd5a8a9d996c1b78619ca9d113fd530e82c39baade83fee0b28f36" + }, + { + "declaration": "assetSiteExplorer", + "type": "Asset", + "path": "site/explorer.js", + "role": "Local exact-byte recovery demonstration and source-facet renderer", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 7628, + "sha256": "72b1e0d06485e235429601ff640772aff4565002a37290454fd08fd40c0a1b79" + }, + { + "declaration": "assetSiteFacets", + "type": "Asset", + "path": "site/facets.json", + "role": "Generated source-facet inventory; not verification evidence", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 3227, + "sha256": "43a22311882a332a56b5545b4f6a34517fc1ad8535eeb7989be1b7114cfa01f5" + }, + { + "declaration": "assetSiteStyle", + "type": "Asset", + "path": "site/site.css", + "role": "Project-owned product site presentation", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 12697, + "sha256": "67332d156b7bfdbb212bef731374bec91f11d376aa938f45be07944fe2490dd9" + }, + { + "declaration": "assetSiteFabric", + "type": "Asset", + "path": "site/stitch-fabric.svg", + "role": "Project-owned Stitch fabric illustration", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 3778, + "sha256": "16d6fdeebce5ddb1beeb1612a3d06a922a38e24abd2a03f94cc9f482b7743163" + }, + { + "declaration": "assetAuthorityUi", + "type": "Asset", + "path": "src/authority-ui.js", + "role": "Contextual explicit signing, trust-anchor and browser-storage administration", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 9734, + "sha256": "96e76a92918a52dff05780b76f59158916540fd38d1ced986fd6001d3ee1482b" + }, + { + "declaration": "assetBrowserAuthority", + "type": "Asset", + "path": "src/layer1-uor/browser-authority.js", + "role": "Origin-local signing authority and transactional publication journal", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 22890, + "sha256": "3b9ba8d4a23fbe056358791d4e2d5ad377faf5a9a3cc2ac3d2dc1c3906087d09" + }, + { + "declaration": "assetFile1", + "type": "Asset", + "path": "src/layer1-uor/contracts.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 1357, + "sha256": "94c67e0811f78029b251c55edbf365b2335040106b8125fa5298e59315d2c2d3" + }, + { + "declaration": "assetFile2", + "type": "Asset", + "path": "src/layer1-uor/custody.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 16869, + "sha256": "597b34d6740b6b371e30af24ee18cd10f8c4142da38e616b9ec5e04d042ab74c" + }, + { + "declaration": "assetLifecycleEffects", + "type": "Asset", + "path": "src/layer1-uor/effects.js", + "role": "Exact identity projections and model-derived transport, DNS and VM lifecycle admissions", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 9822, + "sha256": "b685f497bf80f1ad58a2176e83d32b106e3bb718cb542a75a2b9c1bf6a8b4fb0" + }, + { + "declaration": "assetFile3", + "type": "Asset", + "path": "src/layer1-uor/generated-model.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 1262320, + "sha256": "fae51244e2b96601978233863e86aee96f35ef5a15ad4af4d3e687a9d770fb11" + }, + { + "declaration": "assetFile4", + "type": "Asset", + "path": "src/layer1-uor/index.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 16965, + "sha256": "55f246f29cdd0bfa934c079d3f3afffca9e1e26c0800777dc4e2351351bca1cf" + }, + { + "declaration": "assetFile5", + "type": "Asset", + "path": "src/layer1-uor/pointer.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 19626, + "sha256": "99cce36bc7a981536e1c6df22956b5c34db9689ccc377b0e808b09502d5f09fc" + }, + { + "declaration": "assetFile6", + "type": "Asset", + "path": "src/layer2-schedulers/index.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 18472, + "sha256": "3223da0497c3a46c310541278cc7ed9042b5105e37667dd9c9d2e384f2a91f48" + }, + { + "declaration": "assetFile7", + "type": "Asset", + "path": "src/layer2-schedulers/policy.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 5894, + "sha256": "8f2074f8fe07a7b1fda51896d78f11a797564afb64accebc7291261e5c00639f" + }, + { + "declaration": "assetFile8", + "type": "Asset", + "path": "src/layer3-storage/custody.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 18523, + "sha256": "70ec7500e9a1aea0a2f383344bebea4acbe410c3aff76ccadd8869feaac24aee" + }, + { + "declaration": "assetFile9", + "type": "Asset", + "path": "src/layer3-storage/index.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 49158, + "sha256": "905067fe5ebac2f6a6cb2cdda29e37265409f3e7a5e4b786e9e18e21bc4af676" + }, + { + "declaration": "assetFile10", + "type": "Asset", + "path": "src/layer4-compute/index.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 43196, + "sha256": "73bcc96f06f89f74ba555f8d24c550ae7e80d91caba2f3a1c2d4c48aadd1a2b4" + }, + { + "declaration": "assetFile11", + "type": "Asset", + "path": "src/layer4-compute/replay.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 9523, + "sha256": "112653100e2ea57c6b732e64dbc2086fd5237eb2129fe255cb5627498494f1d3" + }, + { + "declaration": "assetVmAdministration", + "type": "Asset", + "path": "src/layer4-compute/vm-administration.js", + "role": "Explicit guest grants, bounded command admission and generation-scoped effect observation", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 8780, + "sha256": "2a307a700e38dfb7f38af4a5cfc3207e3d2b274b6c89b943e6b17add424376bc" + }, + { + "declaration": "assetChannelFlow", + "type": "Asset", + "path": "src/layer5-transport/channel-flow.js", + "role": "Negotiated DataChannel framing, bounded queues and generation-fenced delivery", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 10835, + "sha256": "728ba79197ce0fd73a289a713a7eead42f031deeb55727b720f96e88b5bedaf3" + }, + { + "declaration": "assetDnsWire", + "type": "Asset", + "path": "src/layer5-transport/dns-wire.js", + "role": "RFC8484 application DNS-message client", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 11588, + "sha256": "186267ac0296ed22d84665627400999d0ee1643e618088309c799f0299e87185" + }, + { + "declaration": "assetFile12", + "type": "Asset", + "path": "src/layer5-transport/index.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 56455, + "sha256": "cc2cd97926df848aea0031a2a405fe0561881ccf06723ea0bca8a60ffb4485f8" + }, + { + "declaration": "assetRelayFraming", + "type": "Asset", + "path": "src/layer5-transport/relay-framing.js", + "role": "Bounded ntfy message framing and reassembly", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 15145, + "sha256": "35672c5720f5f1e5d009f1875a1c63de3a6badea2546d66baf73c77fb7c90ae0" + }, + { + "declaration": "assetSignaling", + "type": "Asset", + "path": "src/layer5-transport/signaling.js", + "role": "Signed key-owned signaling with current-session challenge and replay rejection", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 6863, + "sha256": "422137184e9a95a55c2c1ec7f9bd8c6a21986675a4041ce62f8451c61bb4b876" + }, + { + "declaration": "assetRustConformance", + "type": "Asset", + "path": "src/lib.rs", + "role": "Historical Rust conformance source; not loaded by the browser", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 3236, + "sha256": "159aeb7ff0afaf9dac4baa41c6ea5959ab55036cfa0d79af728da20c3f77f621" + }, + { + "declaration": "assetPrismId", + "type": "Asset", + "path": "src/prism-id.js", + "role": "Stitch browser application", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 98032, + "sha256": "5ae9114fbc7d34c50b2736ed4813d6ab52b678435c1342c97874ab57762fe87f" + }, + { + "declaration": "assetProductExperience", + "type": "Asset", + "path": "src/product-experience.js", + "role": "Model-derived operator journeys, evidence and guarded DOM actions", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 8322, + "sha256": "0ee000cfe9b8c3bd0ce6a0a792561e8afc7cb40314eacc4d64b02148a2f154ae" + }, + { + "declaration": "assetRecoveryUi", + "type": "Asset", + "path": "src/recovery-ui.js", + "role": "Contextual operator recovery controls without network, VM or DNS effects", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 12293, + "sha256": "ba2672ac912b1d6e1ef4ff8780f460d1643ee751d3507729eb6cd90c97c0ba60" + }, + { + "declaration": "assetRecovery", + "type": "Asset", + "path": "src/recovery.js", + "role": "Verified detached recovery bundle import/export; separate exact anchor acceptance and explicit scoped live-head restoration", + "origin": "Project-owned source checkout", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true, + "bytes": 11049, + "sha256": "89c7b3abcd713ee1c2131d6a841a94526f59c0a6118ac09834a2e6cf43c3a2c0" + }, + { + "declaration": "assetFile13", + "type": "Asset", + "path": "v86/libv86.js", + "role": "vendored VM dependency", + "origin": "Exact official copy.sh distribution; v86 source 1e4f43c954701db9699fa976b27cc675f9971265; JS independently reconstructed", + "licenseStatus": "BSD/MIT incorporated notices and source supplied in vendor/v86; include accompanying materials in distribution", + "redistributionCleared": true, + "bytes": 353762, + "sha256": "b80fba71dacb7977e5b46800b3ba194bba7fe13e52fa3d22f80cc060ff015a4e" + }, + { + "declaration": "assetFile15", + "type": "Asset", + "path": "v86/seabios.bin", + "role": "vendored VM dependency", + "origin": "Exact copy/v86 BIOS blobs; SeaBIOS rel-1.16.2 source ea1b7a0733906b8425d948ae94fba63c32b1d425", + "licenseStatus": "LGPLv3 source, config, build instructions and licenses supplied in vendor/seabios; include accompanying materials in distribution", + "redistributionCleared": true, + "bytes": 131072, + "sha256": "73e3f359102e3a9982c35fce98eb7cd08f18303ac7f1ba6ebfbe6cdc1c244d98" + }, + { + "declaration": "assetFile14", + "type": "Asset", + "path": "v86/v86.wasm", + "role": "vendored VM dependency", + "origin": "Exact official copy.sh distribution; v86 source 1e4f43c954701db9699fa976b27cc675f9971265; JS independently reconstructed", + "licenseStatus": "BSD/MIT incorporated notices and source supplied in vendor/v86; include accompanying materials in distribution", + "redistributionCleared": true, + "bytes": 1418156, + "sha256": "abd512988f39f5c81d4930f564bafa1a6e1e0d5210de9b20e2bdec13fbc318d9" + }, + { + "declaration": "assetFile16", + "type": "Asset", + "path": "v86/vgabios.bin", + "role": "vendored VM dependency", + "origin": "Exact copy/v86 BIOS blobs; SeaBIOS rel-1.16.2 source ea1b7a0733906b8425d948ae94fba63c32b1d425", + "licenseStatus": "LGPLv3 source, config, build instructions and licenses supplied in vendor/seabios; include accompanying materials in distribution", + "redistributionCleared": true, + "bytes": 36352, + "sha256": "a4bc0d80cc3ca028c73dafa8fee396b8d054ce87ebd8abfbd31b06b437607880" + } + ], + "architecture": [ + { + "declaration": "admission", + "type": "Foundation.Arch::Component", + "index": 0, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "admission", + "text": "Four-dimensional reservation ledger. Implementation: src/layer2-schedulers/policy.js. Domain contracts: Stitch.Budget." + }, + { + "declaration": "browser", + "type": "Foundation.Arch::Component", + "index": 1, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.staticSite" + }, + "name": "browser", + "text": "Interactive five-layer Stitch product. Implementation: index.html. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "compute", + "type": "Foundation.Arch::Component", + "index": 2, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "compute", + "text": "Deterministic program and checkpoint replay. Implementation: src/layer4-compute/index.js, src/layer4-compute/replay.js. Domain contracts: Stitch.Compute." + }, + { + "declaration": "cryptography", + "type": "Foundation.Arch::Component", + "index": 3, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.externalSystem" + }, + "name": "cryptography", + "text": "Browser WebCrypto SHA-256 and Ed25519. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "discovery", + "type": "Foundation.Arch::Component", + "index": 4, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "discovery", + "text": "DNS-over-HTTPS resolver and scoped DNS writer. Implementation: src/layer5-transport/index.js. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "identity", + "type": "Foundation.Arch::Component", + "index": 5, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "identity", + "text": "Canonical bytes, full commitments, raw encoding and fragments. Implementation: src/layer1-uor/contracts.js, src/layer1-uor/custody.js, src/layer1-uor/generated-model.js. Domain contracts: Stitch.Identity, Stitch.Encoding, Stitch.Fragments." + }, + { + "declaration": "legacy", + "type": "Foundation.Arch::Component", + "index": 6, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "legacy", + "text": "Historical UOR and simulation conformance. Implementation: src/layer1-uor/index.js, src/layer3-storage/index.js, src/lib.rs. Domain contracts: historical simulation only." + }, + { + "declaration": "nativeRouting", + "type": "Foundation.Arch::Component", + "index": 7, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.externalSystem" + }, + "name": "nativeRouting", + "text": "External Linux routing daemon; absent from browser. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "peers", + "type": "Foundation.Arch::Component", + "index": 8, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.externalSystem" + }, + "name": "peers", + "text": "Untrusted remote holders and compute peers. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "pointerAuthority", + "type": "Foundation.Arch::Component", + "index": 9, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "pointerAuthority", + "text": "Independently pinned single-writer key. Implementation: src/layer1-uor/pointer.js. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "publicRelay", + "type": "Foundation.Arch::Component", + "index": 11, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.externalSystem" + }, + "name": "publicRelay", + "text": "Optional public ntfy warm cache. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "runtimeHost", + "type": "Foundation.Arch::Component", + "index": 12, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.externalSystem" + }, + "name": "runtimeHost", + "text": "Browser, OS, clocks, RAM, networking and permissions. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "scheduler", + "type": "Foundation.Arch::Component", + "index": 13, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "scheduler", + "text": "Experimental proposals under enforced admission. Implementation: src/layer2-schedulers/index.js. Domain contracts: Stitch.Budget, Stitch.Observation." + }, + { + "declaration": "signaling", + "type": "Foundation.Arch::Component", + "index": 14, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.externalSystem" + }, + "name": "signaling", + "text": "Public ntfy SDP/ICE signaling; BroadcastChannel on same origin. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "staticHost", + "type": "Foundation.Arch::Component", + "index": 15, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.externalSystem" + }, + "name": "staticHost", + "text": "Same-origin publication of application and VM assets. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "storage", + "type": "Foundation.Arch::Component", + "index": 16, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "storage", + "text": "Ephemeral local cache and conditional peer custody. Implementation: src/layer3-storage/custody.js, src/layer3-storage/index.js. Domain contracts: Stitch.Custody, Stitch.System." + }, + { + "declaration": "transport", + "type": "Foundation.Arch::Component", + "index": 17, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "transport", + "text": "WebRTC channels, bounded messages and VM Ethernet bridge. Implementation: src/layer5-transport/index.js. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "vm", + "type": "Foundation.Arch::Component", + "index": 18, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "vm", + "text": "v86 x86 Linux guest and 9p filesystem bridge. Implementation: src/layer4-compute/index.js, v86/libv86.js, v86/v86.wasm, v86/seabios.bin, v86/vgabios.bin, images/buildroot-bzimage.bin. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "prismId", + "type": "Foundation.Arch::Component", + "index": 10, + "kind": { + "constructor": "Foundation.Arch::ComponentKind.service" + }, + "name": "prismId", + "text": "Login-free prism identity: devices linked out of band, private boundary, substrate sync. Implementation: src/prism-id.js. Host or external boundary; semantics require independent evidence." + }, + { + "declaration": "browserAdmission", + "type": "Foundation.Arch::Edge", + "index": 0, + "fromIndex": 1, + "toIndex": 0, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "browserCompute", + "type": "Foundation.Arch::Edge", + "index": 1, + "fromIndex": 1, + "toIndex": 2, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "browserDiscovery", + "type": "Foundation.Arch::Edge", + "index": 2, + "fromIndex": 1, + "toIndex": 4, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "browserScheduler", + "type": "Foundation.Arch::Edge", + "index": 4, + "fromIndex": 1, + "toIndex": 13, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "browserStorage", + "type": "Foundation.Arch::Edge", + "index": 5, + "fromIndex": 1, + "toIndex": 16, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "browserTransport", + "type": "Foundation.Arch::Edge", + "index": 6, + "fromIndex": 1, + "toIndex": 17, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "browserVm", + "type": "Foundation.Arch::Edge", + "index": 7, + "fromIndex": 1, + "toIndex": 18, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "computeAdmission", + "type": "Foundation.Arch::Edge", + "index": 8, + "fromIndex": 2, + "toIndex": 0, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "computeIdentity", + "type": "Foundation.Arch::Edge", + "index": 9, + "fromIndex": 2, + "toIndex": 5, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "computeStorage", + "type": "Foundation.Arch::Edge", + "index": 10, + "fromIndex": 2, + "toIndex": 16, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "computeTransport", + "type": "Foundation.Arch::Edge", + "index": 11, + "fromIndex": 2, + "toIndex": 17, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "discoveryAdmission", + "type": "Foundation.Arch::Edge", + "index": 12, + "fromIndex": 4, + "toIndex": 0, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "discoveryAuthority", + "type": "Foundation.Arch::Edge", + "index": 13, + "fromIndex": 4, + "toIndex": 9, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "discoveryHost", + "type": "Foundation.Arch::Edge", + "index": 14, + "fromIndex": 4, + "toIndex": 12, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "identityCryptography", + "type": "Foundation.Arch::Edge", + "index": 15, + "fromIndex": 5, + "toIndex": 3, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "relayTransport", + "type": "Foundation.Arch::Edge", + "index": 18, + "fromIndex": 11, + "toIndex": 17, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "schedulerAdmission", + "type": "Foundation.Arch::Edge", + "index": 19, + "fromIndex": 13, + "toIndex": 0, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "schedulerTransport", + "type": "Foundation.Arch::Edge", + "index": 20, + "fromIndex": 13, + "toIndex": 17, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "signalingTransport", + "type": "Foundation.Arch::Edge", + "index": 21, + "fromIndex": 14, + "toIndex": 17, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "staticBrowser", + "type": "Foundation.Arch::Edge", + "index": 22, + "fromIndex": 15, + "toIndex": 1, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "staticVm", + "type": "Foundation.Arch::Edge", + "index": 23, + "fromIndex": 15, + "toIndex": 18, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "storageAdmission", + "type": "Foundation.Arch::Edge", + "index": 24, + "fromIndex": 16, + "toIndex": 0, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "storageIdentity", + "type": "Foundation.Arch::Edge", + "index": 25, + "fromIndex": 16, + "toIndex": 5, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "storagePeers", + "type": "Foundation.Arch::Edge", + "index": 26, + "fromIndex": 16, + "toIndex": 8, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "storageTransport", + "type": "Foundation.Arch::Edge", + "index": 27, + "fromIndex": 16, + "toIndex": 17, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "transportAdmission", + "type": "Foundation.Arch::Edge", + "index": 28, + "fromIndex": 17, + "toIndex": 0, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "transportPeers", + "type": "Foundation.Arch::Edge", + "index": 29, + "fromIndex": 17, + "toIndex": 8, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "transportSignaling", + "type": "Foundation.Arch::Edge", + "index": 30, + "fromIndex": 17, + "toIndex": 14, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "transportVm", + "type": "Foundation.Arch::Edge", + "index": 31, + "fromIndex": 17, + "toIndex": 18, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "vmStorage", + "type": "Foundation.Arch::Edge", + "index": 32, + "fromIndex": 18, + "toIndex": 16, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "vmTransport", + "type": "Foundation.Arch::Edge", + "index": 33, + "fromIndex": 18, + "toIndex": 17, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "browserPrismId", + "type": "Foundation.Arch::Edge", + "index": 3, + "fromIndex": 1, + "toIndex": 10, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "prismIdCryptography", + "type": "Foundation.Arch::Edge", + "index": 16, + "fromIndex": 10, + "toIndex": 3, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "prismIdTransport", + "type": "Foundation.Arch::Edge", + "index": 17, + "fromIndex": 10, + "toIndex": 17, + "kind": { + "constructor": "Foundation.Arch::EdgeKind.dataFlow" + } + }, + { + "declaration": "operator", + "type": "Foundation.Arch::Stakeholder", + "index": 0, + "name": "Stitch operator", + "text": "Chooses mesh participation, public disclosure, trusted pointer authority, DNS writes and VM actions." + }, + { + "declaration": "recoverability", + "type": "Foundation.Arch::Concern", + "index": 0, + "name": "Conditional recovery and honest assurance", + "text": "Recover exact bytes and replay pure jobs without confusing untrusted host observations, network availability or arbitrary VM effects with proved domain rules." + }, + { + "declaration": "productViewpoint", + "type": "Foundation.Arch::Viewpoint", + "index": 0, + "stakeholderIndex": 0, + "concernIndex": 0, + "modelKindIndex": 0 + }, + { + "declaration": "productView", + "type": "Foundation.Arch::View", + "index": 0, + "viewpointIndex": 0, + "modelKindIndex": 0 + }, + { + "declaration": "reader", + "type": "Foundation.Arch::Stakeholder", + "index": 1, + "name": "Stitch reader", + "text": "Learns the object, fragment, custody, replay and authority protocol before taking part." + }, + { + "declaration": "reviewer", + "type": "Foundation.Arch::Stakeholder", + "index": 2, + "name": "Stitch reviewer", + "text": "Reviews exact-source evidence, host assumptions, vendor provenance and qualification gaps." + }, + { + "declaration": "systemIntegrator", + "type": "Foundation.Arch::Stakeholder", + "index": 3, + "name": "Stitch systemIntegrator", + "text": "Embeds or extends the protocol without bypassing resource, trust or effect admission." + }, + { + "declaration": "security", + "type": "Foundation.Arch::Concern", + "index": 1, + "name": "security", + "text": "Keep independently accepted authority, exact commitments, explicit disclosure and ambiguous effects distinct." + }, + { + "declaration": "transparency", + "type": "Foundation.Arch::Concern", + "index": 2, + "name": "transparency", + "text": "Trace every product statement to its source and evidence scope; do not promote observations into certification." + }, + { + "declaration": "usability", + "type": "Foundation.Arch::Concern", + "index": 3, + "name": "usability", + "text": "Present the concept and protocol with readable explanations, scalable visuals, keyboard-accessible interaction and explicit evidence states." + }, + { + "declaration": "readerViewpoint", + "type": "Foundation.Arch::Viewpoint", + "index": 1, + "stakeholderIndex": 1, + "concernIndex": 3, + "modelKindIndex": 0 + }, + { + "declaration": "readerView", + "type": "Foundation.Arch::View", + "index": 1, + "viewpointIndex": 1, + "modelKindIndex": 0 + }, + { + "declaration": "reviewerViewpoint", + "type": "Foundation.Arch::Viewpoint", + "index": 2, + "stakeholderIndex": 2, + "concernIndex": 2, + "modelKindIndex": 0 + }, + { + "declaration": "reviewerView", + "type": "Foundation.Arch::View", + "index": 2, + "viewpointIndex": 2, + "modelKindIndex": 0 + }, + { + "declaration": "systemIntegratorViewpoint", + "type": "Foundation.Arch::Viewpoint", + "index": 3, + "stakeholderIndex": 3, + "concernIndex": 1, + "modelKindIndex": 0 + }, + { + "declaration": "systemIntegratorView", + "type": "Foundation.Arch::View", + "index": 3, + "viewpointIndex": 3, + "modelKindIndex": 0 + } + ], + "hostCapabilities": [ + "Dom", + "Cryptography", + "MonotonicClock", + "WallClock", + "SessionStorage", + "PeerChannel", + "LocalBroadcast", + "PublicSignaling", + "DnsRead", + "DnsWrite", + "PublicRelay", + "VirtualMachine", + "ArtifactFetch", + "NativeRouting", + "OriginStorage", + "WebLock" + ], + "sources": [ + { + "path": ".github/workflows/guest-browser-qualification.yml", + "sha256": "b65915693340d184b8351a7f19f157f43099a10f9f0c79b3e3117f6716426791" + }, + { + "path": ".github/workflows/guest-candidate.yml", + "sha256": "1934c00b31a62386f26a8b54e7303dce1768b8bfc706ac41e05e26fa27cd5281" + }, + { + "path": ".github/workflows/prism.yml", + "sha256": "4fe595efda75eabd6d81db25b87a44d0d3fa186deb37b1c50b040095f488d093" + }, + { + "path": ".github/workflows/source-authoring.yml", + "sha256": "28ddee0d1feebc5bf0eae419c1e3c30b570d3e08d1c6e064bfcaf65ddafef374" + }, + { + "path": ".gitignore", + "sha256": "abe56c75c83329440035daadbb9c51ecaa16f58828d5c179245c02330bd32a67" + }, + { + "path": "CONTRACT.json", + "sha256": "65af6bdb48d315153c34d5dffcf86867729935fa2902943b82b0c5f9c5a631a2" + }, + { + "path": "Cargo.lock", + "sha256": "92fbb58eb56ed566b82627f5e6ea947034f023c165b385f28dd1ef9aebbe8c7b" + }, + { + "path": "Cargo.toml", + "sha256": "12062fc485642b57cf1e0fbf8d9c05e0f0e5fb8b1607ee2eb4d07d6b85ed84a5" + }, + { + "path": "README.md", + "sha256": "eee856a847a299265aac59aa11e2d068ef21a0c98625acddf220c0452c8040ca" + }, + { + "path": "app/lake-manifest.json", + "sha256": "1107bc06d0f0bf1716fbc980995e4895f608331a17863d16bb1ff631d70924f6" + }, + { + "path": "app/lakefile.toml", + "sha256": "f93d661ae8380e42c7954c0a90166abb296ac100af42b403d7af0ac7e6b50094" + }, + { + "path": "app/language/prism.arch/entries/arch-component-kind.toml", + "sha256": "bb54f236dd64badfc74d57ee43a0f4d886786b9270edb07347f062541bec613e" + }, + { + "path": "app/language/prism.arch/entries/arch-component.toml", + "sha256": "ef7345b3d4cb74e68c5da598895f13cd887cca2d2247058a1fd062adc2597c50" + }, + { + "path": "app/language/prism.arch/entries/arch-concern.toml", + "sha256": "e2b1b3f560e85d0fb51f75b19b1c18b9f5f83f48eaf952b6c9a9a75ae73f3248" + }, + { + "path": "app/language/prism.arch/entries/arch-edge-kind.toml", + "sha256": "333c549f1db8311e47c74e391839649e20ba45495f6c40843348a45588db444f" + }, + { + "path": "app/language/prism.arch/entries/arch-edge.toml", + "sha256": "3a9d18d8e28a3a3b50be9d1315037fd2c426d56cfc8e2f6115a4b0785e6a5840" + }, + { + "path": "app/language/prism.arch/entries/arch-model-kind.toml", + "sha256": "ccb283501e64ab83914728371e1e2fdf8301837bc502804c4bd18c1d49128ada" + }, + { + "path": "app/language/prism.arch/entries/arch-stakeholder.toml", + "sha256": "f8e4bc507df3cf0e384d6c9a92912500ddca2004be3cfeede0f3cc3d38a04ec7" + }, + { + "path": "app/language/prism.arch/entries/arch-standard-reference.toml", + "sha256": "07e3dcf71b75ee0dcfe8441894e5ad3744f042577c502619b3bedb787c86ca1b" + }, + { + "path": "app/language/prism.arch/entries/arch-text-application-model.toml", + "sha256": "6d92d1a7d29d4516dde60bd9539e758b1076dfbf889860e3e435f289c504b9d1" + }, + { + "path": "app/language/prism.arch/entries/arch-view-class.toml", + "sha256": "ef9465462b1adcf5c36b10b2669f03057d5215bbfd10e863db58e81727408fdb" + }, + { + "path": "app/language/prism.arch/entries/arch-view.toml", + "sha256": "2bee3378b0f94165eb8f023279eaab32ec70c5e112e3c06bce7237a1498e0e31" + }, + { + "path": "app/language/prism.arch/entries/arch-viewpoint-class.toml", + "sha256": "c1efce0dd43342b471433ae8a89d7cc46876d54ef3200aed8e08e817f36795cf" + }, + { + "path": "app/language/prism.arch/entries/arch-viewpoint.toml", + "sha256": "a6f53b7f4c58950d7230fb6445a35a80e3a93772fb024b5e7c09381c10cd466c" + }, + { + "path": "app/language/prism.arch/entries/holo-flat-validation-input.toml", + "sha256": "e3a0cf83efd144e1aa3ed6ce5b67ea3bed1df1c4f198c71655c817b65b1d0108" + }, + { + "path": "app/language/prism.arch/entries/holo-normalized-model.toml", + "sha256": "5f7f66774560717cfa55842e30e8fc1b097e1e038b0eba6da6ea3312b583080e" + }, + { + "path": "app/language/prism.arch/entries/holo-standards-profile.toml", + "sha256": "1cf436bcdcc986f4ffcb41db1f31eba74aab4e534a867b4dc5d6d6cf7523417d" + }, + { + "path": "app/language/prism.arch/entries/prism-bounded-byte-buffer.toml", + "sha256": "9b8f6d61f42389a8e63bfbac674ec1b3061f5f004adda8279158df549ee7c902" + }, + { + "path": "app/language/prism.arch/entries/prism-browser-system-model.toml", + "sha256": "3ba45fd6754e84290033a4f18ebc06f5338c8e8affd5e58ee95b07e572fcf42b" + }, + { + "path": "app/language/prism.arch/entries/prism-production-system-model.toml", + "sha256": "91df8207b685a56ba0f0032ed06e875f707202789d21aa3cb6e8b31b4855fb34" + }, + { + "path": "app/language/prism.arch/entries/prism-unicode-text-codec.toml", + "sha256": "7c296475b0a97eccee73eb522af93359eaf185b04571e280b01d394b20f9e1e1" + }, + { + "path": "app/language/prism.arch/lexicon.toml", + "sha256": "14c95df8b512edacacdb1788b58ae90cf573b4e3f1dca0e41074bfde5a380c9f" + }, + { + "path": "app/language/prism.qual/entries/qual-characteristic.toml", + "sha256": "88c99bf5804a200ea5d42c4937567ffc9469f0a500967d7db077ebc31b1c60ca" + }, + { + "path": "app/language/prism.qual/entries/qual-measure.toml", + "sha256": "304e8b84739e034eee5635801b02044d16522e82e53a54e4af173c0dcf929d09" + }, + { + "path": "app/language/prism.qual/entries/qual-requirement.toml", + "sha256": "85a2d7dec43320aa24ee3e0e3706035d94bcdf38613c0c56d44f46c194e29fa6" + }, + { + "path": "app/language/prism.qual/entries/qual-subcharacteristic.toml", + "sha256": "3e7ae6099226785e401b3bcba2c2a508b705b17cb7c33673e8f6c6be8b4aec9f" + }, + { + "path": "app/language/prism.qual/lexicon.toml", + "sha256": "a79fae9a81e748c01f19a48dd066b0dedd356c05b791bd8bc8e7ce20d44cb335" + }, + { + "path": "app/language/prism.sec/entries/sec-activity.toml", + "sha256": "a9d8f0369b33d332d58fc5155bf26fe73573d94dae627624d1c02922028fe6c5" + }, + { + "path": "app/language/prism.sec/entries/sec-asset.toml", + "sha256": "11ad482bdceffcb5413351d40566221e6ae06bd08731a27d04ad66cb8038fafb" + }, + { + "path": "app/language/prism.sec/entries/sec-control.toml", + "sha256": "2079014db65e604290d9b5b09cd9fbd63da084a4cd082e39dd4c2836ac9e9192" + }, + { + "path": "app/language/prism.sec/entries/sec-impact.toml", + "sha256": "2dcf1b527613d7d4c11f477c23f5f10fd7181a7f315dfb87c8585d1b3c28827b" + }, + { + "path": "app/language/prism.sec/entries/sec-likelihood.toml", + "sha256": "36ffd259c2d5598cd18dab6e1d023910712c7fe86f1e0b7fcebae106084954cb" + }, + { + "path": "app/language/prism.sec/entries/sec-measurement.toml", + "sha256": "2e5ff2c76971922d6321ae4ae6eeb29330d14cab2efb363ab0d10ebc5c95e400" + }, + { + "path": "app/language/prism.sec/entries/sec-risk.toml", + "sha256": "f2a6d3dbee6dab80f208394fcdfb50eccb1185ae46ad9e2a31eb057b33a36b72" + }, + { + "path": "app/language/prism.sec/entries/sec-threat.toml", + "sha256": "a9b2201976bb336399d5ba4456a32c60263101b9accbbdbf8d9361e3c3175c21" + }, + { + "path": "app/language/prism.sec/lexicon.toml", + "sha256": "d9b9663715d38c6d181becc8d433e3c3636b55d7ef97bd1f3d39688222925f7c" + }, + { + "path": "app/language/stitch.domain/entries/stitch-budget.toml", + "sha256": "0bba5b43f718ceefbe562a5f08ad29c8724071ccf4464c4bf91860288428d8f9" + }, + { + "path": "app/language/stitch.domain/entries/stitch-checkpoint.toml", + "sha256": "4d52a393476ad8e6944092fba2255b733a2980ca1c200e8e897d6b08e8e1a62a" + }, + { + "path": "app/language/stitch.domain/entries/stitch-encoding.toml", + "sha256": "7e1624765b469c5519fc07888d480477aaf20ab0d14adc2ace1b394939fff543" + }, + { + "path": "app/language/stitch.domain/entries/stitch-evidence.toml", + "sha256": "7bbbe2db8b2970c5b9943e499d1f67ee0e965d9330556f7ab9b428da8c6b6fba" + }, + { + "path": "app/language/stitch.domain/entries/stitch-fragment.toml", + "sha256": "6ecf049cdb84d7b134022012e38c5e1a114471f3b0330fd22aa6e39a1e5af8b1" + }, + { + "path": "app/language/stitch.domain/entries/stitch-object.toml", + "sha256": "9713cff899bf01e9cddbd9599e3ea70395d089b3296c79ffa5cdc1c364329714" + }, + { + "path": "app/language/stitch.domain/entries/stitch-observation.toml", + "sha256": "3ee41f31ef11a0d4fc1b54674c9bd0a55870bd7ec29354b5e189a35ca0cc3579" + }, + { + "path": "app/language/stitch.domain/entries/stitch-placement.toml", + "sha256": "2dfa9c8901fa29b87f33aff74305a72dac70a2f79ca9a480d6790d03cf51b0b2" + }, + { + "path": "app/language/stitch.domain/entries/stitch-pointer.toml", + "sha256": "fbe10dae37ae4a6ef039a7ec38585da18a434b4f8266ab285a4c85b35d3df23b" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-brand.toml", + "sha256": "83888689fe9709c366189c287993879f0c34d49c4b8edc8734979b2c3e91816e" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-compliance.toml", + "sha256": "712a56eeb947698a0f8057aa3bf0ff0fb4d63920b0d4143a3ca3dccce40008e8" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-design.toml", + "sha256": "316dbdd008caef03b6e7860aa90710f4d22f1e1029defb339c4b4d22b30f4359" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-features.toml", + "sha256": "d01c970b414c3df9ed6fcbb6871b96c49ad776f8bb585286fc447e1e525b222b" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-persistence.toml", + "sha256": "f463e88ba5449df1369ac0cd69019ef50d29dc7cc7a9e92bb628f8152ee68557" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-quality.toml", + "sha256": "bd2bb2331371f49e6f96d20cfa81530de00be9cf753bcbf22c4a4cf0a561b405" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-release.toml", + "sha256": "eba180091f257e55f12e8ead55585907f52074eecafb1637cf1bbba4e8bffced" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-security.toml", + "sha256": "310a7feacb85a42087880a2b10cfd6e90cd061e363c630cf9f600b5cb0da9d7d" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-users.toml", + "sha256": "7eba3db5f0690ff9c50cc72ef76581e72e23a695761d56040a53825411f89155" + }, + { + "path": "app/language/stitch.domain/entries/stitch-service-model.toml", + "sha256": "4277ffc608483787cffbd79f05cfbd7ede7db687549ee0c5ce7b4dbe8bd422d9" + }, + { + "path": "app/language/stitch.domain/lexicon.toml", + "sha256": "6b9d7544b96a6c0bbeacb5dd9972377ffa4f9ef23dffc92eb191bd90e39cc98d" + }, + { + "path": "app/lean-toolchain", + "sha256": "8e3538e0ab5f81a3ee04927d8838c8c674e0e112838b4b3ce87ec218143276af" + }, + { + "path": "app/lexlean.lock", + "sha256": "49b1b7b79ca4f74e69f8bfb775e4a12de98c6bb13364288a61e413a6289fd21c" + }, + { + "path": "app/lexlean.toml", + "sha256": "db033709d967898d0bf4430ea2e9283f174a8532342e4e8e8d356ba2b5a9404f" + }, + { + "path": "app/prism.toml", + "sha256": "5445be94ddceff0efdf9492eab20e7746ba7b3533ae4853607c7b72a185b18c9" + }, + { + "path": "app/prismpm.toml", + "sha256": "9469bbd2a7dd5d844f0e2d0b83b931b4a988f24d21e03f5ee9433fcab1ebe02e" + }, + { + "path": "app/src/Foundation/Arch.lex.tex", + "sha256": "efb3f79f7f956463305800e76b5bfa197d0dc885ae5aca7d40436223cff3eda9" + }, + { + "path": "app/src/Foundation/Bytes.lex.tex", + "sha256": "ce16e5b439128db3231979381f4599d3ff0617f62c2bf00c348bba35393abcd6" + }, + { + "path": "app/src/Foundation/Experience/V1/Model.lex.tex", + "sha256": "fc7d2edf2c123de2232ed8166db425721696219e7454a36113eb41867e99b813" + }, + { + "path": "app/src/Foundation/Qual.lex.tex", + "sha256": "f1dbfafde6cb4d7262b12371699be38a9683fa7525a9519eb856d74f01b3ee81" + }, + { + "path": "app/src/Foundation/Sec.lex.tex", + "sha256": "a58632af4038e6e046aae1848f4c64d89fc497cfbbdb53be2a576358a1f977aa" + }, + { + "path": "app/src/Foundation/View/Text/V1/Model.lex.tex", + "sha256": "db124343ad8fe1295bc8eb305c7f59f83cf6ad76d46a5cabea500fe66f3ad5dc" + }, + { + "path": "app/src/Product/Architecture.lex.tex", + "sha256": "198c55dae057fff7e5530027fd2449f86260cc58056ba4fc00c7b99734ececdc" + }, + { + "path": "app/src/Product/Brand.lex.tex", + "sha256": "a06984fa4753d236c8b874a70bf0aca1bc064ad8944a5ce27ac84f1135559578" + }, + { + "path": "app/src/Product/Compliance.lex.tex", + "sha256": "ee1cf13e35d64e467075ef7bff835dca1d7d5370bde59e19f82a2daf487f40e6" + }, + { + "path": "app/src/Product/Design.lex.tex", + "sha256": "38da1916ac695cda70170df7d99734e59386e6626d67e08a7c2d795ac95b34cc" + }, + { + "path": "app/src/Product/Experience.lex.tex", + "sha256": "6f2625fdce3d3d51899cabc17ce3d57ec0a9381dd3bf3e6477da6ae3ccfb84bd" + }, + { + "path": "app/src/Product/Features.lex.tex", + "sha256": "d5b7bdf070d493f617f8ce48de3757ff6bcddc17e8c115ea52c0dc44197e5726" + }, + { + "path": "app/src/Product/Host.lex.tex", + "sha256": "3bb2a621868dc683e776c9b65c58cc60cc2b89e5d007d54c4c152bedd4878871" + }, + { + "path": "app/src/Product/Model.lex.tex", + "sha256": "3017e652d02156eca68bc00cbb3cdfb54cebcfe290a3b9463493d9326da399f8" + }, + { + "path": "app/src/Product/Persistence.lex.tex", + "sha256": "0f651a6022c345e155563c42137dc0541b3cf9e8c7953caccaa73c9a0a3755cd" + }, + { + "path": "app/src/Product/Quality.lex.tex", + "sha256": "568af2bafa27a50917dfffac0de44c9b83f05069c2ef8f961ff70071d0f07785" + }, + { + "path": "app/src/Product/Release.lex.tex", + "sha256": "7aaaf03ef70e259f7af42eb52e87f6828d0ae5ba249e94b59d510db45f4a92e9" + }, + { + "path": "app/src/Product/Security.lex.tex", + "sha256": "4eb9b799086128e191af7c5dbe44da2d4ffd95938e61591cc43fb47a95dfc0fc" + }, + { + "path": "app/src/Product/Users.lex.tex", + "sha256": "7baf71e758f17479e3a1459b7892fa4bcaacc07887f426f86ce05167c169c1d6" + }, + { + "path": "app/src/Production/ThreatModel.lex.tex", + "sha256": "649bd4a4531915fd1dc9449a37f4022380d79261907378e136257df50ac4c1bc" + }, + { + "path": "app/src/Stitch/Authority.lex.tex", + "sha256": "10afc7af1503f08fe7806dbab24d93f565f34370e3b7d18135f48297e64ee573" + }, + { + "path": "app/src/Stitch/Budget.lex.tex", + "sha256": "581ae188297e3e03e69869a3cfbcdae9554706e007cbeb238d97c8ad30229911" + }, + { + "path": "app/src/Stitch/ChannelFlow.lex.tex", + "sha256": "7f4356ddd38fc94b32a2d6af237ce7382c34bdc7db43c8e8d6ab94cd94fc3e63" + }, + { + "path": "app/src/Stitch/Compute.lex.tex", + "sha256": "ef0f1b8dcf15a8ff26a206b7bd8fa51736bb54ae14e7b6e71a4296deeb4528b7" + }, + { + "path": "app/src/Stitch/Custody.lex.tex", + "sha256": "e9084ba97058adfd3017e634215af1dee12d89c4ff0d409a4271f05387d8d663" + }, + { + "path": "app/src/Stitch/Effects.lex.tex", + "sha256": "7ccc2c30cca7df663541ceece0c85226f921160f56f4ec681703a8d5b589263b" + }, + { + "path": "app/src/Stitch/Encoding.lex.tex", + "sha256": "75b412ab0ed56dea3aa41cc77705fb6233991ea1c2e600a7cf509c3b84e5a95f" + }, + { + "path": "app/src/Stitch/Evidence.lex.tex", + "sha256": "39011e1cf70295427f716d328b1ab754242d3667f0e70a8a48dffa735465c79e" + }, + { + "path": "app/src/Stitch/Fragments.lex.tex", + "sha256": "5cd8d0602cbe501ae4ffc5c18dde17fc6e5766d930ac1d9277545d1ef8d88b83" + }, + { + "path": "app/src/Stitch/Identity.lex.tex", + "sha256": "c4c159234e1623b8f339e86cf47da55c89d197bf21fe334bd893f575ba053870" + }, + { + "path": "app/src/Stitch/Observation.lex.tex", + "sha256": "fe3205a68576d8c7d82f86b45b78f8b6c8b49a873f00c448cccb2eb459749ae8" + }, + { + "path": "app/src/Stitch/Pointer.lex.tex", + "sha256": "10239748c402cdadfc36b150a7a103dfe5124d81fa27bb276575810470c89c46" + }, + { + "path": "app/src/Stitch/PrismId.lex.tex", + "sha256": "1d3d73a831097b3cc6897b94e191d38b52902496b18951e2c188055e0897f935" + }, + { + "path": "app/src/Stitch/Recovery.lex.tex", + "sha256": "4a29e91526ffd1c5aa9fcfc8d990ca1b89d5129813742d9ae55e688eeb6a9121" + }, + { + "path": "app/src/Stitch/Relay.lex.tex", + "sha256": "26a3b5c7f8af3cb058800716a5b73111adbe0188436ae1ad87e1a0e6ce118a03" + }, + { + "path": "app/src/Stitch/Signaling.lex.tex", + "sha256": "97bdfb5160e41a4ed3ab30788f2e3a558836f622c237e4bd3496536212b330c9" + }, + { + "path": "app/src/Stitch/System.lex.tex", + "sha256": "b05a639514a2c56f40b8e960c6cf31023aec8b20d1c18c5ed68a0a936a9d7119" + }, + { + "path": "app/src/Stitch/VmAdministration.lex.tex", + "sha256": "4c27a3a3d1b3650aa78d8fe22b6f07a7335d7e9ec58969ad50f7ad9294f30f81" + }, + { + "path": "app/src/StitchApp.lex.tex", + "sha256": "ffd8a4b6b9072b27b06d67d61e1c11d085a6b82e84be4610f27f3805d87f675b" + }, + { + "path": "docs/architecture.png", + "sha256": "3d0d3a502855ef76f43a0f362445fc15dc9148398bb6d9fb064e5644ee761f3f" + }, + { + "path": "docs/architecture.puml", + "sha256": "a1bd9dd01a5785d355517cad04d2f033fbc45c7ef02319c17299a621f674bf35" + }, + { + "path": "docs/architecture.svg", + "sha256": "7f0c7099173c42d64e59e4c85d4550d5a4517f4905a75419afc2cd61bcd61307" + }, + { + "path": "docs/authenticated-signaling.md", + "sha256": "fe052f6e80d800c60bedfce5ed7eecaa7cf8cf03feff4bdc995ccb26ec108e2c" + }, + { + "path": "docs/browser-authority.md", + "sha256": "642c15248bd22ef2de107c9ca1e1b9dcecc24bb5ac8b59b78b14b98c6995a3c9" + }, + { + "path": "docs/canonical-json.md", + "sha256": "d8f1bc75cd67bd6a3aa02f83b9cfd0aec767a9d17538f996062cc2428614061c" + }, + { + "path": "docs/channel-flow.md", + "sha256": "f6489ca61b4889a32b3927ae9bbf9bf0fa91b4c61cfb3b25c3f41c1890f6c843" + }, + { + "path": "docs/complete-prism.md", + "sha256": "438ef79a0daa808d708b33316353d4ef1caa47906a151b7c605757ed750fbcb4" + }, + { + "path": "docs/dns-client.md", + "sha256": "437c5ca3543e8c0f2ec5eec895b81e68960223372aa574674f429b254f0b39c1" + }, + { + "path": "docs/evidence/native-candidate-466/README.md", + "sha256": "53fbb8bf98b02ef293c49195ec2a26a1b58717a76dea9f07fe307ad890064ec9" + }, + { + "path": "docs/evidence/native-candidate-466/SHA256SUMS", + "sha256": "923167a1cd8e0cefc9ad0582dbfe4ea171fe53c6cd885965eea4223f508aa850" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/README.txt", + "sha256": "2c11cc903ada3522d60681b2a0afbe22ccd7d5267cca78300654ca6ac688fa53" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/artifact.json", + "sha256": "4be6e17d2e2cc720e42cae9456ba3a7f4cd4526e0bd1c43526813c9fb4cae48b" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/lean-toolchain", + "sha256": "8e3538e0ab5f81a3ee04927d8838c8c674e0e112838b4b3ce87ec218143276af" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/lean-version.txt", + "sha256": "c8a20b27c959a259477cf5176ac00f36f9eb94f71bbc68b6745e9c2159f20970" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/lexlean.sha256", + "sha256": "108892b177299a457cd3dfc9058c52abdf1fd79172c43c4020ea817f4bed61c9" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/rt03-success.txt", + "sha256": "4ae64ac5dc4f595ef8ffd63e4b48231bd8ba972a949e5eac0182257e8408921f" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/rt03.log", + "sha256": "7ed1e0ac881493fd6dbbe3ce96c5f743f933dda86d08654d1d69cdcc242c205d" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/rust-toolchain.toml", + "sha256": "24a5037a8f0a264369ef37bb46e019ade6c524beaead1c28f77a429f856a066b" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/rust-version.txt", + "sha256": "b2bdf493bcf6d1dc55181a0efc2774b6d9cf7bf5c8dcc5bed592c994b2ad38c4" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/source-commit.txt", + "sha256": "de9ccef885b037ae49c80d4796c10d6799e6e199bf0b419bc85a9305e4c113bd" + }, + { + "path": "docs/evidence/native-candidate-466/compiler/source-tree.txt", + "sha256": "f34bb2dc2662961e6f2978f459a851bf1bda81000e7ee24e9f1e4c0b9a409295" + }, + { + "path": "docs/evidence/native-candidate-466/stitch-placement/build.log", + "sha256": "f031f036a83aec6a519748edb9b05f74bedf26fb67ef4f9194af86ed44638748" + }, + { + "path": "docs/evidence/native-candidate-466/stitch-placement/generated-native-inputs.json", + "sha256": "1c945d16dcb9cf3974a94244ff46fef923b8526e7988869af24a5bb90bd55406" + }, + { + "path": "docs/evidence/native-candidate-466/stitch-placement/lakefile.toml", + "sha256": "39ffa560a90f946f8eb06470336eaa6e04b2f2bc4e1df1fc48748f58fcf02430" + }, + { + "path": "docs/evidence/native-candidate-466/stitch-placement/native-result.json", + "sha256": "d36093311fa7e1a54ea40e5f8d2179a7424b05bef40ef27d309cdb36c1b7ef8a" + }, + { + "path": "docs/evidence/native-candidate-466/stitch-placement/native.log", + "sha256": "64532247e7c18692438f6bc085ca479683cbb7999ce6ab91998fa0e2d9ab1f91" + }, + { + "path": "docs/evidence/native-candidate-466/stitch-placement/source-provenance.json", + "sha256": "e76c0f14afe57cc134a22244be871c493397750faa53da28675c339a42da330e" + }, + { + "path": "docs/evidence/native-candidate-466/stitch/build.log", + "sha256": "d3b733785f18a99c6c0fc1136d95440e31b3985880d73d660d60cba6c604eed3" + }, + { + "path": "docs/evidence/native-candidate-466/stitch/generated-native-inputs.json", + "sha256": "56a22b9240738adea4258695fd44713aa30123778eec3f41d37fdf963c7250c0" + }, + { + "path": "docs/evidence/native-candidate-466/stitch/lakefile.toml", + "sha256": "39ffa560a90f946f8eb06470336eaa6e04b2f2bc4e1df1fc48748f58fcf02430" + }, + { + "path": "docs/evidence/native-candidate-466/stitch/native-result.json", + "sha256": "f6bd0e7353ce6bf0e9379cbb699ac0638d64bc4f593beae1b06a232007568182" + }, + { + "path": "docs/evidence/native-candidate-466/stitch/native.log", + "sha256": "2055e63823a3b8ee792d505c141a8838bab25d511a84a7d6c0a6a031edc29d4f" + }, + { + "path": "docs/evidence/native-candidate-466/stitch/remote-app-comparison.json", + "sha256": "56c8f918b8ee1f4ef4151a7bf67526186bce4eabbf9d97104379ebd05dd20d63" + }, + { + "path": "docs/evidence/native-candidate-466/stitch/source-provenance.json", + "sha256": "fa387bc7599aac2b77405bb6e68addc6f577538386ed812d3c493b403246f15d" + }, + { + "path": "docs/evidence/native-candidate-466/stitch/verify.log", + "sha256": "9dd1cf6293306829b0d7983531417ec7e216b7ece8c2baa32b1df33a12702743" + }, + { + "path": "docs/evidence/native-candidate-466/template/build.log", + "sha256": "520a9b41e0925ab3429c98df99ab767f9e63846b90a8a4b4c4bac00871fb7076" + }, + { + "path": "docs/evidence/native-candidate-466/template/generated-native-inputs.json", + "sha256": "2d7484d7290810bcb09824c6ea6d866ba8dee0bb15459e7a7b08d1b8baa056a8" + }, + { + "path": "docs/evidence/native-candidate-466/template/lakefile.toml", + "sha256": "9ddc8f1d505f324a5e882683c3f62ac98568d3808d66d855921565a034f8baec" + }, + { + "path": "docs/evidence/native-candidate-466/template/native-result.json", + "sha256": "c783d874b3b8352220ef6d20ce20122fde6af979d89812b58c0df8a6a3e0bb7e" + }, + { + "path": "docs/evidence/native-candidate-466/template/native.log", + "sha256": "992722340b1cd248d607dc556620e978123341cdb7f720ed919a7ed5e20696af" + }, + { + "path": "docs/evidence/native-candidate-466/template/source-provenance.json", + "sha256": "ef2685deccfa24a2087cecabb137af37b7dc3e15d6e82235b99dd6a53e846eef" + }, + { + "path": "docs/evidence/native-candidate-466/template/verify.log", + "sha256": "2863faed2cb0fe32bb71f495b594963cbe2f525eba7d08ad6449637a8e5de804" + }, + { + "path": "docs/evidence/native-fixture-writer-466/README.md", + "sha256": "b669e5114b48e8662620610015fe3225661c3d87d203b81e115a0e8e18142402" + }, + { + "path": "docs/evidence/native-fixture-writer-466/README.txt", + "sha256": "8041d5cc77fee7a94d64588556b3a3cec287a2ace34af2ce0fda84e3dd15ef8f" + }, + { + "path": "docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/artifacts.json", + "sha256": "37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570" + }, + { + "path": "docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/command.json", + "sha256": "9e1ee2607766df4009cf8f23918fc1ea61a17bd4975c7bfbd55d12843e6f8e1b" + }, + { + "path": "docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/diagnostics.json", + "sha256": "daf6c392ca007ccc5e0d2524491b9c47fa84c38f7b71412f42a1326491e8b0d1" + }, + { + "path": "docs/evidence/native-fixture-writer-466/certificate-resource-exhausted/hashes.toml", + "sha256": "f093ae564fe37f143e4137ee3494b33b20ab8c3446448833f8dcc11a6d1b5ab7" + }, + { + "path": "docs/evidence/native-fixture-writer-466/changed-paths.txt", + "sha256": "45fea5f0e5692b496c1c7ea974b4277a758d95edd70158c92d7dabd579fc392b" + }, + { + "path": "docs/evidence/native-fixture-writer-466/generated-fixtures.patch", + "sha256": "2ef531eafba91a6c0a27f6c2c42cfa3845a61a3552876165d4f1f953655c47a8" + }, + { + "path": "docs/evidence/native-fixture-writer-466/lean-version.txt", + "sha256": "c8a20b27c959a259477cf5176ac00f36f9eb94f71bbc68b6745e9c2159f20970" + }, + { + "path": "docs/evidence/native-fixture-writer-466/preservation-drift/artifacts.json", + "sha256": "37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570" + }, + { + "path": "docs/evidence/native-fixture-writer-466/preservation-drift/command.json", + "sha256": "63f28680a9a084d5a6987e0a1af80e0dd91e1eee73a9dc84f9d212467dfa6650" + }, + { + "path": "docs/evidence/native-fixture-writer-466/preservation-drift/diagnostics.json", + "sha256": "f09ac081407dd4c451b26c5db700fb2d03d9f7ca44087f59f5fb7e49b2a85123" + }, + { + "path": "docs/evidence/native-fixture-writer-466/preservation-drift/hashes.toml", + "sha256": "f093ae564fe37f143e4137ee3494b33b20ab8c3446448833f8dcc11a6d1b5ab7" + }, + { + "path": "docs/evidence/native-fixture-writer-466/review.json", + "sha256": "d2f71eb3cb5cfc7eca59c1c9b08300f9932d7e383c05365ae106f7db361b69a7" + }, + { + "path": "docs/evidence/native-fixture-writer-466/rust-version.txt", + "sha256": "b2bdf493bcf6d1dc55181a0efc2774b6d9cf7bf5c8dcc5bed592c994b2ad38c4" + }, + { + "path": "docs/evidence/native-fixture-writer-466/source-commit.txt", + "sha256": "de9ccef885b037ae49c80d4796c10d6799e6e199bf0b419bc85a9305e4c113bd" + }, + { + "path": "docs/evidence/native-fixture-writer-466/source-tree.txt", + "sha256": "f34bb2dc2662961e6f2978f459a851bf1bda81000e7ee24e9f1e4c0b9a409295" + }, + { + "path": "docs/evidence/native-fixture-writer-466/writer.log", + "sha256": "29aface6c13fc58242ee67eb576b501e2e0ac66c60642bee73b774054acee22a" + }, + { + "path": "docs/evidence/source-authoring/5002a66d/budget-audit.process.json", + "sha256": "48bb5972cbb70022d0cfb9d26abbdd6a41e30e50d42d06987faaeacdf1fbce93" + }, + { + "path": "docs/evidence/source-authoring/5002a66d/provenance.json", + "sha256": "89717980cd334d8d435e5be489411b60984814fc5592c6df07eb6595ff15a305" + }, + { + "path": "docs/guest-browser-qualification.md", + "sha256": "b499ce4d9f256fdda2151a26eaad0262da31c53afa77416600c76a2f0bc9eb95" + }, + { + "path": "docs/guest-candidate-evidence.md", + "sha256": "99659d47b48158226691f4f0b28b13aa586b52435c5ecaaa976fba7cb3c865e4" + }, + { + "path": "docs/legacy-benchmarks.md", + "sha256": "0a74e4576b4b0a72db4baeb72c97a139152c0a9f6dc750182448e360404ef6ea" + }, + { + "path": "docs/lifecycle-effects.md", + "sha256": "7205e561aaf22ce66cb06af54a8d82a11c85c0ad6b55bc0821a91004d0750a80" + }, + { + "path": "docs/native-build-diagnosis.md", + "sha256": "21aa6336e4e2e8e802f4567004f013da80b4cf51af7655448fb6549606ec7328" + }, + { + "path": "docs/operator-experience.md", + "sha256": "6385da9f6040a7103cf14d57bf5b109890ca6df0f31e621f57faf0ff8b35ac3f" + }, + { + "path": "docs/prism-id-threat-model.md", + "sha256": "1e57d29089fc844874ad01b758bd379e9d5b9bbfe2d2461cfe2b740697031d94" + }, + { + "path": "docs/prism-id.md", + "sha256": "b1076262092ea2416b282aa81541614cc68c2490de1ac2fd3bbddd9690e86a81" + }, + { + "path": "docs/prism-model.md", + "sha256": "ece338421a27de9e0f588e66badf477eebe3012d194103f14a722db02cec24c7" + }, + { + "path": "docs/product-projection.md", + "sha256": "446c2fcefd1519aa8a60f78115fb3f594ac3329018da3ef432381ea428c2faa1" + }, + { + "path": "docs/reader-experience.md", + "sha256": "16c8aa3480f2b7f2d778f0c621738c5cff3d2c23bb95343e19b6e5a0649e68d1" + }, + { + "path": "docs/recovery.md", + "sha256": "32cb3e8e5579de6e05afd3a716bf97837032ae6efba6dd12748decf9b57cd4db" + }, + { + "path": "docs/relay-framing.md", + "sha256": "eddf3c94dd9eb249aff1a6a5becdcb907ac8d3689a7eae5421f88c1a4f6111db" + }, + { + "path": "docs/standards-and-operations.md", + "sha256": "c08ed9511071ddafb99a420aa2f6d24cb204a1f75d04373335ad6328b3b72d33" + }, + { + "path": "docs/uor-primitives.md", + "sha256": "cd7a1b556424b4c5c8a555fcc741dea1ad859d2232fbf6f80308d9bbdb8d7544" + }, + { + "path": "docs/vendor-provenance.md", + "sha256": "fe73438c181889157487931d6d2501175bf9becdbad5f6977b2edc6751fb986b" + }, + { + "path": "docs/vm-administration.md", + "sha256": "8990baed1a08871cca032f6696646690831dd900abe506d19ad00327e4feb529" + }, + { + "path": "package-lock.json", + "sha256": "2b48cacfb23afb0b149221dfb9f2c9736073f4b6886e6c0d83b9899af0ab4425" + }, + { + "path": "package.json", + "sha256": "4cca578575a541919497c9ed1c517e970b7d820d464c7d594b8f0cb7bd23a3f4" + }, + { + "path": "prismpm.lock", + "sha256": "3773d32926962ef5d2556b74e0df9b34bdaf72353022f3256ebaa04a4ba8db7f" + }, + { + "path": "product/PRISMPM-LICENSE-MIT.txt", + "sha256": "3f96829e754d532a3c70521826693f13ab8303a17b7f715cb2a0811dae867682" + }, + { + "path": "product/THIRD_PARTY_NOTICES.md", + "sha256": "dd7cf6773a8e6a0a72b7a660b347c018295ff6f78207e2e05b97cbf0dcf62055" + }, + { + "path": "product/UORUST-LICENSE-MIT.txt", + "sha256": "b65b82603a4875244eaecc241d1666217ae7d9f8bf4ad3e7b1ac88d8888126ee" + }, + { + "path": "product/facet-lexicon-provenance.json", + "sha256": "20091b50de617c8404ccb364cfde20643057483726f0be9d31986f37e3503703" + }, + { + "path": "product/facet-type-provenance.json", + "sha256": "762d96e1eee560017b209db19e97bb9b858773713687a33d86213df93ccc075b" + }, + { + "path": "product/facets.json", + "sha256": "f81960421693f2ae67368e5e182a7239096051c170a71cc499aa6a49c7ba963f" + }, + { + "path": "product/source-attestation.json", + "sha256": "727ce4b68f1f7e2578795943687cd20fdb70cdbcefc5e4fd907cd95f711438b5" + }, + { + "path": "product/source-build-manifest.json", + "sha256": "246e3132266f021406950abc6d299b5177447cae090d1ec58142b3a1cac03e7b" + }, + { + "path": "product/source-verification.json", + "sha256": "818c21291b0cd20b0718cb69311d2946bb24dde575e2260f80d37a0a2781e038" + }, + { + "path": "scripts/author-source.sh", + "sha256": "a4ec9f5e6fd230c4c0ffae999a696ac15ea7f37f5f686db6dc8884a7d924a935" + }, + { + "path": "scripts/check-facets.mjs", + "sha256": "4ccdee319cf9cec4066570e2bae311dfd0828a29891e88bc2ea2e6bc445bee51" + }, + { + "path": "scripts/check-model-sdk.sh", + "sha256": "b7f48fc7581a1e05756b89d24402a67d07dd47e6f625260939eb77f533666db9" + }, + { + "path": "scripts/check-model-tests.mjs", + "sha256": "80bd66d371132fc6ced20221ac575fbcbb0fedf6ea99ade166687a7ae251f4e0" + }, + { + "path": "scripts/check-model.mjs", + "sha256": "7aacb22c351ee9b032b5ee4236a26f85aad3504e1fac34d77b11af4116bfe297" + }, + { + "path": "scripts/check-product.mjs", + "sha256": "63f6d356456b89c13a17b017b0a6d4fb2b2ba43e126b2d98b5dd059fabf83829" + }, + { + "path": "scripts/check-source-evidence.mjs", + "sha256": "a2d2603da47ebe4b25565aeed353b493a3c11b01b204c26b09a6939f72804605" + }, + { + "path": "scripts/compute-budget-model-tests.mjs", + "sha256": "788819519d3e728ccc1d1b8c779b61f7990eef219a6c1b01a743c73d1c907c7b" + }, + { + "path": "scripts/facet-projection.mjs", + "sha256": "d593102403e1c48a1a3a03cbffc2f73c401b7bf328c7c3e77d790af57c715634" + }, + { + "path": "scripts/retain-authoring-evidence.mjs", + "sha256": "01e1c9441ed61830a59e1fcbc5fb19cd46d570d9b2489c08145dc13057affa54" + }, + { + "path": "scripts/retain-source-evidence.mjs", + "sha256": "42a137177fef361209b013fcc93fee31364e3a405783cdb69efaa9aa0f1ba6e1" + }, + { + "path": "scripts/verify-custody.py", + "sha256": "74320148df0bd1649c036ffd12c8eb07e58aba4d1ed4716421bf9bf615d7e8c4" + }, + { + "path": "scripts/verify-prism-id-vectors.py", + "sha256": "c7b1445eb8d5f03f680668fa8492815ea2ad78d53c6b57658c222dfeaaab1d68" + }, + { + "path": "site/facets.json", + "sha256": "43a22311882a332a56b5545b4f6a34517fc1ad8535eeb7989be1b7114cfa01f5" + }, + { + "path": "standards.lock", + "sha256": "54448d21cb1ed3a4af826aa44991e9839b51d97b8975a5b125927c78af922b46" + }, + { + "path": "tests/authenticated-signaling.test.js", + "sha256": "58263f698373030cd4c20007b1c0b0e9dc8b781558a7366f1acd32decdfe6d5f" + }, + { + "path": "tests/authority-ui.test.js", + "sha256": "d0f986cc126047f3b269dc47509c5ade56a5bfa2e6cf30ee62906a527326cc7d" + }, + { + "path": "tests/browser-authority-lifecycle.test.js", + "sha256": "6d8f3f41ddf18e5c42615e39e72f2965a39dddc5136f8d6388af5fe396d785b9" + }, + { + "path": "tests/browser-authority.test.js", + "sha256": "e49b0285c9a1706e73b2e56686f6db8061c91914e2a70dd74654349b43e53c0d" + }, + { + "path": "tests/browser-transport.test.js", + "sha256": "03ad63e3bf2d6ae38e7974d3c4ad311e9ec986f5f16cd6e1c5b8daba824a9c20" + }, + { + "path": "tests/browser/README.md", + "sha256": "71b9461f3d2e778a79063ef80ae1fe1c7b4587611ca579b105dc5d45142b7b99" + }, + { + "path": "tests/browser/authority.spec.mjs", + "sha256": "6e6bd7264dc80bea62459381d27998dc399655f874a36a481daf0bd94af88be2" + }, + { + "path": "tests/browser/fixtures.mjs", + "sha256": "d74678417a8eff93c96f8a0e6379579d64db3f6e386eb1cf8869996fcf2a7a33" + }, + { + "path": "tests/browser/harness.html", + "sha256": "7fbd411b0b2a242cf21fb64407f30a1f28bdb022d8bb7fa7e421731229ba8426" + }, + { + "path": "tests/browser/mesh.spec.mjs", + "sha256": "5c77135433b1a26adc59e12a4aefeb9258e2622fcc533a4fccd558a5bada62f1" + }, + { + "path": "tests/browser/playwright.config.mjs", + "sha256": "27c50d1f941f7ca424b0bba895cbcddb9ab3974e5d5a115f1ae6f993715add62" + }, + { + "path": "tests/browser/product.spec.mjs", + "sha256": "72a3fc4a27924903ee4552b823c21261838788237cff67379125be7e1f2c0432" + }, + { + "path": "tests/browser/site.spec.mjs", + "sha256": "973145fcf6ad6d5e645a9492f811e28cb3297a1c50d2f4629e15e1da7844cc71" + }, + { + "path": "tests/browser/vm-peer.spec.mjs", + "sha256": "df952d18207b6e9b0076ee69f17c5c46523b17407a42caa7f8a7e253b91e1edb" + }, + { + "path": "tests/browser/vm.spec.mjs", + "sha256": "198cf744f3651923a35f6f9c9a0eccf5e710bf7907b06a46b41d294ef936278c" + }, + { + "path": "tests/canonical-json.test.js", + "sha256": "927ca86d48dcabef1e376e2244c448672ae845653bf4afd7388b794228d562ab" + }, + { + "path": "tests/channel-flow.test.js", + "sha256": "2227b07981249cad2ec97107b679abc49120724307a2f948e1a47b7dff9dbe1b" + }, + { + "path": "tests/connection-measurement.test.js", + "sha256": "a99094ae05df7aab4486c62497570ff04d991bb9b7d701ec85526b0a4b82b4c6" + }, + { + "path": "tests/contracts.test.js", + "sha256": "f1ac995b74ceabd230e670476016796ca18c31ad43c0639ddfb700aba52dde60" + }, + { + "path": "tests/custody.test.js", + "sha256": "7d688bec8a34729197bae605daacd4b3efeedb0e901b8af31322925bd0717329" + }, + { + "path": "tests/dns-json.test.js", + "sha256": "063a4bbd04afd5b55bf632cfffd8d001c1fd58d5e0375a63f49b50837bbd5f51" + }, + { + "path": "tests/dns-publication.test.js", + "sha256": "02fe2e5e85a715481cd11b55534dffe42b7f27305f63f1fb3bdb03815225d98c" + }, + { + "path": "tests/dns-wire.test.js", + "sha256": "fadc7ec69c92e0e8ee24cdb827d840b1b3d0f6fabb7ab6379155dc394e30817a" + }, + { + "path": "tests/effects-model.test.js", + "sha256": "a4d038dd2bdd750c7dc5dc6cc95b01e9e43ee919a067210c65baa567f9c8af31" + }, + { + "path": "tests/execution-identity.test.js", + "sha256": "cd680245065fa6be6ed51fc77324022c29938298f3f53c76b67fc36415e55a56" + }, + { + "path": "tests/fixtures/custody-vectors.json", + "sha256": "5d067a14d0e302df0a5ab7a65903b737d4c50200192d29c32e015ae03bd43cc3" + }, + { + "path": "tests/fixtures/prism-id-vectors.json", + "sha256": "24c80cd1d42cf8dee4c26b3e99c925ea63a7a93119372616b22527494a359f12" + }, + { + "path": "tests/guest-qualification.test.js", + "sha256": "47bfb6d3a8c050f8dae63c33d5ad65e7b32e9a6195e197d0a2b3af2d963b0f0b" + }, + { + "path": "tests/helpers/transactional-authority.js", + "sha256": "04af94680fb0a5d1225856f3e0afb997bd0a9c6dfc52e379f95e3b732a644cfc" + }, + { + "path": "tests/helpers/vm-filesystem.js", + "sha256": "803e2583fcfaa3656e34f5a80335673d610edc77f2a2c49d3453a7714698bee1" + }, + { + "path": "tests/operator-ui.test.js", + "sha256": "06ffd0c89d0ba6345b7da56284d3a3cec813d4cfd6fea231140ca9bb910e516f" + }, + { + "path": "tests/placement-repair.test.js", + "sha256": "295ba55268bbcb3be7bd3c9b77a11b4938167ef0bebf83b85facedd536e1ad85" + }, + { + "path": "tests/pointer-recovery.test.js", + "sha256": "57eb8bab548b1e0f5cd4ee66a3a71dda8057859f18ecf4c751fbd930b4ac0fc4" + }, + { + "path": "tests/primitive-operations.test.js", + "sha256": "e3c00e18d47db0de4dd19bffeba1edcb58f82b106f8f66d429a725248ec14a98" + }, + { + "path": "tests/prism-bus.test.js", + "sha256": "37d02bfcf831de90c9651f84f95a6fa745a3605bbb449ec242a27530a0c50dde" + }, + { + "path": "tests/prism-id.test.js", + "sha256": "ade2eb4cfca393f21034c974a315c560e4bc7b2f87e4cafa9c37dc0280556aa9" + }, + { + "path": "tests/prism-replay.test.js", + "sha256": "ebd67c105fe741c83cb75f358961b784778dbbec4678cc387ad21053f05157f9" + }, + { + "path": "tests/product-experience.test.js", + "sha256": "a519f9b5c014eada46bd6c016be966c7fbe6f84971ac9408185c89422f68439b" + }, + { + "path": "tests/product-facets.test.js", + "sha256": "0219469047bd8cf22e6b71b6a6797606eaa9ff065a61ad078de36a9f662a1629" + }, + { + "path": "tests/product-inventory.test.js", + "sha256": "3458fb1d20262f6faa1025cd2f6f0b02a1465d51ec03f766ba9cd2931df74794" + }, + { + "path": "tests/product-model.test.js", + "sha256": "fd91398d31af63b605e9dbc9f2b6b103ad4821df1cd55aba077648fabfba80e2" + }, + { + "path": "tests/recovery-ui.test.js", + "sha256": "a93ff048397a6ca64c20962d03df68ba1012cfb2b0769897c1d58eec25a929fc" + }, + { + "path": "tests/recovery.test.js", + "sha256": "da7f23c8411b4adc63fffa602351ad3ecd0999909717c48bf91aeb21bc5f9d11" + }, + { + "path": "tests/relay-framing.test.js", + "sha256": "566cf74aef84b7da5702ad20ce6f71796359db78d898dfef529f130a64deaecc" + }, + { + "path": "tests/run_all.js", + "sha256": "0b31f4bd4f4468651599ba5c6091b25d464c8a33f80a236563c6002bf4410d28" + }, + { + "path": "tests/runtime-admission.test.js", + "sha256": "684901ac8a287078f86958f414d3d514e910cd44fa6f6be1b80cd6435c4c3404" + }, + { + "path": "tests/site-explorer.test.js", + "sha256": "83cbd8bdf511a211a3e4c83ee2e41f34f16f1c021019cecbf0d4bf35622eec45" + }, + { + "path": "tests/source-authoring.test.js", + "sha256": "23368c2dce248f3f9d8083e5c5be09c86d91cd82a0c8f976cbb6e56584b96808" + }, + { + "path": "tests/source-evidence.test.js", + "sha256": "5e6f783768f076e1fc037803d87595eb78c34a358fc5d6119a48c5f5e6107a49" + }, + { + "path": "tests/transport-generation.test.js", + "sha256": "4787ce02dd406ff86055e4aa18c77a760045456772e2b9f78a8f34fc11cb9eec" + }, + { + "path": "tests/vm-administration.test.js", + "sha256": "db3a943b140e27bf10d8da74140b6359e6570f490eaafe2ddb9d4f492aa566b4" + }, + { + "path": "tests/vm-lifecycle.test.js", + "sha256": "3864bbceb02efb69ac55ef37c4944c02677b12aabfce57ee50f3914fd0df20af" + }, + { + "path": "tests/vm-v86-boundary.test.js", + "sha256": "33c454d6588c96542345629d7caeee17a4c7bb9c9bc31edc8e192f4f75823b49" + }, + { + "path": "vendor/distribution.json", + "sha256": "02263c2d4bf1a1913a673466554c19593b5a6c39b22a2da32ce4375675868347" + } + ], + "sourceDigest": "sha256:6df26232d612c8f74579999e58483c020829afb29253e6174c54cf348a07b92c" +} diff --git a/product/facet-lexicon-provenance.json b/product/facet-lexicon-provenance.json new file mode 100644 index 0000000..85ee51c --- /dev/null +++ b/product/facet-lexicon-provenance.json @@ -0,0 +1,79 @@ +{ + "format": "stitch/facet-lexicon-provenance/1", + "repository": "https://github.com/UOR-Foundation/PrismPM", + "revision": "f657782e5f0936f73b983f2f21758b63620dfffc", + "license": "MIT; exact upstream notice retained in product/PRISMPM-LICENSE-MIT.txt.", + "method": "Official prism.qual@1.0.0 and prism.sec@1.0.0 lexicons copied verbatim; no dependency, SDK, standards, type, or proof changes.", + "files": [ + { + "path": "app/language/prism.qual/entries/qual-characteristic.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.qual/entries/qual-characteristic.toml", + "sha256": "88c99bf5804a200ea5d42c4937567ffc9469f0a500967d7db077ebc31b1c60ca" + }, + { + "path": "app/language/prism.qual/entries/qual-measure.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.qual/entries/qual-measure.toml", + "sha256": "304e8b84739e034eee5635801b02044d16522e82e53a54e4af173c0dcf929d09" + }, + { + "path": "app/language/prism.qual/entries/qual-requirement.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.qual/entries/qual-requirement.toml", + "sha256": "85a2d7dec43320aa24ee3e0e3706035d94bcdf38613c0c56d44f46c194e29fa6" + }, + { + "path": "app/language/prism.qual/entries/qual-subcharacteristic.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.qual/entries/qual-subcharacteristic.toml", + "sha256": "3e7ae6099226785e401b3bcba2c2a508b705b17cb7c33673e8f6c6be8b4aec9f" + }, + { + "path": "app/language/prism.qual/lexicon.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.qual/lexicon.toml", + "sha256": "a79fae9a81e748c01f19a48dd066b0dedd356c05b791bd8bc8e7ce20d44cb335" + }, + { + "path": "app/language/prism.sec/entries/sec-activity.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.sec/entries/sec-activity.toml", + "sha256": "a9d8f0369b33d332d58fc5155bf26fe73573d94dae627624d1c02922028fe6c5" + }, + { + "path": "app/language/prism.sec/entries/sec-asset.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.sec/entries/sec-asset.toml", + "sha256": "11ad482bdceffcb5413351d40566221e6ae06bd08731a27d04ad66cb8038fafb" + }, + { + "path": "app/language/prism.sec/entries/sec-control.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.sec/entries/sec-control.toml", + "sha256": "2079014db65e604290d9b5b09cd9fbd63da084a4cd082e39dd4c2836ac9e9192" + }, + { + "path": "app/language/prism.sec/entries/sec-impact.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.sec/entries/sec-impact.toml", + "sha256": "2dcf1b527613d7d4c11f477c23f5f10fd7181a7f315dfb87c8585d1b3c28827b" + }, + { + "path": "app/language/prism.sec/entries/sec-likelihood.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.sec/entries/sec-likelihood.toml", + "sha256": "36ffd259c2d5598cd18dab6e1d023910712c7fe86f1e0b7fcebae106084954cb" + }, + { + "path": "app/language/prism.sec/entries/sec-measurement.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.sec/entries/sec-measurement.toml", + "sha256": "2e5ff2c76971922d6321ae4ae6eeb29330d14cab2efb363ab0d10ebc5c95e400" + }, + { + "path": "app/language/prism.sec/entries/sec-risk.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.sec/entries/sec-risk.toml", + "sha256": "f2a6d3dbee6dab80f208394fcdfb50eccb1185ae46ad9e2a31eb057b33a36b72" + }, + { + "path": "app/language/prism.sec/entries/sec-threat.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.sec/entries/sec-threat.toml", + "sha256": "a9b2201976bb336399d5ba4456a32c60263101b9accbbdbf8d9361e3c3175c21" + }, + { + "path": "app/language/prism.sec/lexicon.toml", + "source": "https://github.com/UOR-Foundation/PrismPM/blob/f657782e5f0936f73b983f2f21758b63620dfffc/language/prism.sec/lexicon.toml", + "sha256": "d9b9663715d38c6d181becc8d433e3c3636b55d7ef97bd1f3d39688222925f7c" + } + ] +} diff --git a/product/facet-type-provenance.json b/product/facet-type-provenance.json new file mode 100644 index 0000000..1f2605d --- /dev/null +++ b/product/facet-type-provenance.json @@ -0,0 +1,46 @@ +{ + "format": "stitch/facet-type-provenance/1", + "license": "MIT; upstream PrismPM notice retained in product/PRISMPM-LICENSE-MIT.txt; UORust source copyright/license notices reproduced in product/UORUST-LICENSE-MIT.txt.", + "types": [ + { + "path": "app/src/Foundation/Arch.lex.tex", + "source": "https://github.com/afflom/UORust/blob/1d531dfe0120d1cbdac2dd599f6cde513118f0ce/app/src/Foundation/Arch.lex.tex", + "sourceSha256": "ac98d00c82c37d523361ef2fa01419e796c359b74c4a87ac39d53d4821aa80d8", + "derivedSha256": "efb3f79f7f956463305800e76b5bfa197d0dc885ae5aca7d40436223cff3eda9", + "method": "Type declarations only, preserving each structure/inductive verbatim; examples, instances and proofs omitted; title Boolean uses builtin vocabulary.", + "declarations": 29 + }, + { + "path": "app/src/Foundation/Sec.lex.tex", + "source": "https://github.com/afflom/UORust/blob/1d531dfe0120d1cbdac2dd599f6cde513118f0ce/app/src/Foundation/Sec.lex.tex", + "sourceSha256": "f49c249319cc411f24a73722998bc6ec93b81851625ce6c5a914f528750214e5", + "derivedSha256": "a58632af4038e6e046aae1848f4c64d89fc497cfbbdb53be2a576358a1f977aa", + "method": "Type declarations only, preserving each structure/inductive verbatim; examples, instances and proofs omitted; title Boolean uses builtin vocabulary.", + "declarations": 8 + }, + { + "path": "app/src/Foundation/Qual.lex.tex", + "source": "https://github.com/afflom/UORust/blob/1d531dfe0120d1cbdac2dd599f6cde513118f0ce/app/src/Foundation/Qual.lex.tex", + "sourceSha256": "a50a9591f4227994e44a64f01ba565da7abb87b9c40ddc13b3e69025c9b7ec50", + "derivedSha256": "f1dbfafde6cb4d7262b12371699be38a9683fa7525a9519eb856d74f01b3ee81", + "method": "Type declarations only, preserving each structure/inductive verbatim; examples, instances and proofs omitted; title Boolean uses builtin vocabulary.", + "declarations": 4 + }, + { + "path": "app/src/Production/ThreatModel.lex.tex", + "source": "https://github.com/afflom/UORust/blob/1d531dfe0120d1cbdac2dd599f6cde513118f0ce/app/src/Production/ThreatModel.lex.tex", + "sourceSha256": "bc6acde21335954805485e15c86d9f35178dceda8563d1dabdc062dcff6acc29", + "derivedSha256": "649bd4a4531915fd1dc9449a37f4022380d79261907378e136257df50ac4c1bc", + "method": "Type declarations only, preserving each structure/inductive verbatim; examples, instances and proofs omitted; title Boolean uses builtin vocabulary.", + "declarations": 10 + }, + { + "path": "app/src/Foundation/Experience/V1/Model.lex.tex", + "source": "https://github.com/afflom/UORust/blob/1d531dfe0120d1cbdac2dd599f6cde513118f0ce/app/src/Foundation/Experience/V1/Model.lex.tex", + "sourceSha256": "06894027e36989253657731d2cdb88c04c1be2893d506a9335fee101988f0629", + "derivedSha256": "fc7d2edf2c123de2232ed8166db425721696219e7454a36113eb41867e99b813", + "method": "Type declarations only, preserving each structure/inductive verbatim; examples, instances and proofs omitted; title Boolean uses builtin vocabulary.", + "declarations": 15 + } + ] +} diff --git a/product/facets.json b/product/facets.json new file mode 100644 index 0000000..2d78521 --- /dev/null +++ b/product/facets.json @@ -0,0 +1,3145 @@ +{ + "format": "stitch/product-facets/1", + "assurance": "Source-derived product inventory and obligations, not a verification receipt or whole-product certificate.", + "sourceConvention": "Source firstLine=0,lastLine=0 means SHA-256 of the complete UTF-8 file bytes, not a precise source span.", + "references": [ + "https://github.com/afflom/UORust/blob/1d531dfe0120d1cbdac2dd599f6cde513118f0ce/scripts/self-model/facets.py", + "https://github.com/afflom/prism-devrel/blob/7b6c54bb6e34f3b970f70d50127ab520367b84ac/scripts/experience/experience.py" + ], + "sources": [ + { + "path": ".github/workflows/prism.yml", + "sha256": "4fe595efda75eabd6d81db25b87a44d0d3fa186deb37b1c50b040095f488d093" + }, + { + "path": "app/language/prism.qual/entries/qual-characteristic.toml", + "sha256": "88c99bf5804a200ea5d42c4937567ffc9469f0a500967d7db077ebc31b1c60ca" + }, + { + "path": "app/language/prism.qual/entries/qual-measure.toml", + "sha256": "304e8b84739e034eee5635801b02044d16522e82e53a54e4af173c0dcf929d09" + }, + { + "path": "app/language/prism.qual/entries/qual-requirement.toml", + "sha256": "85a2d7dec43320aa24ee3e0e3706035d94bcdf38613c0c56d44f46c194e29fa6" + }, + { + "path": "app/language/prism.qual/entries/qual-subcharacteristic.toml", + "sha256": "3e7ae6099226785e401b3bcba2c2a508b705b17cb7c33673e8f6c6be8b4aec9f" + }, + { + "path": "app/language/prism.qual/lexicon.toml", + "sha256": "a79fae9a81e748c01f19a48dd066b0dedd356c05b791bd8bc8e7ce20d44cb335" + }, + { + "path": "app/language/prism.sec/entries/sec-activity.toml", + "sha256": "a9d8f0369b33d332d58fc5155bf26fe73573d94dae627624d1c02922028fe6c5" + }, + { + "path": "app/language/prism.sec/entries/sec-asset.toml", + "sha256": "11ad482bdceffcb5413351d40566221e6ae06bd08731a27d04ad66cb8038fafb" + }, + { + "path": "app/language/prism.sec/entries/sec-control.toml", + "sha256": "2079014db65e604290d9b5b09cd9fbd63da084a4cd082e39dd4c2836ac9e9192" + }, + { + "path": "app/language/prism.sec/entries/sec-impact.toml", + "sha256": "2dcf1b527613d7d4c11f477c23f5f10fd7181a7f315dfb87c8585d1b3c28827b" + }, + { + "path": "app/language/prism.sec/entries/sec-likelihood.toml", + "sha256": "36ffd259c2d5598cd18dab6e1d023910712c7fe86f1e0b7fcebae106084954cb" + }, + { + "path": "app/language/prism.sec/entries/sec-measurement.toml", + "sha256": "2e5ff2c76971922d6321ae4ae6eeb29330d14cab2efb363ab0d10ebc5c95e400" + }, + { + "path": "app/language/prism.sec/entries/sec-risk.toml", + "sha256": "f2a6d3dbee6dab80f208394fcdfb50eccb1185ae46ad9e2a31eb057b33a36b72" + }, + { + "path": "app/language/prism.sec/entries/sec-threat.toml", + "sha256": "a9b2201976bb336399d5ba4456a32c60263101b9accbbdbf8d9361e3c3175c21" + }, + { + "path": "app/language/prism.sec/lexicon.toml", + "sha256": "d9b9663715d38c6d181becc8d433e3c3636b55d7ef97bd1f3d39688222925f7c" + }, + { + "path": "app/lexlean.toml", + "sha256": "db033709d967898d0bf4430ea2e9283f174a8532342e4e8e8d356ba2b5a9404f" + }, + { + "path": "app/src/Foundation/Arch.lex.tex", + "sha256": "efb3f79f7f956463305800e76b5bfa197d0dc885ae5aca7d40436223cff3eda9" + }, + { + "path": "app/src/Foundation/Experience/V1/Model.lex.tex", + "sha256": "fc7d2edf2c123de2232ed8166db425721696219e7454a36113eb41867e99b813" + }, + { + "path": "app/src/Foundation/Qual.lex.tex", + "sha256": "f1dbfafde6cb4d7262b12371699be38a9683fa7525a9519eb856d74f01b3ee81" + }, + { + "path": "app/src/Foundation/Sec.lex.tex", + "sha256": "a58632af4038e6e046aae1848f4c64d89fc497cfbbdb53be2a576358a1f977aa" + }, + { + "path": "app/src/Product/Architecture.lex.tex", + "sha256": "198c55dae057fff7e5530027fd2449f86260cc58056ba4fc00c7b99734ececdc" + }, + { + "path": "app/src/Product/Experience.lex.tex", + "sha256": "6f2625fdce3d3d51899cabc17ce3d57ec0a9381dd3bf3e6477da6ae3ccfb84bd" + }, + { + "path": "app/src/Product/Model.lex.tex", + "sha256": "3017e652d02156eca68bc00cbb3cdfb54cebcfe290a3b9463493d9326da399f8" + }, + { + "path": "app/src/Production/ThreatModel.lex.tex", + "sha256": "649bd4a4531915fd1dc9449a37f4022380d79261907378e136257df50ac4c1bc" + }, + { + "path": "app/src/Stitch/Effects.lex.tex", + "sha256": "7ccc2c30cca7df663541ceece0c85226f921160f56f4ec681703a8d5b589263b" + }, + { + "path": "app/src/Stitch/PrismId.lex.tex", + "sha256": "1d3d73a831097b3cc6897b94e191d38b52902496b18951e2c188055e0897f935" + }, + { + "path": "docs/authenticated-signaling.md", + "sha256": "fe052f6e80d800c60bedfce5ed7eecaa7cf8cf03feff4bdc995ccb26ec108e2c" + }, + { + "path": "docs/browser-authority.md", + "sha256": "642c15248bd22ef2de107c9ca1e1b9dcecc24bb5ac8b59b78b14b98c6995a3c9" + }, + { + "path": "docs/canonical-json.md", + "sha256": "d8f1bc75cd67bd6a3aa02f83b9cfd0aec767a9d17538f996062cc2428614061c" + }, + { + "path": "docs/dns-client.md", + "sha256": "437c5ca3543e8c0f2ec5eec895b81e68960223372aa574674f429b254f0b39c1" + }, + { + "path": "docs/lifecycle-effects.md", + "sha256": "7205e561aaf22ce66cb06af54a8d82a11c85c0ad6b55bc0821a91004d0750a80" + }, + { + "path": "docs/operator-experience.md", + "sha256": "6385da9f6040a7103cf14d57bf5b109890ca6df0f31e621f57faf0ff8b35ac3f" + }, + { + "path": "docs/prism-id-threat-model.md", + "sha256": "1e57d29089fc844874ad01b758bd379e9d5b9bbfe2d2461cfe2b740697031d94" + }, + { + "path": "docs/prism-model.md", + "sha256": "ece338421a27de9e0f588e66badf477eebe3012d194103f14a722db02cec24c7" + }, + { + "path": "docs/product-projection.md", + "sha256": "446c2fcefd1519aa8a60f78115fb3f594ac3329018da3ef432381ea428c2faa1" + }, + { + "path": "docs/recovery.md", + "sha256": "32cb3e8e5579de6e05afd3a716bf97837032ae6efba6dd12748decf9b57cd4db" + }, + { + "path": "docs/relay-framing.md", + "sha256": "eddf3c94dd9eb249aff1a6a5becdcb907ac8d3689a7eae5421f88c1a4f6111db" + }, + { + "path": "docs/uor-primitives.md", + "sha256": "cd7a1b556424b4c5c8a555fcc741dea1ad859d2232fbf6f80308d9bbdb8d7544" + }, + { + "path": "docs/vendor-provenance.md", + "sha256": "fe73438c181889157487931d6d2501175bf9becdbad5f6977b2edc6751fb986b" + }, + { + "path": "docs/vm-administration.md", + "sha256": "8990baed1a08871cca032f6696646690831dd900abe506d19ad00327e4feb529" + }, + { + "path": "index.html", + "sha256": "b8e573b5b50c533114532ef4a6f851efc1508082c3a42d2d1002e20f22400801" + }, + { + "path": "package.json", + "sha256": "4cca578575a541919497c9ed1c517e970b7d820d464c7d594b8f0cb7bd23a3f4" + }, + { + "path": "product/facet-lexicon-provenance.json", + "sha256": "20091b50de617c8404ccb364cfde20643057483726f0be9d31986f37e3503703" + }, + { + "path": "product/facet-type-provenance.json", + "sha256": "762d96e1eee560017b209db19e97bb9b858773713687a33d86213df93ccc075b" + }, + { + "path": "product/PRISMPM-LICENSE-MIT.txt", + "sha256": "3f96829e754d532a3c70521826693f13ab8303a17b7f715cb2a0811dae867682" + }, + { + "path": "product/UORUST-LICENSE-MIT.txt", + "sha256": "b65b82603a4875244eaecc241d1666217ae7d9f8bf4ad3e7b1ac88d8888126ee" + }, + { + "path": "scripts/check-facets.mjs", + "sha256": "4ccdee319cf9cec4066570e2bae311dfd0828a29891e88bc2ea2e6bc445bee51" + }, + { + "path": "scripts/check-product.mjs", + "sha256": "63f6d356456b89c13a17b017b0a6d4fb2b2ba43e126b2d98b5dd059fabf83829" + }, + { + "path": "scripts/facet-projection.mjs", + "sha256": "d593102403e1c48a1a3a03cbffc2f73c401b7bf328c7c3e77d790af57c715634" + }, + { + "path": "site/catalog.js", + "sha256": "b72eea8eafcd5a8a9d996c1b78619ca9d113fd530e82c39baade83fee0b28f36" + }, + { + "path": "site/explorer.js", + "sha256": "72b1e0d06485e235429601ff640772aff4565002a37290454fd08fd40c0a1b79" + }, + { + "path": "site/site.css", + "sha256": "67332d156b7bfdbb212bef731374bec91f11d376aa938f45be07944fe2490dd9" + }, + { + "path": "src/authority-ui.js", + "sha256": "96e76a92918a52dff05780b76f59158916540fd38d1ced986fd6001d3ee1482b" + }, + { + "path": "src/layer1-uor/browser-authority.js", + "sha256": "3b9ba8d4a23fbe056358791d4e2d5ad377faf5a9a3cc2ac3d2dc1c3906087d09" + }, + { + "path": "src/layer1-uor/pointer.js", + "sha256": "99cce36bc7a981536e1c6df22956b5c34db9689ccc377b0e808b09502d5f09fc" + }, + { + "path": "src/layer2-schedulers/policy.js", + "sha256": "8f2074f8fe07a7b1fda51896d78f11a797564afb64accebc7291261e5c00639f" + }, + { + "path": "src/layer3-storage/custody.js", + "sha256": "70ec7500e9a1aea0a2f383344bebea4acbe410c3aff76ccadd8869feaac24aee" + }, + { + "path": "src/layer3-storage/index.js", + "sha256": "905067fe5ebac2f6a6cb2cdda29e37265409f3e7a5e4b786e9e18e21bc4af676" + }, + { + "path": "src/layer4-compute/replay.js", + "sha256": "112653100e2ea57c6b732e64dbc2086fd5237eb2129fe255cb5627498494f1d3" + }, + { + "path": "src/layer4-compute/vm-administration.js", + "sha256": "2a307a700e38dfb7f38af4a5cfc3207e3d2b274b6c89b943e6b17add424376bc" + }, + { + "path": "src/recovery.js", + "sha256": "89c7b3abcd713ee1c2131d6a841a94526f59c0a6118ac09834a2e6cf43c3a2c0" + }, + { + "path": "tests/authenticated-signaling.test.js", + "sha256": "58263f698373030cd4c20007b1c0b0e9dc8b781558a7366f1acd32decdfe6d5f" + }, + { + "path": "tests/authority-ui.test.js", + "sha256": "d0f986cc126047f3b269dc47509c5ade56a5bfa2e6cf30ee62906a527326cc7d" + }, + { + "path": "tests/browser-authority-lifecycle.test.js", + "sha256": "6d8f3f41ddf18e5c42615e39e72f2965a39dddc5136f8d6388af5fe396d785b9" + }, + { + "path": "tests/browser-authority.test.js", + "sha256": "e49b0285c9a1706e73b2e56686f6db8061c91914e2a70dd74654349b43e53c0d" + }, + { + "path": "tests/browser/authority.spec.mjs", + "sha256": "6e6bd7264dc80bea62459381d27998dc399655f874a36a481daf0bd94af88be2" + }, + { + "path": "tests/browser/mesh.spec.mjs", + "sha256": "5c77135433b1a26adc59e12a4aefeb9258e2622fcc533a4fccd558a5bada62f1" + }, + { + "path": "tests/browser/site.spec.mjs", + "sha256": "973145fcf6ad6d5e645a9492f811e28cb3297a1c50d2f4629e15e1da7844cc71" + }, + { + "path": "tests/browser/vm.spec.mjs", + "sha256": "198cf744f3651923a35f6f9c9a0eccf5e710bf7907b06a46b41d294ef936278c" + }, + { + "path": "tests/canonical-json.test.js", + "sha256": "927ca86d48dcabef1e376e2244c448672ae845653bf4afd7388b794228d562ab" + }, + { + "path": "tests/contracts.test.js", + "sha256": "f1ac995b74ceabd230e670476016796ca18c31ad43c0639ddfb700aba52dde60" + }, + { + "path": "tests/custody.test.js", + "sha256": "7d688bec8a34729197bae605daacd4b3efeedb0e901b8af31322925bd0717329" + }, + { + "path": "tests/dns-publication.test.js", + "sha256": "02fe2e5e85a715481cd11b55534dffe42b7f27305f63f1fb3bdb03815225d98c" + }, + { + "path": "tests/dns-wire.test.js", + "sha256": "fadc7ec69c92e0e8ee24cdb827d840b1b3d0f6fabb7ab6379155dc394e30817a" + }, + { + "path": "tests/execution-identity.test.js", + "sha256": "cd680245065fa6be6ed51fc77324022c29938298f3f53c76b67fc36415e55a56" + }, + { + "path": "tests/guest-qualification.test.js", + "sha256": "47bfb6d3a8c050f8dae63c33d5ad65e7b32e9a6195e197d0a2b3af2d963b0f0b" + }, + { + "path": "tests/operator-ui.test.js", + "sha256": "06ffd0c89d0ba6345b7da56284d3a3cec813d4cfd6fea231140ca9bb910e516f" + }, + { + "path": "tests/placement-repair.test.js", + "sha256": "295ba55268bbcb3be7bd3c9b77a11b4938167ef0bebf83b85facedd536e1ad85" + }, + { + "path": "tests/pointer-recovery.test.js", + "sha256": "57eb8bab548b1e0f5cd4ee66a3a71dda8057859f18ecf4c751fbd930b4ac0fc4" + }, + { + "path": "tests/primitive-operations.test.js", + "sha256": "e3c00e18d47db0de4dd19bffeba1edcb58f82b106f8f66d429a725248ec14a98" + }, + { + "path": "tests/prism-id.test.js", + "sha256": "ade2eb4cfca393f21034c974a315c560e4bc7b2f87e4cafa9c37dc0280556aa9" + }, + { + "path": "tests/product-experience.test.js", + "sha256": "a519f9b5c014eada46bd6c016be966c7fbe6f84971ac9408185c89422f68439b" + }, + { + "path": "tests/product-facets.test.js", + "sha256": "0219469047bd8cf22e6b71b6a6797606eaa9ff065a61ad078de36a9f662a1629" + }, + { + "path": "tests/product-model.test.js", + "sha256": "fd91398d31af63b605e9dbc9f2b6b103ad4821df1cd55aba077648fabfba80e2" + }, + { + "path": "tests/recovery.test.js", + "sha256": "da7f23c8411b4adc63fffa602351ad3ecd0999909717c48bf91aeb21bc5f9d11" + }, + { + "path": "tests/relay-framing.test.js", + "sha256": "566cf74aef84b7da5702ad20ce6f71796359db78d898dfef529f130a64deaecc" + }, + { + "path": "tests/runtime-admission.test.js", + "sha256": "684901ac8a287078f86958f414d3d514e910cd44fa6f6be1b80cd6435c4c3404" + }, + { + "path": "tests/site-explorer.test.js", + "sha256": "83cbd8bdf511a211a3e4c83ee2e41f34f16f1c021019cecbf0d4bf35622eec45" + }, + { + "path": "tests/source-evidence.test.js", + "sha256": "5e6f783768f076e1fc037803d87595eb78c34a358fc5d6119a48c5f5e6107a49" + }, + { + "path": "tests/transport-generation.test.js", + "sha256": "4787ce02dd406ff86055e4aa18c77a760045456772e2b9f78a8f34fc11cb9eec" + }, + { + "path": "tests/vm-administration.test.js", + "sha256": "db3a943b140e27bf10d8da74140b6359e6570f490eaafe2ddb9d4f492aa566b4" + }, + { + "path": "tests/vm-lifecycle.test.js", + "sha256": "3864bbceb02efb69ac55ef37c4944c02677b12aabfce57ee50f3914fd0df20af" + }, + { + "path": "vendor/distribution.json", + "sha256": "02263c2d4bf1a1913a673466554c19593b5a6c39b22a2da32ce4375675868347" + } + ], + "modules": [ + { + "module": "Product.Features", + "path": "app/src/Product/Features.lex.tex", + "records": 55, + "sourcePaths": [ + "app/src/Product/Experience.lex.tex", + "docs/prism-model.md", + "docs/product-projection.md", + "index.html", + "site/catalog.js", + "site/explorer.js", + "src/authority-ui.js", + "tests/authenticated-signaling.test.js", + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/browser/authority.spec.mjs", + "tests/browser/mesh.spec.mjs", + "tests/browser/site.spec.mjs", + "tests/browser/vm.spec.mjs", + "tests/contracts.test.js", + "tests/custody.test.js", + "tests/dns-publication.test.js", + "tests/execution-identity.test.js", + "tests/operator-ui.test.js", + "tests/placement-repair.test.js", + "tests/pointer-recovery.test.js", + "tests/primitive-operations.test.js", + "tests/product-facets.test.js", + "tests/product-model.test.js", + "tests/recovery.test.js", + "tests/runtime-admission.test.js", + "tests/site-explorer.test.js", + "tests/source-evidence.test.js", + "tests/transport-generation.test.js", + "tests/vm-administration.test.js", + "tests/vm-lifecycle.test.js" + ], + "declarations": 148, + "sha256": "d5b7bdf070d493f617f8ce48de3757ff6bcddc17e8c115ea52c0dc44197e5726" + }, + { + "module": "Product.Design", + "path": "app/src/Product/Design.lex.tex", + "records": 115, + "sourcePaths": [ + "app/src/Product/Architecture.lex.tex", + "app/src/Product/Model.lex.tex", + "app/src/Stitch/Effects.lex.tex", + "docs/lifecycle-effects.md", + "docs/prism-model.md", + "src/layer1-uor/pointer.js", + "src/layer2-schedulers/policy.js", + "src/layer3-storage/index.js" + ], + "declarations": 118, + "sha256": "38da1916ac695cda70170df7d99734e59386e6626d67e08a7c2d795ac95b34cc" + }, + { + "module": "Product.Security", + "path": "app/src/Product/Security.lex.tex", + "records": 252, + "sourcePaths": [ + "app/src/Product/Architecture.lex.tex", + "app/src/Product/Model.lex.tex", + "docs/authenticated-signaling.md", + "docs/browser-authority.md", + "docs/lifecycle-effects.md", + "docs/prism-id-threat-model.md", + "docs/prism-model.md", + "docs/recovery.md", + "docs/relay-framing.md", + "docs/uor-primitives.md", + "docs/vendor-provenance.md", + "docs/vm-administration.md", + "package.json", + "tests/authenticated-signaling.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/custody.test.js", + "tests/dns-publication.test.js", + "tests/execution-identity.test.js", + "tests/guest-qualification.test.js", + "tests/prism-id.test.js", + "tests/recovery.test.js", + "tests/relay-framing.test.js", + "tests/runtime-admission.test.js", + "tests/source-evidence.test.js", + "tests/vm-administration.test.js" + ], + "declarations": 255, + "sha256": "4eb9b799086128e191af7c5dbe44da2d4ffd95938e61591cc43fb47a95dfc0fc" + }, + { + "module": "Product.Quality", + "path": "app/src/Product/Quality.lex.tex", + "records": 44, + "sourcePaths": [ + "app/src/Product/Architecture.lex.tex", + "app/src/Product/Experience.lex.tex", + "docs/browser-authority.md", + "docs/prism-model.md", + "scripts/check-facets.mjs", + "src/layer4-compute/replay.js", + "tests/browser-authority-lifecycle.test.js", + "tests/dns-publication.test.js", + "tests/execution-identity.test.js", + "tests/primitive-operations.test.js", + "tests/product-experience.test.js", + "tests/product-facets.test.js", + "tests/runtime-admission.test.js" + ], + "declarations": 48, + "sha256": "568af2bafa27a50917dfffac0de44c9b83f05069c2ef8f961ff70071d0f07785" + }, + { + "module": "Product.Brand", + "path": "app/src/Product/Brand.lex.tex", + "records": 1, + "sourcePaths": [ + "index.html", + "package.json", + "site/site.css" + ], + "declarations": 8, + "sha256": "a06984fa4753d236c8b874a70bf0aca1bc064ad8944a5ce27ac84f1135559578" + }, + { + "module": "Product.Users", + "path": "app/src/Product/Users.lex.tex", + "records": 1, + "sourcePaths": [ + "app/src/Product/Architecture.lex.tex", + "app/src/Product/Experience.lex.tex", + "docs/operator-experience.md" + ], + "declarations": 16, + "sha256": "7baf71e758f17479e3a1459b7892fa4bcaacc07887f426f86ce05167c169c1d6" + }, + { + "module": "Product.Persistence", + "path": "app/src/Product/Persistence.lex.tex", + "records": 8, + "sourcePaths": [ + "docs/browser-authority.md", + "docs/recovery.md", + "src/layer1-uor/browser-authority.js", + "src/layer2-schedulers/policy.js", + "src/layer3-storage/custody.js", + "src/layer4-compute/replay.js", + "src/layer4-compute/vm-administration.js", + "src/recovery.js", + "tests/browser-authority.test.js", + "tests/dns-publication.test.js", + "tests/execution-identity.test.js", + "tests/placement-repair.test.js", + "tests/pointer-recovery.test.js", + "tests/recovery.test.js", + "tests/runtime-admission.test.js", + "tests/vm-administration.test.js" + ], + "declarations": 18, + "sha256": "0f651a6022c345e155563c42137dc0541b3cf9e8c7953caccaa73c9a0a3755cd" + }, + { + "module": "Product.Release", + "path": "app/src/Product/Release.lex.tex", + "records": 38, + "sourcePaths": [ + ".github/workflows/prism.yml", + "app/src/Product/Model.lex.tex", + "docs/product-projection.md", + "docs/vendor-provenance.md", + "package.json", + "vendor/distribution.json" + ], + "declarations": 46, + "sha256": "7aaaf03ef70e259f7af42eb52e87f6828d0ae5ba249e94b59d510db45f4a92e9" + }, + { + "module": "Product.Compliance", + "path": "app/src/Product/Compliance.lex.tex", + "records": 12, + "sourcePaths": [ + ".github/workflows/prism.yml", + "app/src/Product/Architecture.lex.tex", + "docs/browser-authority.md", + "docs/canonical-json.md", + "docs/dns-client.md", + "docs/product-projection.md", + "docs/vendor-provenance.md", + "scripts/check-facets.mjs", + "scripts/check-product.mjs", + "tests/browser-authority-lifecycle.test.js", + "tests/canonical-json.test.js", + "tests/dns-wire.test.js", + "tests/guest-qualification.test.js", + "tests/product-facets.test.js" + ], + "declarations": 17, + "sha256": "ee1cf13e35d64e467075ef7bff835dca1d7d5370bde59e19f82a2daf487f40e6" + } + ], + "operatorActionCount": 31, + "features": [ + { + "id": "join", + "declaration": "Product.Features::featureJoin", + "control": "reconnectBtn", + "journey": "mesh", + "label": "Join Mesh and Sync", + "acceptance": [ + "tests/authenticated-signaling.test.js", + "tests/transport-generation.test.js", + "tests/browser/mesh.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionJoin" + }, + { + "id": "store", + "declaration": "Product.Features::featureStore", + "control": "dbPutBtn", + "journey": "objects", + "label": "Store and Request Placement", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionStore" + }, + { + "id": "clear", + "declaration": "Product.Features::featureClear", + "control": "dbWipeLocalBtn", + "journey": "objects", + "label": "Clear Local Object Bytes", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionClear" + }, + { + "id": "recover", + "declaration": "Product.Features::featureRecover", + "control": "dbSyncBtn", + "journey": "objects", + "label": "Fetch Reachable Fragments", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionRecover" + }, + { + "id": "start", + "declaration": "Product.Features::featureStart", + "control": "startJobBtn", + "journey": "compute", + "label": "Start Pure Replayable Job", + "acceptance": [ + "tests/execution-identity.test.js", + "tests/primitive-operations.test.js", + "tests/runtime-admission.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionStart" + }, + { + "id": "resume", + "declaration": "Product.Features::featureResume", + "control": "takeoverJobsBtn", + "journey": "compute", + "label": "Scan and Resume Pure Jobs", + "acceptance": [ + "tests/execution-identity.test.js", + "tests/primitive-operations.test.js", + "tests/runtime-admission.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionResume" + }, + { + "id": "boot", + "declaration": "Product.Features::featureBoot", + "control": "bootVmBtn", + "journey": "vm", + "label": "Boot Linux VM", + "acceptance": [ + "tests/vm-lifecycle.test.js", + "tests/vm-administration.test.js", + "tests/browser/vm.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionBoot" + }, + { + "id": "execute", + "declaration": "Product.Features::featureExecute", + "control": "runVmCmdBtn", + "journey": "vm", + "label": "Run Guest Command and Store Stdout", + "acceptance": [ + "tests/vm-lifecycle.test.js", + "tests/vm-administration.test.js", + "tests/browser/vm.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionExecute" + }, + { + "id": "srv", + "declaration": "Product.Features::featureSrv", + "control": "resolveSrvBtn", + "journey": "pointers", + "label": "Discover SRV Records", + "acceptance": [ + "tests/dns-publication.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/browser/authority.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionSrv" + }, + { + "id": "txt", + "declaration": "Product.Features::featureTxt", + "control": "resolveTxtBtn", + "journey": "pointers", + "label": "Discover and Check TXT Pointers", + "acceptance": [ + "tests/dns-publication.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/browser/authority.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionTxt" + }, + { + "id": "pin", + "declaration": "Product.Features::featurePin", + "control": "pinSessionAuthorityBtn", + "journey": "pointers", + "label": "Trust Saved Key or Create Session Key", + "acceptance": [ + "tests/dns-publication.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/browser/authority.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionPin" + }, + { + "id": "admit", + "declaration": "Product.Features::featureAdmit", + "control": "admitPointerBtn", + "journey": "pointers", + "label": "Admit Pasted Pointer", + "acceptance": [ + "tests/dns-publication.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/browser/authority.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionAdmit" + }, + { + "id": "publish", + "declaration": "Product.Features::featurePublish", + "control": "writeSignedDnsBtn", + "journey": "pointers", + "label": "Admit Next Pointer and Publish TXT", + "acceptance": [ + "tests/dns-publication.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/browser/authority.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionPublish" + }, + { + "id": "reconcile", + "declaration": "Product.Features::featureReconcile", + "control": "reconcilePointerBtn", + "journey": "pointers", + "label": "Reconcile Unknown Publication", + "acceptance": [ + "tests/dns-publication.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/browser/authority.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionReconcile" + }, + { + "id": "renew", + "declaration": "Product.Features::featureRenew", + "control": "renewBudgetBtn", + "journey": "resources", + "label": "Start New Epoch with These Limits", + "acceptance": [ + "tests/runtime-admission.test.js", + "tests/operator-ui.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionRenew" + }, + { + "id": "export", + "declaration": "Product.Features::featureExport", + "control": "exportBudgetHistoryBtn", + "journey": "resources", + "label": "Export Policy History", + "acceptance": [ + "tests/runtime-admission.test.js", + "tests/operator-ui.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionExport" + }, + { + "id": "RecoveryExport", + "declaration": "Product.Features::featureRecoveryExport", + "control": "exportRecoveryBtn", + "journey": "objects", + "label": "Export Live Evidence", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionRecoveryExport" + }, + { + "id": "RecoveryImport", + "declaration": "Product.Features::featureRecoveryImport", + "control": "importRecoveryBtn", + "journey": "objects", + "label": "Verify and Import Locally", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionRecoveryImport" + }, + { + "id": "RecoverySave", + "declaration": "Product.Features::featureRecoverySave", + "control": "exportRecoveredBtn", + "journey": "objects", + "label": "Export Recovery Vault", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionRecoverySave" + }, + { + "id": "RecoveryDownload", + "declaration": "Product.Features::featureRecoveryDownload", + "control": "downloadRecoveredObjectBtn", + "journey": "objects", + "label": "Download Verified Object", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionRecoveryDownload" + }, + { + "id": "RecoveryFinish", + "declaration": "Product.Features::featureRecoveryFinish", + "control": "resumeRecoveredJobBtn", + "journey": "objects", + "label": "Finish Pure Job Locally", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionRecoveryFinish" + }, + { + "id": "RecoveryTrust", + "declaration": "Product.Features::featureRecoveryTrust", + "control": "acceptRecoveryAnchorBtn", + "journey": "objects", + "label": "Accept Exact Recent Anchor", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionRecoveryTrust" + }, + { + "id": "VmStop", + "declaration": "Product.Features::featureVmStop", + "control": "stopVmBtn", + "journey": "vm", + "label": "Stop VM", + "acceptance": [ + "tests/vm-lifecycle.test.js", + "tests/vm-administration.test.js", + "tests/browser/vm.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionVmStop" + }, + { + "id": "VmDestroy", + "declaration": "Product.Features::featureVmDestroy", + "control": "destroyVmBtn", + "journey": "vm", + "label": "Destroy VM", + "acceptance": [ + "tests/vm-lifecycle.test.js", + "tests/vm-administration.test.js", + "tests/browser/vm.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionVmDestroy" + }, + { + "id": "VmCancel", + "declaration": "Product.Features::featureVmCancel", + "control": "cancelVmObservationBtn", + "journey": "vm", + "label": "Cancel and Stop VM", + "acceptance": [ + "tests/vm-lifecycle.test.js", + "tests/vm-administration.test.js", + "tests/browser/vm.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionVmCancel" + }, + { + "id": "VmReconcile", + "declaration": "Product.Features::featureVmReconcile", + "control": "reconcileVmCommandBtn", + "journey": "vm", + "label": "Observe Selected Command Result", + "acceptance": [ + "tests/vm-lifecycle.test.js", + "tests/vm-administration.test.js", + "tests/browser/vm.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionVmReconcile" + }, + { + "id": "VmForget", + "declaration": "Product.Features::featureVmForget", + "control": "forgetVmCommandBtn", + "journey": "vm", + "label": "Forget Resolved Command Evidence", + "acceptance": [ + "tests/vm-lifecycle.test.js", + "tests/vm-administration.test.js", + "tests/browser/vm.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionVmForget" + }, + { + "id": "saveAuthority", + "declaration": "Product.Features::featureSaveAuthority", + "control": "saveAuthorityBtn", + "journey": "pointers", + "label": "Set Up or Restore Saved Authority", + "acceptance": [ + "tests/dns-publication.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/browser/authority.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionSaveAuthority" + }, + { + "id": "loadPublication", + "declaration": "Product.Features::featureLoadPublication", + "control": "loadPublicationBtn", + "journey": "pointers", + "label": "Load Saved Publication", + "acceptance": [ + "tests/dns-publication.test.js", + "tests/browser-authority-lifecycle.test.js", + "tests/browser/authority.spec.mjs" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionLoadPublication" + }, + { + "id": "RecoveryRestore", + "declaration": "Product.Features::featureRecoveryRestore", + "control": "restoreRecoveryAnchorBtn", + "journey": "objects", + "label": "Restore Accepted Live Head", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionRecoveryRestore" + }, + { + "id": "PlacementRepair", + "declaration": "Product.Features::featurePlacementRepair", + "control": "repairPlacementBtn", + "journey": "objects", + "label": "Repair Selected Placement", + "acceptance": [ + "tests/custody.test.js", + "tests/placement-repair.test.js", + "tests/recovery.test.js", + "tests/pointer-recovery.test.js" + ], + "source": "app/src/Product/Experience.lex.tex", + "sourceDeclaration": "actionPlacementRepair" + }, + { + "id": "LearnProtocol", + "control": "encodeExample", + "journey": "reader", + "label": "Explore exact fragment recovery locally", + "statement": "Change the input, withhold a fragment or alter a byte using the real custody verifier; no mesh or persistence effects.", + "source": "site/explorer.js", + "acceptance": [ + "tests/site-explorer.test.js", + "tests/browser/site.spec.mjs" + ], + "declaration": "Product.Features::featureLearnProtocol", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "InspectFacetSources", + "control": "facetCatalogContent", + "journey": "reviewer", + "label": "Inspect source-derived product facets", + "statement": "Read declaration counts, source links and evidence boundaries without a verification badge.", + "source": "site/catalog.js", + "acceptance": [ + "tests/site-explorer.test.js", + "tests/product-facets.test.js" + ], + "declaration": "Product.Features::featureInspectFacetSources", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "ReviewHostBoundaries", + "control": "docs/product-projection.md", + "journey": "reviewer", + "label": "Review whole-product host and release boundaries", + "statement": "Separate exact-source/native probe results from actual browser, network, VM and provider qualification.", + "source": "docs/product-projection.md", + "acceptance": [ + "tests/source-evidence.test.js", + "tests/product-model.test.js" + ], + "declaration": "Product.Features::featureReviewHostBoundaries", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "ExtendProtocol", + "control": "docs/prism-model.md", + "journey": "integrator", + "label": "Extend source-owned protocol contracts", + "statement": "Locate versioned encoding dependencies, reserve-before-effect limits, replay identity and positive/negative evidence before extending adapters.", + "source": "docs/prism-model.md", + "acceptance": [ + "tests/contracts.test.js", + "tests/execution-identity.test.js", + "tests/product-model.test.js" + ], + "declaration": "Product.Features::featureExtendProtocol", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "InspectAuthorityStorage", + "control": "inspectAuthorityStorageBtn", + "journey": "authority", + "label": "Inspect Origin Storage and Journal", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 0; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featureInspectAuthorityStorage", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "RotateAuthority", + "control": "rotateAuthorityBtn", + "journey": "authority", + "label": "Rotate Saved Signing Key", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 1; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featureRotateAuthority", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "RevokeAuthority", + "control": "revokeAuthorityBtn", + "journey": "authority", + "label": "Revoke Saved Signing Key Locally", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 2; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featureRevokeAuthority", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "SaveTrustedAnchor", + "control": "saveTrustedAnchorBtn", + "journey": "authority", + "label": "Save Current Exact Trust Anchor", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 3; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featureSaveTrustedAnchor", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "RestoreTrustedAnchor", + "control": "restoreTrustedAnchorBtn", + "journey": "authority", + "label": "Restore Saved Head to Current Pin", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 4; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featureRestoreTrustedAnchor", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "MigrateTrustedAnchor", + "control": "migrateTrustedAnchorBtn", + "journey": "authority", + "label": "Migrate Saved Trust to Pasted Anchor", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 5; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featureMigrateTrustedAnchor", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "RevokeTrustedAnchor", + "control": "revokeTrustedAnchorBtn", + "journey": "authority", + "label": "Revoke Saved Trust Locally", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 6; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featureRevokeTrustedAnchor", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "PersistAuthorityStorage", + "control": "persistAuthorityStorageBtn", + "journey": "authority", + "label": "Request Browser Storage Persistence", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 7; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featurePersistAuthorityStorage", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "ExportAuthorityJournal", + "control": "exportAuthorityJournalBtn", + "journey": "authority", + "label": "Export Public Authority Journal", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 8; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featureExportAuthorityJournal", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + }, + { + "id": "CompactAuthorityJournal", + "control": "compactAuthorityJournalBtn", + "journey": "authority", + "label": "Remove Definitely Refused Journal Entries", + "statement": "Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code 9; no new global identity, implicit trust or resolution of unknown effects.", + "source": "src/authority-ui.js", + "acceptance": [ + "tests/authority-ui.test.js", + "tests/browser-authority-lifecycle.test.js" + ], + "declaration": "Product.Features::featureCompactAuthorityJournal", + "sourceDeclaration": "source-bound surface", + "operatorAction": false + } + ], + "journeys": [ + { + "id": "mesh", + "declaration": "Product.Features::journeyMesh", + "title": "Join a mesh", + "summary": "Review public signaling disclosure, join explicitly, then inspect reachable peers.", + "steps": [ + "Product.Features::featureJoin" + ], + "ordering": "Documented operator path; each step retains its own admission guard. Optional/reconciliation steps are not automatic." + }, + { + "id": "objects", + "declaration": "Product.Features::journeyObjects", + "title": "Store, place and recover objects", + "summary": "Separate local integrity from conditional peer custody and actual recovery.", + "steps": [ + "Product.Features::featureStore", + "Product.Features::featurePlacementRepair", + "Product.Features::featureRecoveryExport", + "Product.Features::featureRecoveryImport", + "Product.Features::featureRecoveryDownload" + ], + "ordering": "Documented operator path; each step retains its own admission guard. Optional/reconciliation steps are not automatic." + }, + { + "id": "compute", + "declaration": "Product.Features::journeyCompute", + "title": "Run and resume pure jobs", + "summary": "Replay deterministic checkpoints before continuation; VM effects have a separate contract.", + "steps": [ + "Product.Features::featureStart", + "Product.Features::featureResume" + ], + "ordering": "Documented operator path; each step retains its own admission guard. Optional/reconciliation steps are not automatic." + }, + { + "id": "vm", + "declaration": "Product.Features::journeyVm", + "title": "Inspect host VM effects", + "summary": "Boot and execute only through the observed VM lifecycle. Output integrity does not certify execution.", + "steps": [ + "Product.Features::featureBoot", + "Product.Features::featureExecute", + "Product.Features::featureVmReconcile", + "Product.Features::featureVmStop", + "Product.Features::featureVmDestroy" + ], + "ordering": "Documented operator path; each step retains its own admission guard. Optional/reconciliation steps are not automatic." + }, + { + "id": "pointers", + "declaration": "Product.Features::journeyPointers", + "title": "Pin, discover and publish pointers", + "summary": "Pin authority independently, retain the local head, and reconcile uncertain provider writes.", + "steps": [ + "Product.Features::featureSaveAuthority", + "Product.Features::featurePin", + "Product.Features::featureTxt", + "Product.Features::featureAdmit", + "Product.Features::featurePublish", + "Product.Features::featureLoadPublication", + "Product.Features::featureReconcile" + ], + "ordering": "Documented operator path; each step retains its own admission guard. Optional/reconciliation steps are not automatic." + }, + { + "id": "resources", + "declaration": "Product.Features::journeyResources", + "title": "Inspect and renew allowances", + "summary": "Inspect bounded application charges, export them, and explicitly grant a new epoch.", + "steps": [ + "Product.Features::featureExport", + "Product.Features::featureRenew" + ], + "ordering": "Documented operator path; each step retains its own admission guard. Optional/reconciliation steps are not automatic." + }, + { + "id": "reader", + "actor": "reader", + "declaration": "Product.Features::journeyReader", + "title": "Understand the Stitch protocol", + "summary": "Understand the Stitch protocol. Each operation retains its source-owned consent and evidence boundary.", + "steps": [ + "Product.Features::featureLearnProtocol", + "Product.Features::featureInspectFacetSources" + ], + "ordering": "Explicit user-directed path; operations never run merely because the journey is declared." + }, + { + "id": "reviewer", + "actor": "reviewer", + "declaration": "Product.Features::journeyReviewer", + "title": "Audit evidence and assumptions", + "summary": "Audit evidence and assumptions. Each operation retains its source-owned consent and evidence boundary.", + "steps": [ + "Product.Features::featureInspectFacetSources", + "Product.Features::featureReviewHostBoundaries" + ], + "ordering": "Explicit user-directed path; operations never run merely because the journey is declared." + }, + { + "id": "integrator", + "actor": "systemIntegrator", + "declaration": "Product.Features::journeyIntegrator", + "title": "Extend the protocol safely", + "summary": "Extend the protocol safely. Each operation retains its source-owned consent and evidence boundary.", + "steps": [ + "Product.Features::featureLearnProtocol", + "Product.Features::featureReviewHostBoundaries", + "Product.Features::featureExtendProtocol" + ], + "ordering": "Explicit user-directed path; operations never run merely because the journey is declared." + }, + { + "id": "authority", + "actor": "operator", + "declaration": "Product.Features::journeyAuthority", + "title": "Care for saved identity and trust", + "summary": "Care for saved identity and trust. Each operation retains its source-owned consent and evidence boundary.", + "steps": [ + "Product.Features::featureInspectAuthorityStorage", + "Product.Features::featureSaveTrustedAnchor", + "Product.Features::featureRestoreTrustedAnchor", + "Product.Features::featureExportAuthorityJournal" + ], + "ordering": "Explicit user-directed path; operations never run merely because the journey is declared." + } + ], + "design": { + "components": 19, + "connectors": 34, + "views": [ + { + "id": "viewComponents", + "title": "Five-layer browser component relationships", + "diagram": "umlComponent" + }, + { + "id": "viewObjectProcess", + "title": "Recoverable object process", + "diagram": "opmObjectProcess" + }, + { + "id": "viewPublicationSequence", + "title": "Scoped publication and read-only reconciliation", + "diagram": "umlSequence" + }, + { + "id": "viewPublicationState", + "title": "Unknown writes are never repeated", + "diagram": "umlStateMachine" + } + ], + "states": [ + "Idle", + "Published", + "Refused", + "Unknown" + ], + "transitions": [ + [ + "Idle", + "Unknown", + "BeginWrite" + ], + [ + "Published", + "Unknown", + "BeginWrite" + ], + [ + "Refused", + "Unknown", + "BeginWrite" + ], + [ + "Unknown", + "Published", + "Confirm" + ], + [ + "Unknown", + "Published", + "Reconcile" + ], + [ + "Unknown", + "Refused", + "Refuse" + ], + [ + "Unknown", + "Unknown", + "RetainUnknown" + ] + ] + }, + "security": [ + { + "id": "AuthoritySpoofing", + "asset": "pointerAuthority", + "category": "spoofing", + "likelihood": "high", + "impact": "critical", + "threat": "An arbitrary valid self-signature is mistaken for an independently pinned writer.", + "control": "Exact independently accepted key/name/head; strict successor CAS and revocation gates.", + "evidence": [ + "tests/browser-authority-lifecycle.test.js", + "docs/browser-authority.md" + ], + "proofs": [], + "index": 0, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "CheckpointForgery", + "asset": "compute", + "category": "tampering", + "likelihood": "high", + "impact": "major", + "threat": "A hashed but impossible state is accepted as computation.", + "control": "Replay exact program/input/execution identity before accepting or resuming.", + "evidence": [ + "tests/execution-identity.test.js", + "docs/uor-primitives.md" + ], + "proofs": [], + "index": 1, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "Disclosure", + "asset": "publicRelay", + "category": "informationDisclosure", + "likelihood": "high", + "impact": "major", + "threat": "A mesh topic or relay is mistaken for private storage.", + "control": "Separate public signaling and payload-relay consent; explicit disclosure and no privacy claim.", + "evidence": [ + "tests/relay-framing.test.js", + "docs/relay-framing.md" + ], + "proofs": [], + "index": 2, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "EffectReplay", + "asset": "discovery", + "category": "repudiation", + "likelihood": "medium", + "impact": "major", + "threat": "An unknown DNS write is repeated after restart or key rotation.", + "control": "Strict write-ahead intent and exact read-only reconciliation; unknown journal retention.", + "evidence": [ + "tests/dns-publication.test.js", + "docs/lifecycle-effects.md" + ], + "proofs": [], + "index": 3, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "FragmentTampering", + "asset": "storage", + "category": "tampering", + "likelihood": "high", + "impact": "major", + "threat": "A holder supplies modified, duplicate-index or wrong-manifest bytes.", + "control": "Full domain-separated commitments and exact compatible indexed recovery.", + "evidence": [ + "tests/custody.test.js", + "docs/prism-model.md" + ], + "proofs": [], + "index": 4, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "GuestPrivilege", + "asset": "vm", + "category": "elevationOfPrivilege", + "likelihood": "medium", + "impact": "critical", + "threat": "Guest output is mistaken for trusted execution or broad host authority.", + "control": "Separate VM effects, bounded mounts and explicit lifecycle/command reconciliation.", + "evidence": [ + "tests/vm-administration.test.js", + "docs/vm-administration.md" + ], + "proofs": [], + "index": 5, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "OriginCompromise", + "asset": "browser", + "category": "elevationOfPrivilege", + "likelihood": "medium", + "impact": "critical", + "threat": "Malicious same-origin code can use retained key handles and read local data.", + "control": "Source/asset inventory and origin boundary; nonextractability is not protection from active same-origin code.", + "evidence": [ + "tests/source-evidence.test.js", + "docs/browser-authority.md" + ], + "proofs": [], + "index": 6, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismActionReplay", + "asset": "prismId", + "category": "spoofing", + "likelihood": "high", + "impact": "major", + "threat": "A captured signed action is replayed at the same host or presented to another host.", + "control": "Every action names its audience and carries a nonce; the host refuses a different audience, a seen nonce, or a time outside its window.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::replayedActionRefused", + "Stitch.PrismId::wrongAudienceActionRefused", + "Stitch.PrismId::staleActionRefused" + ], + "index": 7, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismCanonicalDivergence", + "asset": "prismId", + "category": "tampering", + "likelihood": "medium", + "impact": "major", + "threat": "Browser, native, mobile and embedded runtimes canonicalize differently, so kappa labels or signatures disagree and one runtime accepts what another refuses.", + "control": "uor-addr canonical form with explicit refusals (non-NFC, non-integer, ill-formed), published vectors and an independent Python implementation.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [], + "index": 8, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismDelegateOverreach", + "asset": "prismId", + "category": "elevationOfPrivilege", + "likelihood": "medium", + "impact": "major", + "threat": "A delegate device (often embedded and physically exposed) acts outside its scope, reads private content, or administers the prism.", + "control": "Scope checked on every action; a delegate never receives the private boundary and cannot bind or revoke.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::delegateOutsideScopeRefused", + "Stitch.PrismId::delegateNeverReceivesPrivateBoundary", + "Stitch.PrismId::delegateCannotBind" + ], + "index": 9, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismGenesisConfusion", + "asset": "prismId", + "category": "spoofing", + "likelihood": "medium", + "impact": "critical", + "threat": "A forged log presents a different genesis, so a new device or host adopts the wrong prism.", + "control": "prism id is the kappa of exactly one self-signed genesis; the prism id travels out of band in the link offer and every record names it.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::foreignPrismBindRefused" + ], + "index": 10, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismGuardianCollusion", + "asset": "prismId", + "category": "elevationOfPrivilege", + "likelihood": "low", + "impact": "critical", + "threat": "Guardians pool their shares to take over the prism.", + "control": "Shares meet only at the threshold; guardians are other prisms or devices the person chose; a successful recovery is visible to every remaining device as revocations.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::belowThresholdRefused", + "Stitch.PrismId::zeroThresholdRefused" + ], + "index": 11, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismGuardianDeception", + "asset": "prismId", + "category": "spoofing", + "likelihood": "medium", + "impact": "critical", + "threat": "An impostor asks guardians to release shares to the impostor device.", + "control": "A guardian releases a share only re-wrapped to the requesting device after confirming the person out of band and comparing a code bound to that device; one deceived guardian is below the threshold.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::belowThresholdRefused" + ], + "index": 12, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismKeyClaimForgery", + "asset": "prismId", + "category": "spoofing", + "likelihood": "medium", + "impact": "major", + "threat": "A device claims hardware-held keys it does not have to obtain permissions a host reserves for such devices.", + "control": "The protection field is a claim only; admitDevice accepts a hardware-requiring device only when a host-pinned verifier attests hardware protection of exactly that device signing key.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::unattestedDeviceRefusedWhenRequired", + "Stitch.PrismId::attestationForOtherKeyRefused" + ], + "index": 13, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismLinkHijack", + "asset": "prismId", + "category": "spoofing", + "likelihood": "high", + "impact": "critical", + "threat": "Someone who sees, photographs or relays the link QR code answers first and binds their own device to the prism.", + "control": "One-time secret, expiry, single use, and a six-digit code bound to the joining device that the person confirms on both screens.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::unconfirmedLinkRefused", + "Stitch.PrismId::usedOfferRefused", + "Stitch.PrismId::wrongSecretRefused", + "Stitch.PrismId::expiredOfferRefused" + ], + "index": 14, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismLinkability", + "asset": "prismId", + "category": "informationDisclosure", + "likelihood": "medium", + "impact": "major", + "threat": "Hosts or relays correlate one person across services because the same prism id and device keys appear everywhere.", + "control": "Each host sees only its own persona: a separate prism with per-device persona keys; the main prism log travels sealed between members and is never given to a host.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::nonMemberSeesOnlyPublished", + "Stitch.PrismId::singleIdentityBoundaryPrivate" + ], + "index": 15, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismLogFlooding", + "asset": "prismId", + "category": "denialOfService", + "likelihood": "high", + "impact": "major", + "threat": "A peer or relay sends oversized sync messages or very large logs to exhaust memory and signature checks.", + "control": "Byte and record bounds are checked before parsing and signature work; unknown records never become authority.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [], + "index": 16, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismLogTampering", + "asset": "prismId", + "category": "tampering", + "likelihood": "high", + "impact": "major", + "threat": "A relay or peer alters, reorders or injects prism log records.", + "control": "Each record is signed and addressed by the kappa of its envelope; merge is order-independent set union; invalid or foreign records are ignored.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::invalidBindSignatureRefused", + "Stitch.PrismId::unlinkedSignerCannotBind" + ], + "index": 17, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismMutualRevocation", + "asset": "prismId", + "category": "denialOfService", + "likelihood": "medium", + "impact": "major", + "threat": "A thief holding one member device revokes every other device, or replaces the recovery device.", + "control": "Recovery revocations take precedence: a device recovery revoked has no revocations that count, members cannot revoke or replace the recovery device, and recovery revokes every other device ever linked.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::revokedByRecoveryCannotRevoke", + "Stitch.PrismId::memberCannotRevokeRecovery", + "Stitch.PrismId::memberCannotReplaceRecovery" + ], + "index": 18, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismOriginScript", + "asset": "prismId", + "category": "elevationOfPrivilege", + "likelihood": "medium", + "impact": "critical", + "threat": "Script running in the prism origin (XSS, compromised dependency or static host) uses device key handles and reads the boundary keyring.", + "control": "Device keys are non-extractable; a hardened device keeps only non-extractable derived boundary keys and cannot link members or set up recovery, so script can copy no key out; actions a host marks need a user-verified WebAuthn assertion over exactly that action body, which script cannot make without the person.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::hardenedDeviceCannotShare", + "Stitch.PrismId::unverifiedApprovalRefused", + "Stitch.PrismId::approvalOfOtherActionRefused", + "Stitch.PrismId::forgedApprovalRefused" + ], + "index": 19, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismPersonaHijack", + "asset": "prismId", + "category": "elevationOfPrivilege", + "likelihood": "medium", + "impact": "major", + "threat": "A revoked member keeps acting at a host through its persona key, or uses persona recovery keys it once saw.", + "control": "Revoking a device revokes its persona keys at every host on the next sync; persona recovery keys are wrapped to the main recovery device and kept by no member.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::revokedDeviceActionRefused", + "Stitch.PrismId::revokedDeviceCannotSign" + ], + "index": 20, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismQuantumForgery", + "asset": "prismId", + "category": "spoofing", + "likelihood": "low", + "impact": "critical", + "threat": "A future quantum adversary forges P-256 signatures to bind a device or sign actions.", + "control": "Every record and action from a device with an ML-DSA-65 key also carries an ML-DSA signature; verifiers with ML-DSA refuse a missing or invalid one, and hosts can refuse verifiers without it.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::postQuantumSignatureStripRefused", + "Stitch.PrismId::classicalSignatureAlwaysRequired" + ], + "index": 21, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismQuantumHarvest", + "asset": "prismId", + "category": "informationDisclosure", + "likelihood": "medium", + "impact": "critical", + "threat": "Wraps recorded today are decrypted later by a quantum adversary.", + "control": "Every wrap to a device that advertises ML-KEM-768 is hybrid ECDH plus ML-KEM; a classical wrap to such a device is refused; content keys are AES-256.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::postQuantumDowngradeRefused" + ], + "index": 22, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismRecoveryLoss", + "asset": "prismId", + "category": "denialOfService", + "likelihood": "medium", + "impact": "critical", + "threat": "Every member device is lost, so the prism is lost.", + "control": "Threshold recovery: the recovery key exists only as shares sealed to guardians; with no surviving copy of the log, recovery rebuilds it from sealed sync the substrate retained by following the rotations wrapped to the recovery device; it binds a new device, revokes the rest, carries personas and rotates itself.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::belowThresholdRefused", + "Stitch.PrismId::memberCannotRevokeRecovery" + ], + "index": 23, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismRekeyWithholding", + "asset": "prismId", + "category": "denialOfService", + "likelihood": "medium", + "impact": "minor", + "threat": "A rotation never reaches an offline member, so it cannot seal new content.", + "control": "A device without the current key refuses to seal instead of sealing to the old key; a publish under the previous key delivers the rotation.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::staleBoundaryKeyRefused" + ], + "index": 24, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismRepudiation", + "asset": "prismId", + "category": "repudiation", + "likelihood": "low", + "impact": "minor", + "threat": "A person denies that one of their devices took an action.", + "control": "Every action and administrative record is signed by a device bound in the prism log; software keys reachable by origin script remain a residual.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [], + "index": 25, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismRogueBind", + "asset": "prismId", + "category": "elevationOfPrivilege", + "likelihood": "high", + "impact": "critical", + "threat": "A non-member, a delegate, or a revoked device signs a bind to add a device under its control.", + "control": "A bind counts only from a linked, unrevoked member with a valid signature for this prism; revocation wins over a concurrent bind.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::unlinkedSignerCannotBind", + "Stitch.PrismId::delegateCannotBind", + "Stitch.PrismId::invalidBindSignatureRefused" + ], + "index": 26, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismStolenDevice", + "asset": "prismId", + "category": "informationDisclosure", + "likelihood": "medium", + "impact": "critical", + "threat": "A lost or stolen member device keeps reading new private content and following sync.", + "control": "Revocation rotates the private boundary key, wraps it only to remaining members and moves the sync topic; stale keys are refused.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [ + "Stitch.PrismId::revokedDeviceCannotSign", + "Stitch.PrismId::revokedDeviceActionRefused", + "Stitch.PrismId::staleBoundaryKeyRefused" + ], + "index": 27, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "PrismSyncObservation", + "asset": "prismId", + "category": "informationDisclosure", + "likelihood": "high", + "impact": "major", + "threat": "Bus relays and federation nodes read sync content or infer it from message sizes.", + "control": "Sync topic is an HMAC under a derived boundary key; every message is AES-GCM sealed, bound to the prism id and padded to a power-of-two bucket; constant-cadence sync sends one message of one size per interval, real or cover; network addresses remain observable.", + "evidence": [ + "tests/prism-id.test.js", + "docs/prism-id-threat-model.md" + ], + "proofs": [], + "index": 28, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "ResourceExhaustion", + "asset": "admission", + "category": "denialOfService", + "likelihood": "high", + "impact": "major", + "threat": "Untrusted messages, replay or unknown effects exhaust application allowances.", + "control": "Reserve each independent resource before effects; unknown outcomes stay charged.", + "evidence": [ + "tests/runtime-admission.test.js", + "docs/prism-model.md" + ], + "proofs": [], + "index": 29, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "SignalingSpoofing", + "asset": "transport", + "category": "spoofing", + "likelihood": "high", + "impact": "major", + "threat": "A relay replays or substitutes SDP/ICE and stale session callbacks.", + "control": "Signed exact signaling, session/generation fencing and bounded channel flow.", + "evidence": [ + "tests/authenticated-signaling.test.js", + "docs/authenticated-signaling.md" + ], + "proofs": [], + "index": 30, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "StorageLoss", + "asset": "storage", + "category": "denialOfService", + "likelihood": "medium", + "impact": "major", + "threat": "Tab loss or eviction removes the only object fragments or recent trust anchor.", + "control": "Explicit recovery export and origin-storage evidence; no guarantee after total information loss.", + "evidence": [ + "tests/recovery.test.js", + "docs/recovery.md" + ], + "proofs": [], + "index": 31, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + }, + { + "id": "VendorSubstitution", + "asset": "vm", + "category": "tampering", + "likelihood": "medium", + "impact": "critical", + "threat": "Loaded emulator, BIOS or guest differs from reviewed inventory.", + "control": "Retained corresponding-source materials and exact local asset digests; live load-time remote integrity remains an assumption.", + "evidence": [ + "tests/guest-qualification.test.js", + "docs/vendor-provenance.md" + ], + "proofs": [], + "index": 32, + "assessment": "Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability." + } + ], + "quality": [ + { + "id": "ActionCoverage", + "characteristic": "FunctionalSuitability", + "sub": "FunctionalCompleteness", + "threshold": 31, + "unit": "modeled actions", + "method": "Count Product.Experience Action definitions, require one official Feature per action.", + "source": "app/src/Product/Experience.lex.tex", + "evidence": "tests/product-facets.test.js", + "kind": "derived" + }, + { + "id": "AuthorityRollback", + "characteristic": "Security", + "sub": "Authenticity", + "threshold": 0, + "unit": "accepted stale or foreign trust transitions", + "method": "Exact saved head comparison and independent writer/digest acceptance.", + "source": "docs/browser-authority.md", + "evidence": "tests/browser-authority-lifecycle.test.js", + "kind": "requirement" + }, + { + "id": "ComponentCoverage", + "characteristic": "Maintainability", + "sub": "Modularity", + "threshold": 19, + "unit": "components", + "method": "Every actual architecture component is represented in the design view.", + "source": "app/src/Product/Architecture.lex.tex", + "evidence": "tests/product-facets.test.js", + "kind": "derived" + }, + { + "id": "ForgedCheckpoints", + "characteristic": "Security", + "sub": "Integrity", + "threshold": 0, + "unit": "accepted impossible checkpoints", + "method": "Zero-defect requirement exercised by adversarial replay tests.", + "source": "docs/prism-model.md", + "evidence": "tests/execution-identity.test.js", + "kind": "requirement" + }, + { + "id": "ProgramInstructions", + "characteristic": "PerformanceEfficiency", + "sub": "Capacity", + "threshold": 1024, + "unit": "instructions", + "method": "Configured acceptance ceiling, not observed capacity or performance.", + "source": "src/layer4-compute/replay.js", + "evidence": "tests/primitive-operations.test.js", + "kind": "configured" + }, + { + "id": "ProgramWork", + "characteristic": "PerformanceEfficiency", + "sub": "Capacity", + "threshold": 1000000, + "unit": "abstract work units", + "method": "Model-derived work charged before replay; does not meter VM/browser/TLS overhead.", + "source": "src/layer4-compute/replay.js", + "evidence": "tests/runtime-admission.test.js", + "kind": "configured" + }, + { + "id": "SilentEvidencePromotion", + "characteristic": "InteractionCapability", + "sub": "SelfDescriptiveness", + "threshold": 0, + "unit": "unknown host outcomes displayed as verified", + "method": "Persistent evidence labels distinguish digest, replay, unknown effects and unqualified hosts.", + "source": "app/src/Product/Experience.lex.tex", + "evidence": "tests/product-experience.test.js", + "kind": "requirement" + }, + { + "id": "SourceDrift", + "characteristic": "Maintainability", + "sub": "Testability", + "threshold": 0, + "unit": "unregenerated model or facet outputs", + "method": "Regeneration must reproduce committed output bytes.", + "source": "scripts/check-facets.mjs", + "evidence": "tests/product-facets.test.js", + "kind": "requirement" + }, + { + "id": "TermWidth", + "characteristic": "PerformanceEfficiency", + "sub": "Capacity", + "threshold": 32768, + "unit": "bits", + "method": "Explicit parsing/memory envelope, not an upstream ring semantic limit.", + "source": "src/layer4-compute/replay.js", + "evidence": "tests/primitive-operations.test.js", + "kind": "configured" + }, + { + "id": "UnknownWriteReplay", + "characteristic": "Reliability", + "sub": "Recoverability", + "threshold": 0, + "unit": "blind retries of unknown DNS writes", + "method": "Unknown publication permits read-only reconciliation, never another mutation.", + "source": "docs/browser-authority.md", + "evidence": "tests/dns-publication.test.js", + "kind": "requirement" + } + ], + "brand": { + "name": "Stitch", + "promise": "Model-driven recoverable objects and replayable computation across changing peers", + "tokens": [ + { + "name": "bg", + "value": "#0a0a0a", + "type": "color", + "source": "index.html" + }, + { + "name": "panel", + "value": "#111111", + "type": "color", + "source": "index.html" + }, + { + "name": "border", + "value": "#2a2a2a", + "type": "color", + "source": "index.html" + }, + { + "name": "fg", + "value": "#e8e8e8", + "type": "color", + "source": "index.html" + }, + { + "name": "muted", + "value": "#888888", + "type": "color", + "source": "index.html" + }, + { + "name": "font", + "value": "\"JetBrains Mono\", \"Fira Code\", Consolas, monospace", + "type": "fontFamily", + "source": "index.html" + }, + { + "name": "accent", + "value": "#bde8cc", + "type": "color", + "source": "site/site.css" + }, + { + "name": "site-muted", + "value": "#a1aaa4", + "type": "color", + "source": "site/site.css" + }, + { + "name": "site-line", + "value": "#303832", + "type": "color", + "source": "site/site.css" + } + ], + "contrasts": [ + { + "foreground": "fg", + "background": "bg", + "observedMilli": 16158, + "requiredMilli": 4500, + "scope": "Declared opaque text colors only; not whole-page WCAG conformance." + }, + { + "foreground": "fg", + "background": "panel", + "observedMilli": 15411, + "requiredMilli": 4500, + "scope": "Declared opaque text colors only; not whole-page WCAG conformance." + }, + { + "foreground": "muted", + "background": "panel", + "observedMilli": 5326, + "requiredMilli": 4500, + "scope": "Declared opaque text colors only; not whole-page WCAG conformance." + }, + { + "foreground": "accent", + "background": "bg", + "observedMilli": 14686, + "requiredMilli": 4500, + "scope": "Declared opaque text colors only; not whole-page WCAG conformance." + }, + { + "foreground": "site-muted", + "background": "bg", + "observedMilli": 8297, + "requiredMilli": 4500, + "scope": "Declared opaque text colors only; not whole-page WCAG conformance." + } + ], + "scope": "Stitch own dark technical surface, monospace operator workbench and source-owned reader accent palette. No inherited Prism-DevRel or UORust character or theme." + }, + "users": { + "groups": [ + { + "id": "operator", + "characteristics": "Chooses mesh participation, public disclosure, trusted pointer authority, DNS writes and VM actions." + }, + { + "id": "reader", + "characteristics": "Learns the object, fragment, custody, replay and authority protocol before taking part." + }, + { + "id": "reviewer", + "characteristics": "Reviews exact-source evidence, host assumptions, vendor provenance and qualification gaps." + }, + { + "id": "systemIntegrator", + "characteristics": "Embeds or extends the protocol without bypassing resource, trust or effect admission." + } + ], + "goals": [ + { + "user": 0, + "journey": "Product.Features::journeyMesh", + "outcome": "Review public signaling disclosure, join explicitly, then inspect reachable peers.", + "id": "mesh", + "steps": [ + "Product.Features::featureJoin" + ] + }, + { + "user": 0, + "journey": "Product.Features::journeyObjects", + "outcome": "Separate local integrity from conditional peer custody and actual recovery.", + "id": "objects", + "steps": [ + "Product.Features::featureStore", + "Product.Features::featurePlacementRepair", + "Product.Features::featureRecoveryExport", + "Product.Features::featureRecoveryImport", + "Product.Features::featureRecoveryDownload" + ] + }, + { + "user": 0, + "journey": "Product.Features::journeyCompute", + "outcome": "Replay deterministic checkpoints before continuation; VM effects have a separate contract.", + "id": "compute", + "steps": [ + "Product.Features::featureStart", + "Product.Features::featureResume" + ] + }, + { + "user": 0, + "journey": "Product.Features::journeyVm", + "outcome": "Boot and execute only through the observed VM lifecycle. Output integrity does not certify execution.", + "id": "vm", + "steps": [ + "Product.Features::featureBoot", + "Product.Features::featureExecute", + "Product.Features::featureVmReconcile", + "Product.Features::featureVmStop", + "Product.Features::featureVmDestroy" + ] + }, + { + "user": 0, + "journey": "Product.Features::journeyPointers", + "outcome": "Pin authority independently, retain the local head, and reconcile uncertain provider writes.", + "id": "pointers", + "steps": [ + "Product.Features::featureSaveAuthority", + "Product.Features::featurePin", + "Product.Features::featureTxt", + "Product.Features::featureAdmit", + "Product.Features::featurePublish", + "Product.Features::featureLoadPublication", + "Product.Features::featureReconcile" + ] + }, + { + "user": 0, + "journey": "Product.Features::journeyResources", + "outcome": "Inspect bounded application charges, export them, and explicitly grant a new epoch.", + "id": "resources", + "steps": [ + "Product.Features::featureExport", + "Product.Features::featureRenew" + ] + }, + { + "user": 1, + "journey": "Product.Features::journeyReader", + "outcome": "Understand the Stitch protocol. Each operation retains its source-owned consent and evidence boundary.", + "id": "reader", + "steps": [ + "Product.Features::featureLearnProtocol", + "Product.Features::featureInspectFacetSources" + ] + }, + { + "user": 2, + "journey": "Product.Features::journeyReviewer", + "outcome": "Audit evidence and assumptions. Each operation retains its source-owned consent and evidence boundary.", + "id": "reviewer", + "steps": [ + "Product.Features::featureInspectFacetSources", + "Product.Features::featureReviewHostBoundaries" + ] + }, + { + "user": 3, + "journey": "Product.Features::journeyIntegrator", + "outcome": "Extend the protocol safely. Each operation retains its source-owned consent and evidence boundary.", + "id": "integrator", + "steps": [ + "Product.Features::featureLearnProtocol", + "Product.Features::featureReviewHostBoundaries", + "Product.Features::featureExtendProtocol" + ] + }, + { + "user": 0, + "journey": "Product.Features::journeyAuthority", + "outcome": "Care for saved identity and trust. Each operation retains its source-owned consent and evidence boundary.", + "id": "authority", + "steps": [ + "Product.Features::featureInspectAuthorityStorage", + "Product.Features::featureSaveTrustedAnchor", + "Product.Features::featureRestoreTrustedAnchor", + "Product.Features::featureExportAuthorityJournal" + ] + } + ], + "tasks": [ + { + "goal": 0, + "order": 0, + "feature": "Product.Features::featureJoin" + }, + { + "goal": 1, + "order": 0, + "feature": "Product.Features::featureStore" + }, + { + "goal": 1, + "order": 1, + "feature": "Product.Features::featurePlacementRepair" + }, + { + "goal": 1, + "order": 2, + "feature": "Product.Features::featureRecoveryExport" + }, + { + "goal": 1, + "order": 3, + "feature": "Product.Features::featureRecoveryImport" + }, + { + "goal": 1, + "order": 4, + "feature": "Product.Features::featureRecoveryDownload" + }, + { + "goal": 2, + "order": 0, + "feature": "Product.Features::featureStart" + }, + { + "goal": 2, + "order": 1, + "feature": "Product.Features::featureResume" + }, + { + "goal": 3, + "order": 0, + "feature": "Product.Features::featureBoot" + }, + { + "goal": 3, + "order": 1, + "feature": "Product.Features::featureExecute" + }, + { + "goal": 3, + "order": 2, + "feature": "Product.Features::featureVmReconcile" + }, + { + "goal": 3, + "order": 3, + "feature": "Product.Features::featureVmStop" + }, + { + "goal": 3, + "order": 4, + "feature": "Product.Features::featureVmDestroy" + }, + { + "goal": 4, + "order": 0, + "feature": "Product.Features::featureSaveAuthority" + }, + { + "goal": 4, + "order": 1, + "feature": "Product.Features::featurePin" + }, + { + "goal": 4, + "order": 2, + "feature": "Product.Features::featureTxt" + }, + { + "goal": 4, + "order": 3, + "feature": "Product.Features::featureAdmit" + }, + { + "goal": 4, + "order": 4, + "feature": "Product.Features::featurePublish" + }, + { + "goal": 4, + "order": 5, + "feature": "Product.Features::featureLoadPublication" + }, + { + "goal": 4, + "order": 6, + "feature": "Product.Features::featureReconcile" + }, + { + "goal": 5, + "order": 0, + "feature": "Product.Features::featureExport" + }, + { + "goal": 5, + "order": 1, + "feature": "Product.Features::featureRenew" + }, + { + "goal": 6, + "order": 0, + "feature": "Product.Features::featureLearnProtocol" + }, + { + "goal": 6, + "order": 1, + "feature": "Product.Features::featureInspectFacetSources" + }, + { + "goal": 7, + "order": 0, + "feature": "Product.Features::featureInspectFacetSources" + }, + { + "goal": 7, + "order": 1, + "feature": "Product.Features::featureReviewHostBoundaries" + }, + { + "goal": 8, + "order": 0, + "feature": "Product.Features::featureLearnProtocol" + }, + { + "goal": 8, + "order": 1, + "feature": "Product.Features::featureReviewHostBoundaries" + }, + { + "goal": 8, + "order": 2, + "feature": "Product.Features::featureExtendProtocol" + }, + { + "goal": 9, + "order": 0, + "feature": "Product.Features::featureInspectAuthorityStorage" + }, + { + "goal": 9, + "order": 1, + "feature": "Product.Features::featureSaveTrustedAnchor" + }, + { + "goal": 9, + "order": 2, + "feature": "Product.Features::featureRestoreTrustedAnchor" + }, + { + "goal": 9, + "order": 3, + "feature": "Product.Features::featureExportAuthorityJournal" + } + ], + "measures": [ + { + "goal": 0, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 0, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 0, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 1, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 1, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 1, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 2, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 2, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 2, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 3, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 3, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 3, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 4, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 4, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 4, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 5, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 5, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 5, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 6, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 6, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 6, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 7, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 7, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 7, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 8, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 8, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 8, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 9, + "outcome": "effectiveness", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 9, + "outcome": "efficiency", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + }, + { + "goal": 9, + "outcome": "satisfaction", + "observed": null, + "method": "open: no user study on this exact product revision; acceptance tests and task counts are not usability observations" + } + ] + }, + "persistence": [ + { + "id": "SavedSigner", + "storage": "Origin IndexedDB nonextractable CryptoKey", + "restore": "Startup restores only a valid active existing record.", + "automatic": true, + "trust": "Missing, malformed or revoked records never authorize automatic replacement.", + "failure": "Origin eviction or device loss can destroy the only key.", + "source": "src/layer1-uor/browser-authority.js", + "evidence": "tests/browser-authority.test.js" + }, + { + "id": "TrustedHead", + "storage": "Origin IndexedDB exact name/key/digest with history", + "restore": "Admitted successors persist by exact CAS before the live head changes; live restore is explicit.", + "automatic": false, + "trust": "Independent exact key and recent digest acceptance is not derived from a self-signature.", + "failure": "Storage failure preserves the previous live head; total loss requires independent recent evidence.", + "source": "src/layer1-uor/browser-authority.js", + "evidence": "tests/pointer-recovery.test.js" + }, + { + "id": "UnknownPublication", + "storage": "Origin IndexedDB strict write-ahead intent", + "restore": "Load the exact scoped candidate and perform read-only reconciliation.", + "automatic": false, + "trust": "No timer takeover, blind retry or deletion of unresolved intent.", + "failure": "An absent provider read does not prove the old mutation never occurred.", + "source": "src/layer1-uor/browser-authority.js", + "evidence": "tests/dns-publication.test.js" + }, + { + "id": "ObjectCustody", + "storage": "Session RAM plus conditionally reachable peer fragments", + "restore": "Automatically verify received bytes; repair only within admitted budgets and checked receipts.", + "automatic": true, + "trust": "Different peer IDs do not prove failure-domain independence or future retention.", + "failure": "All-byte loss cannot be repaired; local storage persistence does not make object cache durable.", + "source": "src/layer3-storage/custody.js", + "evidence": "tests/placement-repair.test.js" + }, + { + "id": "PureCheckpoint", + "storage": "Session state or explicitly exported recovery bundle", + "restore": "Every received checkpoint is replayed against its exact program/input/execution identity.", + "automatic": true, + "trust": "Replay does not grant exclusive execution or prove arbitrary guest effects.", + "failure": "Older execution identities are refused without explicit revalidation.", + "source": "src/layer4-compute/replay.js", + "evidence": "tests/execution-identity.test.js" + }, + { + "id": "RecoveryVault", + "storage": "Session-only checked vault and user-saved external file", + "restore": "Verify complete bundle atomically; export strips accepted-trust status.", + "automatic": false, + "trust": "Imported keys and anchors are supplied evidence, not trusted authority.", + "failure": "External export is not a durability certificate; stale/conflicting imports refuse.", + "source": "src/recovery.js", + "evidence": "tests/recovery.test.js" + }, + { + "id": "BudgetLedger", + "storage": "Session-local epochs plus explicit history export", + "restore": "Unknown effects remain charged; renewal is a deliberate new allowance.", + "automatic": false, + "trust": "No automatic refund or epoch rollover.", + "failure": "Browser reload is not durable preservation of the budget ledger.", + "source": "src/layer2-schedulers/policy.js", + "evidence": "tests/runtime-admission.test.js" + }, + { + "id": "VmCommand", + "storage": "Retained host command handles and observed lifecycle", + "restore": "Observe the selected old command result without dispatching it again.", + "automatic": false, + "trust": "A timeout is an unknown outcome, not cancellation or rollback.", + "failure": "Stop/destroy are pending until host confirmation; external effects are not reversible.", + "source": "src/layer4-compute/vm-administration.js", + "evidence": "tests/vm-administration.test.js" + } + ], + "release": { + "version": "0.2.0", + "deployments": [ + { + "id": "browserSession", + "entry": "index.html", + "requiredCapabilities": [ + "dom", + "crypto", + "monotonicClock", + "wallClock", + "sessionStorage", + "artifactFetch" + ] + }, + { + "id": "pureProbe", + "entry": "app/src/StitchApp.lex.tex", + "requiredCapabilities": [] + } + ], + "assets": [ + { + "path": "src/layer1-uor/effects.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/product-experience.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "index.html", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer1-uor/contracts.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer1-uor/custody.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer1-uor/generated-model.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer1-uor/index.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer1-uor/pointer.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer2-schedulers/index.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer2-schedulers/policy.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer3-storage/custody.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer3-storage/index.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer4-compute/index.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer4-compute/replay.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer5-transport/index.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "v86/libv86.js", + "source": "", + "licenseStatus": "BSD/MIT incorporated notices and source supplied in vendor/v86; include accompanying materials in distribution", + "redistributionCleared": true + }, + { + "path": "v86/v86.wasm", + "source": "", + "licenseStatus": "BSD/MIT incorporated notices and source supplied in vendor/v86; include accompanying materials in distribution", + "redistributionCleared": true + }, + { + "path": "v86/seabios.bin", + "source": "", + "licenseStatus": "LGPLv3 source, config, build instructions and licenses supplied in vendor/seabios; include accompanying materials in distribution", + "redistributionCleared": true + }, + { + "path": "src/prism-id.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "v86/vgabios.bin", + "source": "", + "licenseStatus": "LGPLv3 source, config, build instructions and licenses supplied in vendor/seabios; include accompanying materials in distribution", + "redistributionCleared": true + }, + { + "path": "images/buildroot-bzimage.bin", + "source": "", + "licenseStatus": "Corresponding source, configs, patches and licenses published at immutable commit fd59fae669e9a40271fb584ca071270d8ed0b8f8; preserve vendor/guest/SOURCE-NOTICE.md and equivalent source access with image", + "redistributionCleared": true + }, + { + "path": "src/lib.rs", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer1-uor/browser-authority.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/authority-ui.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer5-transport/dns-wire.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer5-transport/relay-framing.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/recovery.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/recovery-ui.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer5-transport/signaling.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer5-transport/channel-flow.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "src/layer4-compute/vm-administration.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "site/site.css", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "site/explorer.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "site/stitch-fabric.svg", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "site/facets.json", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + }, + { + "path": "site/catalog.js", + "source": "", + "licenseStatus": "Project declares MIT; audit applies", + "redistributionCleared": true + } + ], + "gate": ".github/workflows/prism.yml", + "boundary": "Static publication, source verification, native artifact acceptance and browser qualification are distinct. This inventory reports no current pass result." + }, + "compliance": [ + { + "id": "Architecture", + "standard": "ISO/IEC/IEEE 42010", + "obligation": "Represent every component, flow, stakeholder and concern with traceable viewpoints.", + "source": "app/src/Product/Architecture.lex.tex", + "evidence": "scripts/check-product.mjs", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "Design", + "standard": "ISO/PAS 19450 and UML 2.5.1", + "obligation": "Provide OPM object/process and UML component, sequence and state-machine views; views remain conditional on real domain predicates.", + "source": "app/src/Product/Design.lex.tex", + "evidence": "scripts/check-facets.mjs", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "Features", + "standard": "Prism official feature and journey facets", + "obligation": "Every existing action has a declared call and named acceptance evidence; each journey names declared features.", + "source": "app/src/Product/Features.lex.tex", + "evidence": "tests/product-facets.test.js", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "ThreatModel", + "standard": "ISO 27034, ISO 27005 and STRIDE", + "obligation": "Give every threat a traceable control/evidence path while retaining qualitative assessment and residual host assumptions.", + "source": "app/src/Product/Security.lex.tex", + "evidence": "tests/product-facets.test.js", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "Quality", + "standard": "ISO/IEC 25010:2023", + "obligation": "Distinguish source-derived counts, configured limits, zero-defect obligations and unmeasured observations.", + "source": "app/src/Product/Quality.lex.tex", + "evidence": "tests/product-facets.test.js", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "CanonicalBytes", + "standard": "RFC 8785", + "obligation": "Canonical JSON and framed commitments are checked at byte boundaries.", + "source": "docs/canonical-json.md", + "evidence": "tests/canonical-json.test.js", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "Dns", + "standard": "RFC 1035, RFC 8484 and provider contracts", + "obligation": "DNS wire decoding and full multipart pointer publication retain exact scope and unknown-effect reconciliation.", + "source": "docs/dns-client.md", + "evidence": "tests/dns-wire.test.js", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "IdentityPersistence", + "standard": "Origin storage and WebCrypto contracts", + "obligation": "Restore only existing active saved identity; do not infer trust from supplied data or recover keys after total loss.", + "source": "docs/browser-authority.md", + "evidence": "tests/browser-authority-lifecycle.test.js", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "ContextOfUse", + "standard": "ISO 9241-11 and ISO 9241-210", + "obligation": "Connect stakeholders to goals, tasks and environments; unmeasured effectiveness, efficiency and satisfaction remain open.", + "source": "app/src/Product/Users.lex.tex", + "evidence": "tests/product-facets.test.js", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "Brand", + "standard": "Wheeler; W3C Design Tokens; scoped WCAG 2.2 measurements", + "obligation": "Preserve Stitch identity and source its design tokens. Listed contrast measurements are not whole-page accessibility conformance.", + "source": "app/src/Product/Brand.lex.tex", + "evidence": "tests/product-facets.test.js", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "Distribution", + "standard": "Dependency source and license obligations", + "obligation": "Keep exact asset identity and accompanying materials, separately from security/qualification evidence.", + "source": "docs/vendor-provenance.md", + "evidence": "tests/guest-qualification.test.js", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + }, + { + "id": "Release", + "standard": "Pinned SDK and exact-revision acceptance", + "obligation": "Source, native artifact, runtime, hosted browser and field qualification are distinct gates.", + "source": "docs/product-projection.md", + "evidence": ".github/workflows/prism.yml", + "status": "Documented obligation and named evidence procedure; not an external compliance certification." + } + ] +} diff --git a/product/source-attestation.json b/product/source-attestation.json new file mode 100644 index 0000000..8aa1d61 --- /dev/null +++ b/product/source-attestation.json @@ -0,0 +1 @@ +{"attestation_id":"904f11a911a38818a4126cd11c5af64c67cc560560ec0da7b22cc32ad902274a","build_id":"bdcf8bfe587b8188d03aee9d87e79bec09b42818d548f80fbf124ac7f3f83046","build_manifest":{"byte_length":45647,"sha256":"246e3132266f021406950abc6d299b5177447cae090d1ec58142b3a1cac03e7b"},"declarations":[{"name":"StitchModel.Foundation.Arch.StandardReference","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.ComponentKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.EdgeKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.ModelKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.Component","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.Edge","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.Stakeholder","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.Concern","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.Viewpoint","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.View","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.DesignDiagram","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.OpmThingKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.OpmLinkKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.UmlMessageKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.SystemProcess","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.SystemState","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.DesignView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.OpmThing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.OpmState","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.OpmLink","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.OpmZoom","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.UmlComponent","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.UmlConnector","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.UmlLifeline","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.UmlMessage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.UmlState","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.UmlTransition","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.Feature","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Arch.Journey","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Bytes.ByteOrder","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Bytes.BufferError","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Bytes.BoundedBuffer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Bytes.appendBytes","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Bytes.byteLength","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Bytes.byteAt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Bytes.sliceBytes","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Bytes.compareBytes","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.BrandElementKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.TokenType","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.ContrastCriterion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.EnvironmentKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.UsabilityOutcome","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.Authority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.BrandElement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.DesignToken","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.ContrastPair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.UserGroup","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.Goal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.Task","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.Environment","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Experience.V1.Model.UsabilityMeasure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Qual.ProductQualityCharacteristic","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Qual.QualitySubcharacteristic","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Qual.QualityRequirement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Qual.QualityMeasure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Sec.Likelihood","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Sec.Impact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Sec.Asset","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Sec.Threat","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Sec.Risk","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Sec.ApplicationSecurityControl","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Sec.SecurityActivity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.Sec.VerificationMeasurement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.View.Text.V1.Model.TextView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.View.Text.V1.Model.AcceptanceVector","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.View.Text.V1.Model.TextApplication","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Foundation.View.Text.V1.Model.textApplicationProfile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.admission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.browser","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.compute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.cryptography","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.discovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.identity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.legacy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.nativeRouting","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.peers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.pointerAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.publicRelay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.runtimeHost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.scheduler","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.signaling","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.staticHost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.storage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.transport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.vm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.prismId","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.browserAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.browserCompute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.browserDiscovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.browserScheduler","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.browserStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.browserTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.browserVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.computeAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.computeIdentity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.computeStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.computeTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.discoveryAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.discoveryAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.discoveryHost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.identityCryptography","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.relayTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.schedulerAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.schedulerTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.signalingTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.staticBrowser","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.staticVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.storageAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.storageIdentity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.storagePeers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.storageTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.transportAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.transportPeers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.transportSignaling","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.transportVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.vmStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.vmTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.browserPrismId","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.prismIdCryptography","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.prismIdTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.operator","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.recoverability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.productViewpoint","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.productView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.reader","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.reviewer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.systemIntegrator","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.security","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.transparency","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.usability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.readerViewpoint","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.readerView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.reviewerViewpoint","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.reviewerView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.systemIntegratorViewpoint","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Architecture.systemIntegratorView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Brand.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Brand.sources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Brand.authority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Brand.brandSources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Brand.elements","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Brand.tokens","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Brand.contrasts","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Brand.contrastScope","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.sources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.Obligation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationArchitecture","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationDesign","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationFeatures","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationThreatModel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationQuality","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationCanonicalBytes","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationDns","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationIdentityPersistence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationContextOfUse","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationBrand","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationDistribution","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligationRelease","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.obligations","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Compliance.scope","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.sources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.viewComponents","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.viewObjectProcess","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.viewPublicationSequence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.viewPublicationState","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentBrowser","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentCompute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentCryptography","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentDiscovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentIdentity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentLegacy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentNativeRouting","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentPeers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentPointerAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentPublicRelay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentRuntimeHost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentScheduler","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentSignaling","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentStaticHost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.componentPrismId","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorBrowserAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorBrowserCompute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorBrowserDiscovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorBrowserScheduler","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorBrowserStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorBrowserTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorBrowserVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorComputeAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorComputeIdentity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorComputeStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorComputeTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorDiscoveryAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorDiscoveryAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorDiscoveryHost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorIdentityCryptography","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorRelayTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorSchedulerAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorSchedulerTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorSignalingTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorStaticBrowser","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorStaticVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorStorageAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorStorageIdentity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorStoragePeers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorStorageTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorTransportAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorTransportPeers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorTransportSignaling","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorTransportVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorVmStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorVmTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorBrowserPrismId","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorPrismIdCryptography","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.connectorPrismIdTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processAdmitObject","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processCommitLocal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processRequestPlacement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processCheckReceipt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processRecover","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processBeginWrite","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processConfirm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processRefuse","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processRetainUnknown","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processAuthorizePointer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processDispatchDnsWrite","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.processObserveDnsRecord","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.objectIdentity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.objectAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.objectStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.objectPeers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmAdmitObject","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmCommitLocal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmRequestPlacement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmCheckReceipt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmRecover","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmLink0","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmLink1","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmLink2","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmLink3","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmLink4","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmLink5","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmLink6","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.opmLink7","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.lifelineBrowser","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.lifelineDiscovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.lifelinePointerAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.lifelineRuntimeHost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.message0","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.message1","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.message2","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.message3","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.message4","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.message5","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.message6","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.message7","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.message8","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.stateIdle","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.umlIdle","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.statePublished","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.umlPublished","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.stateRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.umlRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.stateUnknown","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.umlUnknown","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.transition0","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.transition1","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.transition2","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.transition3","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.transition4","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.transition5","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.transition6","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Design.boundary","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.Facts","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.Journey","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.View","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.Action","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.initialFacts","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.journeyMesh","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.journeyObjects","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.journeyCompute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.journeyVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.journeyPointers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.journeyResources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.journeys","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.meshDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.meshReady","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.meshSearching","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.meshConnected","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.objectsEmpty","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.objectsPartial","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.objectsLocal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.objectsPlaced","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.computeEmpty","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.computeUnverified","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.computeReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.computeDone","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmIdle","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmBooting","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmReady","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmFailed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.pointerUnpinned","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.pointerPinned","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.pointerLocal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.pointerPending","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.pointerUnknown","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.pointerPublished","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.resourcesActive","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.resourcesBlocked","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionJoin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionStore","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionClear","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionRecover","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionStart","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionResume","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionBoot","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionExecute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionSrv","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionTxt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionPin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionAdmit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionPublish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionRenew","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionExport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionRecoveryExport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionRecoveryImport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionRecoverySave","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionRecoveryDownload","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionRecoveryFinish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionRecoveryTrust","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionVmStop","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionVmDestroy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionVmCancel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionVmReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionVmForget","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionSaveAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionLoadPublication","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionRecoveryRestore","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionPlacementRepair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.placementRepairAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.unselectedObjectCannotRepair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.blockedPolicyCannotRepair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actions","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.recoveryEmpty","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.recoveryChecking","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.recoveryChecked","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.recoveryTrusted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.recoveryRestored","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmTerminationPending","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmStopped","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmDestroyed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmQuarantined","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.recoveryView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.meshView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.objectsView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.computeView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.pointersView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.resourcesView","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.joinAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.publicationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.reconciliationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.executionAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.actionAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.integrityLabel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.executionLabel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.productTitle","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.disclosureLabel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.relayLabel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.provenanceLabel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.unknownPublicationFacts","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.unknownPublicationDoesNotPermitNewCandidate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.unknownPublicationOffersReconciliation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.unknownPublicationIsVisible","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.initialMeshCannotJoinWithoutDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.initialVmCannotExecute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.initialPolicyCanBeExported","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.EvidenceStyle","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.evidenceStyles","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.viewStyle","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.statusLivePolicy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.navigationLabel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.focusNavigationTarget","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.navigationScrollBehavior","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.unknownNeverPermitsPublication","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.undisclosedNeverPermitsJoin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.unreadyNeverPermitsGuestExecution","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.budgetBlockNeverPermitsPublication","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.knownPublicationNeverOffersReconciliation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.journeyVisible","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.explanationInitiallyOpen","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.publicationSetupVisible","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.explanationLabel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.recoveryPolicyLabel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.recoveryPolicyVisible","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.admissionInputVisible","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.vmCommandVisible","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Experience.publicationSetupInitiallyOpen","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.sources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callJoin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptJoin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureJoin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callStore","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptStore","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureStore","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callClear","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptClear","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureClear","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRecover","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRecover","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRecover","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callStart","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptStart","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureStart","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callResume","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptResume","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureResume","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callBoot","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptBoot","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureBoot","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callExecute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptExecute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureExecute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callSrv","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptSrv","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureSrv","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callTxt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptTxt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureTxt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callPin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptPin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featurePin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callAdmit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptAdmit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureAdmit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callPublish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptPublish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featurePublish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRenew","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRenew","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRenew","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callExport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptExport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureExport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRecoveryExport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRecoveryExport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRecoveryExport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRecoveryImport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRecoveryImport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRecoveryImport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRecoverySave","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRecoverySave","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRecoverySave","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRecoveryDownload","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRecoveryDownload","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRecoveryDownload","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRecoveryFinish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRecoveryFinish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRecoveryFinish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRecoveryTrust","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRecoveryTrust","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRecoveryTrust","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callVmStop","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptVmStop","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureVmStop","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callVmDestroy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptVmDestroy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureVmDestroy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callVmCancel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptVmCancel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureVmCancel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callVmReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptVmReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureVmReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callVmForget","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptVmForget","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureVmForget","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callSaveAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptSaveAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureSaveAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callLoadPublication","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptLoadPublication","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureLoadPublication","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRecoveryRestore","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRecoveryRestore","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRecoveryRestore","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callPlacementRepair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptPlacementRepair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featurePlacementRepair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callLearnProtocol","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptLearnProtocol","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureLearnProtocol","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callInspectFacetSources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptInspectFacetSources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureInspectFacetSources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callReviewHostBoundaries","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptReviewHostBoundaries","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureReviewHostBoundaries","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callExtendProtocol","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptExtendProtocol","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureExtendProtocol","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callInspectAuthorityStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptInspectAuthorityStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureInspectAuthorityStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRotateAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRotateAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRotateAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRevokeAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRevokeAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRevokeAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callSaveTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptSaveTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureSaveTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRestoreTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRestoreTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRestoreTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callMigrateTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptMigrateTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureMigrateTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callRevokeTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptRevokeTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureRevokeTrustedAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callPersistAuthorityStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptPersistAuthorityStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featurePersistAuthorityStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callExportAuthorityJournal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptExportAuthorityJournal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureExportAuthorityJournal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.callCompactAuthorityJournal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.acceptCompactAuthorityJournal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.featureCompactAuthorityJournal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyMesh","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyObjects","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyCompute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyPointers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyResources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyReader","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyReviewer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyIntegrator","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.journeyAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Features.scope","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.Capability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.Outcome","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.Grant","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.Request","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.Effect","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.Observation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.State","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.capabilityCode","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.outcomeCode","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.requiresDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.browserSupported","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.requestAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.reserve","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.observationMatches","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.pendingMatches","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.finish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.sessionFilter","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.ledgerFilter","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.sessionFilterLedger","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.ledgerFilterSame","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.positiveSessionFilterFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Product.Host.sessionLessThanDifference","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Product.Host.observationCandidate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.observe","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.requestDoesNotCreateObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Host.observationCannotRefundLedger","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Product.Host.staleSessionCannotComplete","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Product.Host.nativeRoutingRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.Component","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.Assumption","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.CapabilityContract","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.Dependency","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.Deployment","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.Asset","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentBrowser","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentCompute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentCryptography","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentDiscovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentIdentity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentLegacy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentNativeRouting","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentPeers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentPointerAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentPrismId","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentPublicRelay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentRuntimeHost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentScheduler","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentSignaling","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentStaticHost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionArtifactConformance","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionBrowserSemantics","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionCryptographicSecurity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionDisclosureConsent","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionFailureDomains","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionNetworkAvailability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionObserverAnchor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionPeerAssertion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionSerializedJournal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionTimeSources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionVmIsolation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityDom","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityCrypto","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityMonotonicClock","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityWallClock","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilitySessionStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityPeerChannel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityLocalBroadcast","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityPublicSignaling","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityDnsRead","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityDnsWrite","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityPublicRelay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityArtifactFetch","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityNativeRouting","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityOriginStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityWebLock","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyBrowserApis","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyCloudflareDns","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyCloudflareWriter","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyGoogleStun","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyCloudflareStun","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyNtfySignaling","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyNtfyRelay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyStaticOrigin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyVmAssets","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyPrismSdk","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyPrismCode","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.deploymentBrowserSession","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.deploymentPureProbe","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetLifecycleEffects","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetProductExperience","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile0","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile1","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile2","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile3","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile4","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile5","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile6","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile7","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile8","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile9","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile10","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile11","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile12","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile13","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile14","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile15","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetPrismId","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile16","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetFile17","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetRustConformance","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetBrowserAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetAuthorityUi","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.Model","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetDnsWire","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetRelayFraming","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetRecovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetRecoveryUi","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetSignaling","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetChannelFlow","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetVmAdministration","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetSiteStyle","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetSiteExplorer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetSiteFabric","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetSiteFacets","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetSiteCatalog","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.product","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentIds","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assumptionIds","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.capabilityContractIds","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependencyIds","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.deploymentIds","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.assetIds","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.member","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.members","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.unique","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.componentAssetsClosed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.contractsClosed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.dependenciesClosed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.deploymentsClosed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.valid","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.redistributionClosed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.productAssetsRedistributable","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.productGraphIsClosed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Model.vendorDistributionMaterialsRecorded","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.sources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.Mechanism","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.mechanismSavedSigner","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.mechanismTrustedHead","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.mechanismUnknownPublication","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.mechanismObjectCustody","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.mechanismPureCheckpoint","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.mechanismRecoveryVault","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.mechanismBudgetLedger","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.mechanismVmCommand","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.mechanisms","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.restoreExistingSignerAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.absentSignerIsNeverRestored","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.revokedSignerIsNeverRestored","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.unknownPublicationRetainsReadOnlyBoundary","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.unknownPublicationOffersReconciliation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Persistence.identitySeparation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.sources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.characteristicFunctionalSuitability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.characteristicInteractionCapability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.characteristicMaintainability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.characteristicPerformanceEfficiency","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.characteristicReliability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.characteristicSecurity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.subcharacteristicAuthenticity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.subcharacteristicCapacity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.subcharacteristicFunctionalCompleteness","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.subcharacteristicIntegrity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.subcharacteristicModularity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.subcharacteristicRecoverability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.subcharacteristicSelfDescriptiveness","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.subcharacteristicTestability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.MeasureContract","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementActionCoverage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureActionCoverage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractActionCoverage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementAuthorityRollback","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureAuthorityRollback","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractAuthorityRollback","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementComponentCoverage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureComponentCoverage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractComponentCoverage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementForgedCheckpoints","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureForgedCheckpoints","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractForgedCheckpoints","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementProgramInstructions","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureProgramInstructions","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractProgramInstructions","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementProgramWork","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureProgramWork","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractProgramWork","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementSilentEvidencePromotion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureSilentEvidencePromotion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractSilentEvidencePromotion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementSourceDrift","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureSourceDrift","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractSourceDrift","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementTermWidth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureTermWidth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractTermWidth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.requirementUnknownWriteReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.measureUnknownWriteReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.contractUnknownWriteReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Quality.openQualities","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.sources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.Artifact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.Deployment","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.version","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact000","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact001","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact002","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact003","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact004","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact005","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact006","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact007","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact008","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact009","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact010","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact011","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact012","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact013","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact014","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact015","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact016","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact017","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact018","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact019","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact020","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact021","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact022","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact023","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact024","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact025","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact026","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact027","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact028","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact029","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact030","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact031","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact032","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact033","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact034","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.artifact035","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.deploymentBrowserSession","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.deploymentPureProbe","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.gate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.releaseBoundary","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Release.releaseRequirements","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.sources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assessmentPolicy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetBrowser","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetBrowser","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetCompute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetCompute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetDiscovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetDiscovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetPointerAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetPointerAuthority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetPrismId","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetPrismId","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetPublicRelay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetPublicRelay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetStorage","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetTransport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.assetVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledAssetVm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatAuthoritySpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskAuthoritySpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlAuthoritySpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityAuthoritySpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatAuthoritySpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlAuthoritySpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingAuthoritySpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatCheckpointForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskCheckpointForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlCheckpointForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityCheckpointForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatCheckpointForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlCheckpointForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingCheckpointForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingDisclosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatEffectReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskEffectReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlEffectReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityEffectReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatEffectReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlEffectReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingEffectReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatFragmentTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskFragmentTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlFragmentTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityFragmentTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatFragmentTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlFragmentTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingFragmentTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatGuestPrivilege","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskGuestPrivilege","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlGuestPrivilege","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityGuestPrivilege","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatGuestPrivilege","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlGuestPrivilege","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingGuestPrivilege","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatOriginCompromise","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskOriginCompromise","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlOriginCompromise","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityOriginCompromise","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatOriginCompromise","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlOriginCompromise","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingOriginCompromise","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismActionReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismActionReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismActionReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismActionReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismActionReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismActionReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismActionReplay","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismCanonicalDivergence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismCanonicalDivergence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismCanonicalDivergence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismCanonicalDivergence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismCanonicalDivergence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismCanonicalDivergence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismCanonicalDivergence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismDelegateOverreach","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismDelegateOverreach","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismDelegateOverreach","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismDelegateOverreach","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismDelegateOverreach","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismDelegateOverreach","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismDelegateOverreach","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismGenesisConfusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismGenesisConfusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismGenesisConfusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismGenesisConfusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismGenesisConfusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismGenesisConfusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismGenesisConfusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismGuardianCollusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismGuardianCollusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismGuardianCollusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismGuardianCollusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismGuardianCollusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismGuardianCollusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismGuardianCollusion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismGuardianDeception","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismGuardianDeception","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismGuardianDeception","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismGuardianDeception","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismGuardianDeception","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismGuardianDeception","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismGuardianDeception","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismKeyClaimForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismKeyClaimForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismKeyClaimForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismKeyClaimForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismKeyClaimForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismKeyClaimForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismKeyClaimForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismLinkHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismLinkHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismLinkHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismLinkHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismLinkHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismLinkHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismLinkHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismLinkability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismLinkability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismLinkability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismLinkability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismLinkability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismLinkability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismLinkability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismLogFlooding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismLogFlooding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismLogFlooding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismLogFlooding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismLogFlooding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismLogFlooding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismLogFlooding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismLogTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismLogTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismLogTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismLogTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismLogTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismLogTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismLogTampering","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismMutualRevocation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismMutualRevocation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismMutualRevocation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismMutualRevocation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismMutualRevocation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismMutualRevocation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismMutualRevocation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismOriginScript","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismOriginScript","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismOriginScript","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismOriginScript","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismOriginScript","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismOriginScript","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismOriginScript","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismPersonaHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismPersonaHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismPersonaHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismPersonaHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismPersonaHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismPersonaHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismPersonaHijack","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismQuantumForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismQuantumForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismQuantumForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismQuantumForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismQuantumForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismQuantumForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismQuantumForgery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismQuantumHarvest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismQuantumHarvest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismQuantumHarvest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismQuantumHarvest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismQuantumHarvest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismQuantumHarvest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismQuantumHarvest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismRecoveryLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismRecoveryLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismRecoveryLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismRecoveryLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismRecoveryLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismRecoveryLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismRecoveryLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismRekeyWithholding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismRekeyWithholding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismRekeyWithholding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismRekeyWithholding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismRekeyWithholding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismRekeyWithholding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismRekeyWithholding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismRepudiation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismRepudiation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismRepudiation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismRepudiation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismRepudiation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismRepudiation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismRepudiation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismRogueBind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismRogueBind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismRogueBind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismRogueBind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismRogueBind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismRogueBind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismRogueBind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismStolenDevice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismStolenDevice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismStolenDevice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismStolenDevice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismStolenDevice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismStolenDevice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismStolenDevice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatPrismSyncObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskPrismSyncObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlPrismSyncObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityPrismSyncObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatPrismSyncObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlPrismSyncObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingPrismSyncObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatResourceExhaustion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskResourceExhaustion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlResourceExhaustion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityResourceExhaustion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatResourceExhaustion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlResourceExhaustion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingResourceExhaustion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatSignalingSpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskSignalingSpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlSignalingSpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activitySignalingSpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatSignalingSpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlSignalingSpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingSignalingSpoofing","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatStorageLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskStorageLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlStorageLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityStorageLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatStorageLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlStorageLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingStorageLoss","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.threatVendorSubstitution","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.riskVendorSubstitution","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlVendorSubstitution","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.activityVendorSubstitution","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledThreatVendorSubstitution","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.modeledControlVendorSubstitution","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.mappingVendorSubstitution","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Security.controlSet","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.Source","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.sources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.authority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.groups","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.goals","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.tasks","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.environments","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.measures","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.contextNotes","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.goalsHaveUsers","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.tasksHaveGoals","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.nonemptyAcceptance","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.tasksHaveAcceptance","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.everyGoalNamesAUser","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.everyTaskNamesAGoal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Product.Users.everyTaskNamesAcceptanceEvidence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.Stride","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.EvidenceKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.Evidence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.ControlSet","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.ModeledAsset","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.ModeledThreat","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.ModeledControl","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.ThreatMapping","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.AcceptedRisk","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Production.ThreatModel.NormalizedThreatModel","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.State","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.signingAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.rotationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.revocationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.anchorSaveAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.migrationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.anchorChronologyAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.publicationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.journalRemovalAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.controlAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.rotate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.revoke","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.migrate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.maySign","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.unconfirmedRotationRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.changedAnchorCannotMigrate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.retiredAuthorityCannotPublish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.uncertainJournalCannotBeRemoved","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.revocationBlocksSigning","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.rotateCreatesNextGeneration","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.staleMigrationPreservesState","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Authority.sameKeyRollbackRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.Resources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.Budget","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.chooseBool","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.chooseNat","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.boolAndFalse","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.boolFalseAnd","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.boolNotTrue","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.chooseBoolTrue","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.chooseBoolFalse","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.chooseNatFalse","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.chooseNatTrue","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reserveAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reserveAmount","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settleReserved","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settleSpent","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.resourcesWithin","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.admitAction","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reserveAction","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationPreservesLimit","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.unknownSettlementRetainsReservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementDoesNotIncreaseCharge","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.clockRollbackRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.budgetValid","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.vectorReservationPreservesBudget","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.zeroResources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.addResources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.sameResources","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.resourcesAtMost","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.Reservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.Ledger","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.SettlementOutcome","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.SettlementObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.Selection","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectionFromBool","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectionValue","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectBoth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectRemaining","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectBool","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectNat","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectLedger","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.boolImpliesTruth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectedAdmissionSafety","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectionValueFromBool","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectBoolFromValue","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.outcomeKnown","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationUnused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.resourceAt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.spentAt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservedAt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.headChargedAt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.chargedAt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservedTotal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.spentTotal","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationCostValid","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationsValid","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.ledgerValid","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.ledgerBudget","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reserveLedgerAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationCandidate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reserveLedger","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementRecorded","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settleLedgerAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectedSettlementRecord","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.updateSettlementRecord","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.recordSettlementFrom","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.recordSettlement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCandidate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settleLedger","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.unknownOutcomeRetainsLedger","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.staleEpochCannotSettle","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementClockRollbackRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.recordedIdCannotBeReservedAgain","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settledHeadCannotBeChargedAgain","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.ledgerValiditySelect","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationNumericValidity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationValidityOrder","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationLedgerParts","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationConjunctionClosure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationTrueAnd","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationEpochReflexive","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationFreshCostValidity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationListAdmissionFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationCandidateListGuarantee","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationCandidateNumericGuarantee","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationCandidateGuarantee","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationSelectedSafety","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reserveLedgerPreservesValidity","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reserveLedgerPreservesValidityFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationSelectNat","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationLedgerClockSelect","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationSelectedClockFact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reservationCandidateClock","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.reserveLedgerClockFact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectedRecordId","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectedRecordEpoch","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectedRecordCeiling","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectedRecordCostValidity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectBoolFromBool","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementFromPreservesUnusedIds","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementPreservesUnusedIds","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectNatFromBool","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectedRecordCharge","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarAccountingStep","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarAccounting","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementValidityStep","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementFromPreservesReservationValidity","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementReservationValidityFact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementPreservesReservationValidity","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarBoundToBool","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarBoolToBound","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settledSelectionChargeStep","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarChargeSafe","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarChargeRejected","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarFreshChargeCheck","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarAdditionMonotone","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarFreshChargeGate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarSameConsequent","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarTrueConsequentObserved","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarAdditionCancellation","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarCheckComparisonCongruence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarCheckReflected","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarCheckAdditionCancellation","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.resourceAtChargeConstraint","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarStepChargeSafe","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.resourceAtBound","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarTrueConsequent","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarStepChargeGuarantee","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarConsChargeCheck","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.selectedRecordChargeExpanded","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarSettlementSafety","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarChargeObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.scalarSettlementFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.chargeComparisonObserved","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.chargeFourConjunctionFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCannotIncreaseLedgerCharge","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCannotIncreaseLedgerChargeFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementValidityProjection","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementOldReservationsFact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementListGateFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementNumericGateFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCandidateNumericTransferFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCandidateClock","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settleLedgerClockFact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementImplies","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementImplicationObserved","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementListGateBooleanFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementNumericGateBooleanFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementListDomainGate","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementNumericDomainGate","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCandidateListBoolean","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCandidateNumericBoolean","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCandidateListGuarantee","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCandidateNumericGuarantee","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settlementCandidateGuarantee","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settleLedgerPreservesValidity","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Budget.settleLedgerPreservesValidityFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.ChannelFlow.queueAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.ChannelFlow.sendAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.ChannelFlow.appendAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.ChannelFlow.append","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.ChannelFlow.staleCannotSend","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.Instruction","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.Program","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.Job","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.Checkpoint","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.instructionAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.naturalPower","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.ringModulus","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.normalize","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.bitwiseAcc","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.natBitwise","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.binaryLengthAcc","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.binaryLength","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.ringPow","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.powerWorkAcc","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.powerWork","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.instructionWork","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.zeroExponentIsRingUnit","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.zeroExponentCostsNoMultiplications","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.ringStep","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.powerRetainsExponentBitsAboveU64","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.execute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.appendProgram","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.checkpointLinkAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.semanticTamperingRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.resumeEqualsUninterrupted","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.checkpointStrictlyAdvances","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.supportedWidth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.instructionsAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.instructionCount","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.sameInstruction","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.sameInstructions","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.instructionWellFormed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.instructionsWellFormed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.programAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.takeSteps","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.replayedValue","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.jobAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.checkpointMatchesJob","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.checkpointSuccessor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.acceptedCheckpointIsSemanticReplay","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.ProgramDigestInput","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.ProgramDigestObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.InputDigestInput","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.InputDigestObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.JobDigestInput","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.JobDigestObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.StateDigestInput","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.StateDigestObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.CheckpointDigestInput","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.CheckpointDigestObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.JobCommitments","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.CheckpointCommitments","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.programCommitted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.inputCommitted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.jobCommitted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.stateCommitted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.checkpointCommitted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.committedCheckpointAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.committedCheckpointSuccessor","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.advanceCheckpoint","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.committedCheckpointReplays","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.mismatchedStateValueRejected","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.unsupportedWidthCannotCommit","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.checkpointTransitionNeverRollsBack","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.Word","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.TypedInstruction","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.byteWidth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.wordAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.operandWidth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.arithmeticWidth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedResultBits","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedInstructionAdmission","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedInstructionAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedProgramAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.concatWords","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedStep","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedInstructionWork","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedProgramWorkAcc","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedProgramWork","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedExecute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.appendTypedProgram","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.concatPreservesDeclaredWidth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.concatIsBigEndianAppend","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedResumeEqualsUninterrupted","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.concatCapacityCannotTruncate","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedAdmissionBoundsDeclaredWidth","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Compute.typedAdmissionBoundsResultWidth","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.TransferPhase","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.Receipt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.Transfer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.Placement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.distinctHolders","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.activeCount","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.activeThreshold","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.recoverable","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.receiptLive","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.indexedCopyLive","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.liveCount","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.recoverableAt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.commitAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.activationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.expiredReservationCannotActivate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.replacedRouteCannotActivate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.retireAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.receiptBound","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.failTransfer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.unacknowledgedCannotCommit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.uncommittedCannotRetire","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.retirementPreservesThreshold","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.replaceFirst","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.retireFirst","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.conjunctionPreservationFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.booleanSelfPreservationFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.activeFirstPreservationFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.activeRetirementPreservationFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.activeIndexedPreservationFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.distinctFirstPreservationFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.committedMigrationPreservesRecovery","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.committedMigrationPreservesRecoveryFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.retirementPreservesRecovery","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.retirementPreservesRecoveryFact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.replaceIndex","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.distinctIndexedPreservationFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.indexedMigrationPreservesRecovery","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.indexedMigrationPreservesRecoveryFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.acknowledgeTransfer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.commitTransfer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.PhysicalCopy","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.physicalCopyLive","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.physicalBytes","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.requestedPhase","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.committedPhase","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.sameRequest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.requestWellFormed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.requestUnused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.requestRecorded","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.recordCompletion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.sourcePlaced","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.sourceLive","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.fragmentBound","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.FragmentIntegrityObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.fragmentIntegrityAccepted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.prepareCompletion","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.indexedCopyLiveZero","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.indexedCopyLiveOne","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.indexedCopyLiveTwo","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.choosePlacement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.chooseTruth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.selectionOfTruth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.selectPlacement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.selectTruth","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.recoveryOfChoice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.liveRecoveryOfChoice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.recoveryOfSelection","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.liveRecoveryOfSelection","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.fallbackPreservationFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.migrationBase","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.migrationGate0","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.committedPlacement0","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.staticGate0Preservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.liveGate0Preservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.staticMigrationGate0Fact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.liveMigrationGate0Fact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.migrationGate1","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.committedPlacement1","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.staticGate1Preservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.liveGate1Preservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.staticMigrationGate1Fact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.liveMigrationGate1Fact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.migrationGate2","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.committedPlacement2","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.staticGate2Preservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.liveGate2Preservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.staticMigrationGate2Fact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.liveMigrationGate2Fact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.migrationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.installReceipt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.migrate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.typedMigrationPreservesRecoveryFact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.typedMigrationPreservesRecovery","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.typedMigrationPreservesLiveRecoveryAtObservationTimeFact","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.typedMigrationPreservesLiveRecoveryAtObservationTime","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Custody.expiredReceiptDoesNotCountAsLive","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.Transport","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.TransportCallback","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.transportCanSend","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.transportClose","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.transportOpen","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.transportSessionMatches","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.transportPeerCallbackAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.transportChannelCallbackAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.transportSignalAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.transportPeerAllocationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.closedTransportCannotSend","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.closingAdvancesGeneration","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.DnsPhase","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.DnsDecision","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.DnsScope","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.DnsPublication","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.DnsCandidate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.DnsRead","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.DnsWriteResult","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsScopeMatches","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsMayWritePhase","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsMayReconcile","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsRequestAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsSelectRead","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsDecisionWrites","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.unknownReadNeverWrites","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsSelectGatedRead","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.unknownGatedReadNeverWrites","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsReadDecision","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsReconciled","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsBeginWrite","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.dnsFinishWrite","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.unknownCannotAuthorizeWrite","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.unknownOffersReconciliation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.VmPhase","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.Vm","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmCanBoot","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmIsBooting","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmCanExecute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmStart","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmCallbackAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmFailAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmFail","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmGenerationFilter","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmPositiveGenerationFilterFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmOldGenerationDifference","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmReadyCandidate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.vmObserveReady","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.bootingCannotBootAgain","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.failedVmCanRetry","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.bootingCannotExecute","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.staleTransportGenerationCannotCallback","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.reconnectCannotReviveCapturedCallback","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.staleVmGenerationCannotCallback","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.staleVmCannotResurrectReadiness","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.unresolvedDnsReadCannotWrite","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.C1Progress","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.c1InWindow","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.c1ProbeAccepted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.c1ObserveProbe","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.c1ConnectionQualified","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.c1DirectSuccess","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.fewerThanTenCannotQualify","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.expiredConnectionCannotQualify","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.authorityMayCreate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.existingAuthorityNeverRotates","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.journalMayClaim","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.journalMayFinish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.unknownJournalCannotClaim","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Effects.foreignCandidateCannotFinish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.DependencyKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.Dependency","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.Encoding","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.dependenciesReady","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.selfContainedBytes","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.totalRecoveryBytes","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.rawDecode","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.rawRecoveryExact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.externalBasisNotFree","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.RecoveryObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Encoding.exactRecovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.ClaimKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.EvidenceKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.HostEffect","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.HostAssumptions","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.Evidence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.Scope","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.claimCode","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.kindCode","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.effectCode","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.dependencyKindCode","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.sameAssumptions","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.sameDependency","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.dependenciesUnchanged","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.effectMember","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.effectsCovered","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.positiveEvidenceKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.scopeReusable","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.pureEffectAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.cannotExtendEvidenceHorizon","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Evidence.expiredEvidenceCannotBeReused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.BitPair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.Blocks","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.Fragment","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.xorBit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.encodePair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.recoverLeftParity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.recoverRightParity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.leftParityBitExact","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.rightParityBitExact","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.pairAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.duplicateIndexCannotRecover","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.Bit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.BitBlocks","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.xorCell","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.leftParity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.rightParity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.leftParityInvolutive","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.rightParityInvolutive","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.PairSelection","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.encodeForPair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.decodePair","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Fragments.everyCompatiblePairRecoversFiniteBlocks","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Identity.Digest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Identity.Object","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Identity.DigestObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Identity.sameDigest","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Identity.digestWellFormed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Identity.digestAccepted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Identity.fullDigestReflexive","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Observation.Reachability","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Observation.PeerObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Observation.observationFresh","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Observation.acceptObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Observation.expiredObservationRejected","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Observation.reachableObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Observation.updateObservation","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Observation.futureObservationRejected","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Observation.acceptedObservationIsFresh","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.Authority","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.Pointer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.successorAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.acceptPointer","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.restoreAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.unacceptedRestoreRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.restoreDifferentHeadGuard","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.differentRetainedHeadRestoreRefused","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.expiredRestoreRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.successorStrictlyAdvances","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.wrongAuthorityRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Pointer.rollbackRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.deviceMaySign","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.mayAdminister","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.bindAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.linkGate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.linkOfferAccepted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.receivesPrivateBoundary","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.scopeAdmits","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.actionAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.actionGate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.actionFresh","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.hostAdmitsDevice","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.boundaryKeyAdmitted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.revocationCounts","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.recoveryBindAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.thresholdMet","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.mayShareBoundary","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.hybridWrapRequired","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.attestationBinds","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.boundaryShared","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.boundaryVisibleTo","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.hybridSignatureAccepted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.presenceSatisfied","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.unlinkedDeviceCannotSign","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.revokedDeviceCannotSign","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.unlinkedSignerCannotBind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.delegateCannotBind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.invalidBindSignatureRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.foreignPrismBindRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.unconfirmedLinkRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.usedOfferRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.wrongSecretRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.expiredOfferRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.delegateNeverReceivesPrivateBoundary","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.delegateOutsideScopeRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.revokedDeviceActionRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.replayedActionRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.wrongAudienceActionRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.staleActionRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.unattestedDeviceRefusedWhenRequired","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.staleBoundaryKeyRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.memberCannotRevokeRecovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.revokedByRecoveryCannotRevoke","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.memberCannotReplaceRecovery","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.belowThresholdRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.zeroThresholdRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.hardenedDeviceCannotShare","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.postQuantumDowngradeRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.attestationForOtherKeyRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.singleIdentityBoundaryPrivate","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.twoIdentitiesMakeBoundaryShared","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.nonMemberSeesOnlyPublished","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.classicalSignatureAlwaysRequired","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.postQuantumSignatureStripRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.unverifiedApprovalRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.approvalOfOtherActionRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.PrismId.forgedApprovalRefused","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.Limits","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.State","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.admitted","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.commit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.anchorAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.progressAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.rollbackProgressRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.unverifiedImportPreservesState","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.acceptedCandidateWithinBounds","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Recovery.staleGenerationRefused","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.Limits","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.limits","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.signalLifetime","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.warmLifetime","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.Capacity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.Identity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.Frame","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.Assembly","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.sameIdentity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.frameAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.admissionAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.admitCapacity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.release","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.assemblyCurrent","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.appendAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.append","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.ready","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.beginVerification","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.deliveryAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.effectAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.duplicateDoesNotAdvanceAssembly","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.unverifiedMessageCannotDeliver","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.closedSessionCannotPublish","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.effectFalseGuard","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Relay.withdrawnConsentCannotPublish","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.Signaling.admissionAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.Signaling.unverifiedCannotAdmit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.ActionKind","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.State","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.Action","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.admitAction","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.requestAction","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.requestDoesNotChangeObjectCustody","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.requestDoesNotCreateEvidence","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.ledgerPlacementValid","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.valid","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.validAt","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.requestMigrationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.requestMigration","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.reservationActive","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.completionSafetyGuard","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.completeMigrationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.completionBudget","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.completionLedger","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.ledgerTime","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.ledgerHistory","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.clockViewGrouping","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.ledgerClockView","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.System.completionHistory","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.completionTime","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.clockAdvanceFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.System.historyPreservedFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.completionLedgerValidityFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.System.choosePlacement","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.ledgerPlacementValiditySelect","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.productValiditySelect","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.completionSelectionReserved","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.reservationClock","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.completionClock","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.guardedProductPreservationFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.requestAdmissionProductFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.weakenAdmissionFact","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.requestMigrationCandidateValidityFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.System.migrationCandidateValidity","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.migrationCandidateValidityFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.System.applyMigration","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.migrationRequestDoesNotEstablishCustody","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.migrationRequestPreservesProductInvariantFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.System.migrationRequestPreservesProductInvariant","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.System.migrationPreservesProductInvariantFact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.System.migrationPreservesProductInvariant","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.Stitch.System.migrationCompletionDoesNotRefundBudget","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.settleActionAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.settleAction","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.System.settlementDoesNotEstablishCustody","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.shareAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.ethernetAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.commandAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.observationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.administrationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.forgetAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.allocationAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.metadataAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.resultReadAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.terminationRequired","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.filesystemAllocationLimit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.filesystemFileLimit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.filesystemMetadataLimit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.outputLimit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.retainedOutputLimit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.runtimeLimitMs","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.staticAddressAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.networkChangeAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.networkSharingAllowed","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.retainedInstanceCannotReconfigure","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.Stitch.VmAdministration.unconfiguredCannotShareEthernet","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.StitchApp.byteNat","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.unsignedBE","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.flag","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.flagsCanonical","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.verdict","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.StitchApp.decimalDigit","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.StitchApp.decimalBytes","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"StitchModel.StitchApp.ringProbe","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.budgetProbe","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.pointerProbe","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.custodyProbe","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.pairProbe","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.dispatch","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"StitchModel.StitchApp.application","observed":[],"policy":{"axioms":[],"kind":"none"},"result":"ok"},{"name":"LexLeanRuntime.Appendable","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Appendable.append","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Appendable.casesOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Appendable.ctorIdx","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Appendable.mk._flat_ctor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Appendable.mk.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Appendable.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Appendable.noConfusionType","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Appendable.recOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal.casesOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal.ctorIdx","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal.format","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal.mk._flat_ctor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal.mk.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal.noConfusionType","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal.parse","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Decimal.recOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.bitAnd","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.bitNot","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.bitOr","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.bitXor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.casesOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.ctorIdx","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.fromInt","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.maximum","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.minimum","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.mk._flat_ctor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.mk.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.noConfusionType","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.recOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.shiftLeft","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.shiftRight","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Fixed.toToMathInt","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Indexable","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Indexable.casesOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Indexable.ctorIdx","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Indexable.index","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Indexable.mk._flat_ctor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Indexable.mk.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Indexable.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Indexable.noConfusionType","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Indexable.recOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Lengthable","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Lengthable.casesOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Lengthable.ctorIdx","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Lengthable.length","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Lengthable.mk._flat_ctor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Lengthable.mk.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Lengthable.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Lengthable.noConfusionType","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Lengthable.recOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.casesOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.ctorIdx","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.isZero","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.mk._flat_ctor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.mk.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.noConfusionType","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.quotient","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.recOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Quotient.remainder","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Sliceable","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Sliceable.casesOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Sliceable.ctorIdx","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Sliceable.mk._flat_ctor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Sliceable.mk.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Sliceable.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Sliceable.noConfusionType","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Sliceable.recOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.Sliceable.slice","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.ToMathInt","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.ToMathInt.casesOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.ToMathInt.ctorIdx","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.ToMathInt.mk._flat_ctor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.ToMathInt.mk.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.ToMathInt.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.ToMathInt.noConfusionType","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.ToMathInt.recOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.ToMathInt.toInt","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.append","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.bitAnd","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.bitNot","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.bitOr","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.bitXor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedAdd","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedAddInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedConvert","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedFromInt","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedMultiply","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedMultiplyInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedMultiplyInt64.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedNegate","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedNegateInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedQuotient","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedQuotientInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedSubtract","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.checkedSubtractInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.compareBytes","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.divideMagnitudeInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.divideMagnitudeInt64._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.divideMagnitudeInt64._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.divideMagnitudeInt64._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.divideMagnitudeInt64.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.equal","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.formatDecimal","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.index","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instAppendableByteArray","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instAppendableList","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instDecimalInt","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instDecimalInt.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instDecimalOfFixedOfToString","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instFixedInt16","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instFixedInt32","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instFixedInt64","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instFixedInt8","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instFixedUInt16","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instFixedUInt32","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instFixedUInt64","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instFixedUInt8","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instIndexableByteArrayUInt8","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instIndexableList","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instLengthableByteArray","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instLengthableList","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instLengthableString","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instQuotientInt","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instQuotientNat","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instSliceableByteArray","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instSliceableList","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.instToMathIntInt","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.join","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.length","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.listIndex","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.listIndex._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.listIndex._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.listIndex._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.listIndex.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.magnitudeInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.multiply","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.multiplyMagnitudeInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.multiplyMagnitudeInt64._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.multiplyMagnitudeInt64._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.multiplyMagnitudeInt64._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.multiplyMagnitudeInt64.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.negate","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.parseDecimal","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.quotient","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.remainder","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.shiftLeft","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.shiftRight","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.signedMagnitudeInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.slice","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.splitExact","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.subtract","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.utf8Decode","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.utf8Encode","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.Key","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.Key.casesOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.Key.compare","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.Key.ctorIdx","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.Key.mk._flat_ctor","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.Key.mk.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.Key.noConfusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.Key.noConfusionType","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.Key.recOn","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.compareCodes","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.compareCodes._f","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.compareCodes._sparseCasesOn_1","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.compareCodes._sunfold","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.compareCodes._unsafe_rec","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.compareCodes.match_1","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.compareCodes.match_4","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.containsElement","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.containsElement._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.containsElement._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.containsElement._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.graphNodes","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.graphReachable","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.graphSuccessors","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.graphTopological","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertElement","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertElement._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertElement._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertElement._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertElement.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertEntry","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertEntry._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertEntry._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertEntry._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertEntry.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.insertEntry.match_3","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyBool","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyInt","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyInt16","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyInt32","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyInt8","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyNat","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyProd","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyString","observed":["Classical.choice","Quot.sound","propext"],"policy":{"axioms":["Classical.choice","Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyUInt16","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyUInt32","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyUInt64","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.instKeyUInt8","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterate","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterate._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterate._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterate._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterate.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterateUntil","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterateUntil._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterateUntil._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterateUntil._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.iterateUntil.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.lessThan","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.lessThan._sparseCasesOn_1","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.lessThan.match_1","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.listFold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.lookupEntry","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.lookupEntry._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.lookupEntry._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.lookupEntry._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.mapContains","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.mapEntries","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.mapFold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.mapInsert","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.mapKeys","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.mapLookup","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.mapRemove","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.mapSize","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.mapValues","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.reachableFrom","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.reachableFrom._f","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.reachableFrom._sparseCasesOn_1","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.reachableFrom._sunfold","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.reachableFrom._unsafe_rec","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.reachableFrom.match_1","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.reachableFrom.match_4","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.removeElement","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.removeElement._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.removeElement._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.removeElement._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.removeEntry","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.removeEntry._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.removeEntry._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.removeEntry._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.setContains","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.setDifference","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.setElements","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.setFold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.setInsert","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.setIntersection","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.setRemove","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.setSize","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.setUnion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.topological","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.topological._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.topological._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.topological._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.lessThan._sparseCasesOn_1.else_eq","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.lessThan.eq_1","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanCollections.listFold.eq_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.append_list","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.length_list","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_int","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_int16","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_int32","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_int64","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_int8","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_nat","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_uint16","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_uint32","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_uint64","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.lessThan_uint8","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_add_int","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_add_int_self","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_add_nat","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_add_nat_self","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_append","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_cons","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_extend","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_fusion","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_nil","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_pair","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_prepend","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_sub_int","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.listFold_sub_int_self","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.mapEntries_self","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.mapFold_listFold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.mapSize_length","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.quotient_int","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.quotient_nat","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.remainder_int","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.remainder_nat","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.setElements_self","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.setFold_listFold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.setSize_length","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt.eq_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt.eq_2","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt.eq_def","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_add","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_append","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_cons","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_const","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_mul","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_mul_right","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_mul_self","observed":["propext"],"policy":{"axioms":["propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_neg","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_neg_self","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_nil","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_perm","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_reverse","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumInt_sub","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat._f","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat._sunfold","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat._unsafe_rec","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat.eq_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat.eq_2","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat.eq_def","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat.match_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_add","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_append","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_cons","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_const","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_mul","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_mul_right","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_mul_self","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_nil","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_perm","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.sumNat_reverse","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.tdiv_ediv","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanLaws.tmod_emod","observed":["Quot.sound","propext"],"policy":{"axioms":["Quot.sound","propext"],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.quotient.eq_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"},{"name":"LexLeanRuntime.remainder.eq_1","observed":[],"policy":{"axioms":[],"kind":"exact"},"result":"ok"}],"host":{"arch":"x86_64","os":"linux"},"lake_workspace":[{"path":"lake-manifest.json","sha256":"1107bc06d0f0bf1716fbc980995e4895f608331a17863d16bb1ff631d70924f6"},{"path":"lakefile.toml","sha256":"f93d661ae8380e42c7954c0a90166abb296ac100af42b403d7af0ac7e6b50094"},{"path":"lean-toolchain","sha256":"8e3538e0ab5f81a3ee04927d8838c8c674e0e112838b4b3ce87ec218143276af"}],"lexlean":{"compiler_semantics":"5262e5b4c8b5668ae7066ad686757a6bb7f80c941d515fb9d586894fbc7de69a","executable_sha256":"e4168b533d3369e7e0e2ed7cdb331f8dd94e3aa20362d55ded086a24ca3b16f8","version":"0.3.0"},"oleans":[{"byte_length":430856,"module":"LexLeanRuntime.Portable","sha256":"b977672854525e77607b537c3be5adba33aaca00b47edfa6a30bd0d36ffd5094"},{"byte_length":303136,"module":"LexLeanRuntime.Collections","sha256":"9eac5c21764b72bf897ffe00d9e5624799e1eb1bae2dea3c81f33864928b4f87"},{"byte_length":334096,"module":"LexLeanRuntime.Laws","sha256":"ba661b0b6bc49533546a02810a274bde3e58849f52d6ff55a473c95c51453cfa"},{"byte_length":579288,"module":"StitchModel.Foundation.Arch","sha256":"e5b85b4e8ea31cf411394c9fdc8d5f554666aec24b93a659908eb2e5fee83d27"},{"byte_length":87896,"module":"StitchModel.Foundation.Bytes","sha256":"77aa5bdaccf11b32dba7bdbd7f91a177ea06b47d7bdc89f36e5f2d785b24d4d7"},{"byte_length":375000,"module":"StitchModel.Foundation.Experience.V1.Model","sha256":"24b47d101ac5c2b0629605565be4f90a9594dd2a532b635cb827991e7cc31d1b"},{"byte_length":66136,"module":"StitchModel.Foundation.Qual","sha256":"d81bf7793d3c21173344032f458608f3fea11885e8bf476ee67064ecaffab4f5"},{"byte_length":154784,"module":"StitchModel.Foundation.Sec","sha256":"11e16dd4e9d35b6c42d86d9f70b1fc06dc512413a13cba1518d1fc2e5cdba51f"},{"byte_length":110960,"module":"StitchModel.Foundation.View.Text.V1.Model","sha256":"9be71a3d821686f501f1c798f898f0f4b62db34898093042124ad63228627072"},{"byte_length":56656,"module":"StitchModel.Product.Architecture","sha256":"22ca06c6d4b2c26971ba4e5a7c6783edaa52618593754d3b756680c6a00e371c"},{"byte_length":51808,"module":"StitchModel.Product.Brand","sha256":"d18ea4a91a56ba737594d869ea9d2e5632bd864b7807bba0edb49cd09b443d6a"},{"byte_length":79888,"module":"StitchModel.Product.Compliance","sha256":"92f7816bb652daed5aec7c035ec08b987e48cde7ef37d9646308f74db0126c8b"},{"byte_length":114744,"module":"StitchModel.Product.Design","sha256":"193d7cb5001d1488dfd6c539a3c309b37be80b68fd02f507f046035e1230e8b8"},{"byte_length":358200,"module":"StitchModel.Product.Experience","sha256":"f98fff2c83f77a9f51458144603a31a925964e6562c9e1a77321c62d42e42ae6"},{"byte_length":176312,"module":"StitchModel.Product.Features","sha256":"cb1407655362ebd8b9170f3da9e2bd75f05cb6f0433178b381ff456f565bbc35"},{"byte_length":323360,"module":"StitchModel.Product.Host","sha256":"def1f4815fde1fc154be9835c1154e3b858fd32d2df4009cd84c61beb9988329"},{"byte_length":438856,"module":"StitchModel.Product.Model","sha256":"a4d5e6845aa84ab54f90cf2dc3b3b2e59df0656bb769344e9b80e67477fc721c"},{"byte_length":90312,"module":"StitchModel.Product.Persistence","sha256":"aee48136b9114e3c2ca7c861628297ebde1a70edfa061100fc562640f8f20b0e"},{"byte_length":101424,"module":"StitchModel.Product.Quality","sha256":"55103d0e69e5e115f4d47af31e658e7e4b68ae01fe6fbb6d3244bd564674cc34"},{"byte_length":101680,"module":"StitchModel.Product.Release","sha256":"b6621ea96fd799808f6322ebb84c1d9b6d3f503f0b7f454df0f7cb0829a141fb"},{"byte_length":243728,"module":"StitchModel.Product.Security","sha256":"d857b6611751b66cb9eae253ab479d81c148832c88fb580d4248d18c1d40bec1"},{"byte_length":98712,"module":"StitchModel.Product.Users","sha256":"db5c7d2a06b7bdf902b0d71dd277f7f2ab16146ab8c7212fd4394af116d5beb4"},{"byte_length":214144,"module":"StitchModel.Production.ThreatModel","sha256":"45f13c64564d3ed2e4802242f6c96ff7c04badf716590902321ce0292038f6e7"},{"byte_length":65032,"module":"StitchModel.Stitch.Authority","sha256":"738cc7f8b390cd59584679bc4c5863858f4519b516a6d47f909806be51b68d22"},{"byte_length":507144,"module":"StitchModel.Stitch.Budget","sha256":"977c119dd56b881e0305a9eb9e2f29bd2bc5c6adf6f7e2000dbcf2f7ea5d9234"},{"byte_length":17200,"module":"StitchModel.Stitch.ChannelFlow","sha256":"62984864890a74209655cc039c0439ba7c0b649541313d35c6a81110ce6e25e6"},{"byte_length":673256,"module":"StitchModel.Stitch.Compute","sha256":"5e480d363afa1596c21a7213e420e38e52b12bd4feb1106e631aaf658387fe11"},{"byte_length":378056,"module":"StitchModel.Stitch.Custody","sha256":"324958e2649b135e37aeb669fb8a3806f4e540ae70d4439b2addbda4e1f3544e"},{"byte_length":404512,"module":"StitchModel.Stitch.Effects","sha256":"c1a6549b69e48580738638045e2304e26f5e6fb913d65113d5ad531aef5379bb"},{"byte_length":153176,"module":"StitchModel.Stitch.Encoding","sha256":"18ca75c74fae7901620b63bf87278bc50bfe3e79a9cab30d3361078baf9396a9"},{"byte_length":345648,"module":"StitchModel.Stitch.Evidence","sha256":"389a481d1333e0da1bf80a7bcab6fc5e11161317c827c6c48527f8bb82937fda"},{"byte_length":228968,"module":"StitchModel.Stitch.Fragments","sha256":"ba420fc12c4576dc08c71e81954ce8783147b7b8284999b5a1f5a535726b8c92"},{"byte_length":92264,"module":"StitchModel.Stitch.Identity","sha256":"c85c3fbaa9946a5f9e0e3d2aa48d4d30414591986a1f7098b441dbd499c3d5bf"},{"byte_length":100232,"module":"StitchModel.Stitch.Observation","sha256":"c17866d71e33bfc12fe245787245ba8efa3a78aad41ade76c405241183c29f59"},{"byte_length":88160,"module":"StitchModel.Stitch.Pointer","sha256":"fa948ee72c532933e6b2b09b6ef4dceccfad262b91bb2f505e5a9d0d6cca58db"},{"byte_length":79176,"module":"StitchModel.Stitch.PrismId","sha256":"85cd7c805cc6a0ecb36b3ea2fc756c76e408f36668ab945f9fe331dbbe333fe1"},{"byte_length":79552,"module":"StitchModel.Stitch.Recovery","sha256":"a69cc2a587fd363aa199cb841b0d37f3cb3349efb1832173b8740c1c04393663"},{"byte_length":168416,"module":"StitchModel.Stitch.Relay","sha256":"1d761a7220e74766b1e0da7c77ff48c398d363aee2e19f7f17c53b4b2a5911fa"},{"byte_length":9360,"module":"StitchModel.Stitch.Signaling","sha256":"1c03b15d5517819285480dd3874c51dd77b6a5bc62e6799e14755524e7f02837"},{"byte_length":215096,"module":"StitchModel.Stitch.System","sha256":"6c1078e09a2d3b8bbd6892cdacc987da5ee7f7ded64be2adf4c346fff7524933"},{"byte_length":36528,"module":"StitchModel.Stitch.VmAdministration","sha256":"e211676f1d506e28c8cabada3407dc0b24743124bd1d28a5c1e63c600e1698c3"},{"byte_length":121112,"module":"StitchModel.StitchApp","sha256":"22ea6260d513387f4968d06aef0a8e2a9ccd29eccff6047680eb3f4d0b4fa4be"}],"processes":[{"argv":["env","lean","$STAGING/probe/LexLeanProbe.Pf8e732898667afd4927eb16ffab20fe2.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanProbe.Pf8e732898667afd4927eb16ffab20fe2","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/LexLeanRuntime/Portable.olean","$STAGING/lean-src/LexLeanRuntime/Portable.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanRuntime.Portable","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/LexLeanRuntime/Collections.olean","$STAGING/lean-src/LexLeanRuntime/Collections.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanRuntime.Collections","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/LexLeanRuntime/Laws.olean","$STAGING/lean-src/LexLeanRuntime/Laws.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanRuntime.Laws","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Foundation/Arch.olean","$STAGING/lean-src/StitchModel/Foundation/Arch.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Foundation.Arch","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Foundation/Bytes.olean","$STAGING/lean-src/StitchModel/Foundation/Bytes.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Foundation.Bytes","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Foundation/Qual.olean","$STAGING/lean-src/StitchModel/Foundation/Qual.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Foundation.Qual","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Foundation/Sec.olean","$STAGING/lean-src/StitchModel/Foundation/Sec.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Foundation.Sec","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Foundation/View/Text/V1/Model.olean","$STAGING/lean-src/StitchModel/Foundation/View/Text/V1/Model.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Foundation.View.Text.V1.Model","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Compliance.olean","$STAGING/lean-src/StitchModel/Product/Compliance.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Compliance","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Experience.olean","$STAGING/lean-src/StitchModel/Product/Experience.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Experience","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Model.olean","$STAGING/lean-src/StitchModel/Product/Model.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Model","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Release.olean","$STAGING/lean-src/StitchModel/Product/Release.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Release","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Authority.olean","$STAGING/lean-src/StitchModel/Stitch/Authority.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Authority","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/ChannelFlow.olean","$STAGING/lean-src/StitchModel/Stitch/ChannelFlow.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.ChannelFlow","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Effects.olean","$STAGING/lean-src/StitchModel/Stitch/Effects.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Effects","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Identity.olean","$STAGING/lean-src/StitchModel/Stitch/Identity.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Identity","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Observation.olean","$STAGING/lean-src/StitchModel/Stitch/Observation.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Observation","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/PrismId.olean","$STAGING/lean-src/StitchModel/Stitch/PrismId.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.PrismId","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Recovery.olean","$STAGING/lean-src/StitchModel/Stitch/Recovery.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Recovery","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Relay.olean","$STAGING/lean-src/StitchModel/Stitch/Relay.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Relay","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Signaling.olean","$STAGING/lean-src/StitchModel/Stitch/Signaling.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Signaling","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/VmAdministration.olean","$STAGING/lean-src/StitchModel/Stitch/VmAdministration.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.VmAdministration","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Foundation/Experience/V1/Model.olean","$STAGING/lean-src/StitchModel/Foundation/Experience/V1/Model.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Foundation.Experience.V1.Model","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Architecture.olean","$STAGING/lean-src/StitchModel/Product/Architecture.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Architecture","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Persistence.olean","$STAGING/lean-src/StitchModel/Product/Persistence.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Persistence","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Quality.olean","$STAGING/lean-src/StitchModel/Product/Quality.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Quality","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Production/ThreatModel.olean","$STAGING/lean-src/StitchModel/Production/ThreatModel.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Production.ThreatModel","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Budget.olean","$STAGING/lean-src/StitchModel/Stitch/Budget.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Budget","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Compute.olean","$STAGING/lean-src/StitchModel/Stitch/Compute.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Compute","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Encoding.olean","$STAGING/lean-src/StitchModel/Stitch/Encoding.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Encoding","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Pointer.olean","$STAGING/lean-src/StitchModel/Stitch/Pointer.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Pointer","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Brand.olean","$STAGING/lean-src/StitchModel/Product/Brand.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Brand","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Design.olean","$STAGING/lean-src/StitchModel/Product/Design.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Design","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Features.olean","$STAGING/lean-src/StitchModel/Product/Features.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Features","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Host.olean","$STAGING/lean-src/StitchModel/Product/Host.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Host","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Security.olean","$STAGING/lean-src/StitchModel/Product/Security.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Security","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Evidence.olean","$STAGING/lean-src/StitchModel/Stitch/Evidence.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Evidence","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Fragments.olean","$STAGING/lean-src/StitchModel/Stitch/Fragments.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Fragments","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Product/Users.olean","$STAGING/lean-src/StitchModel/Product/Users.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Product.Users","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/Custody.olean","$STAGING/lean-src/StitchModel/Stitch/Custody.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.Custody","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/Stitch/System.olean","$STAGING/lean-src/StitchModel/Stitch/System.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.Stitch.System","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","lean","-R","$STAGING/lean-src","-o","$STAGING/oleans/StitchModel/StitchApp.olean","$STAGING/lean-src/StitchModel/StitchApp.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"StitchModel.StitchApp","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"lean"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","LexLeanRuntime.Portable"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"LexLeanRuntime.Portable","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","LexLeanRuntime.Collections"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"LexLeanRuntime.Collections","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","LexLeanRuntime.Laws"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"LexLeanRuntime.Laws","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Foundation.Arch"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Foundation.Arch","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Foundation.Bytes"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Foundation.Bytes","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Foundation.Experience.V1.Model"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Foundation.Experience.V1.Model","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Foundation.Qual"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Foundation.Qual","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Foundation.Sec"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Foundation.Sec","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Foundation.View.Text.V1.Model"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Foundation.View.Text.V1.Model","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Architecture"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Architecture","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Brand"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Brand","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Compliance"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Compliance","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Design"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Design","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Experience"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Experience","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Features"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Features","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Host"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Host","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Model"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Model","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Persistence"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Persistence","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Quality"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Quality","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Release"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Release","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Security"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Security","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Product.Users"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Product.Users","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Production.ThreatModel"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Production.ThreatModel","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Authority"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Authority","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Budget"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Budget","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.ChannelFlow"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.ChannelFlow","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Compute"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Compute","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Custody"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Custody","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Effects"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Effects","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Encoding"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Encoding","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Evidence"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Evidence","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Fragments"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Fragments","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Identity"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Identity","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Observation"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Observation","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Pointer"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Pointer","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.PrismId"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.PrismId","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Recovery"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Recovery","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Relay"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Relay","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.Signaling"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.Signaling","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.System"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.System","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.Stitch.VmAdministration"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.Stitch.VmAdministration","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","$TOOLCHAIN/bin/leanchecker","StitchModel.StitchApp"],"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","exit_code":0,"module":"StitchModel.StitchApp","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"\n","stdout_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","tool":"leanchecker"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.LexLeanRuntime.Collections.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.LexLeanRuntime.Collections","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'LexLeanCollections.Key' does not depend on any axioms\n'LexLeanCollections.Key.casesOn' does not depend on any axioms\n'LexLeanCollections.Key.compare' does not depend on any axioms\n'LexLeanCollections.Key.ctorIdx' does not depend on any axioms\n'LexLeanCollections.Key.mk._flat_ctor' does not depend on any axioms\n'LexLeanCollections.Key.mk.noConfusion' does not depend on any axioms\n'LexLeanCollections.Key.noConfusion' does not depend on any axioms\n'LexLeanCollections.Key.noConfusionType' does not depend on any axioms\n'LexLeanCollections.Key.recOn' does not depend on any axioms\n'LexLeanCollections.compareCodes' depends on axioms: [propext]\n'LexLeanCollections.compareCodes._f' depends on axioms: [propext]\n'LexLeanCollections.compareCodes._sparseCasesOn_1' depends on axioms: [propext]\n'LexLeanCollections.compareCodes._sunfold' depends on axioms: [propext]\n'LexLeanCollections.compareCodes._unsafe_rec' depends on axioms: [propext]\n'LexLeanCollections.compareCodes.match_1' depends on axioms: [propext]\n'LexLeanCollections.compareCodes.match_4' does not depend on any axioms\n'LexLeanCollections.containsElement' does not depend on any axioms\n'LexLeanCollections.containsElement._f' does not depend on any axioms\n'LexLeanCollections.containsElement._sunfold' does not depend on any axioms\n'LexLeanCollections.containsElement._unsafe_rec' does not depend on any axioms\n'LexLeanCollections.graphNodes' does not depend on any axioms\n'LexLeanCollections.graphReachable' depends on axioms: [propext]\n'LexLeanCollections.graphSuccessors' does not depend on any axioms\n'LexLeanCollections.graphTopological' does not depend on any axioms\n'LexLeanCollections.insertElement' does not depend on any axioms\n'LexLeanCollections.insertElement._f' does not depend on any axioms\n'LexLeanCollections.insertElement._sunfold' does not depend on any axioms\n'LexLeanCollections.insertElement._unsafe_rec' does not depend on any axioms\n'LexLeanCollections.insertElement.match_1' does not depend on any axioms\n'LexLeanCollections.insertEntry' does not depend on any axioms\n'LexLeanCollections.insertEntry._f' does not depend on any axioms\n'LexLeanCollections.insertEntry._sunfold' does not depend on any axioms\n'LexLeanCollections.insertEntry._unsafe_rec' does not depend on any axioms\n'LexLeanCollections.insertEntry.match_1' does not depend on any axioms\n'LexLeanCollections.insertEntry.match_3' does not depend on any axioms\n'LexLeanCollections.instKeyBool' depends on axioms: [propext]\n'LexLeanCollections.instKeyInt' does not depend on any axioms\n'LexLeanCollections.instKeyInt16' does not depend on any axioms\n'LexLeanCollections.instKeyInt32' does not depend on any axioms\n'LexLeanCollections.instKeyInt64' does not depend on any axioms\n'LexLeanCollections.instKeyInt8' does not depend on any axioms\n'LexLeanCollections.instKeyNat' does not depend on any axioms\n'LexLeanCollections.instKeyProd' depends on axioms: [propext]\n'LexLeanCollections.instKeyString' depends on axioms: [propext, Classical.choice, Quot.sound]\n'LexLeanCollections.instKeyUInt16' does not depend on any axioms\n'LexLeanCollections.instKeyUInt32' does not depend on any axioms\n'LexLeanCollections.instKeyUInt64' does not depend on any axioms\n'LexLeanCollections.instKeyUInt8' does not depend on any axioms\n'LexLeanCollections.iterate' does not depend on any axioms\n'LexLeanCollections.iterate._f' does not depend on any axioms\n'LexLeanCollections.iterate._sunfold' does not depend on any axioms\n'LexLeanCollections.iterate._unsafe_rec' does not depend on any axioms\n'LexLeanCollections.iterate.match_1' does not depend on any axioms\n'LexLeanCollections.iterateUntil' does not depend on any axioms\n'LexLeanCollections.iterateUntil._f' does not depend on any axioms\n'LexLeanCollections.iterateUntil._sunfold' does not depend on any axioms\n'LexLeanCollections.iterateUntil._unsafe_rec' does not depend on any axioms\n'LexLeanCollections.iterateUntil.match_1' does not depend on any axioms\n'LexLeanCollections.lessThan' depends on axioms: [propext]\n'LexLeanCollections.lessThan._sparseCasesOn_1' depends on axioms: [propext]\n'LexLeanCollections.lessThan.match_1' depends on axioms: [propext]\n'LexLeanCollections.listFold' does not depend on any axioms\n'LexLeanCollections.lookupEntry' does not depend on any axioms\n'LexLeanCollections.lookupEntry._f' does not depend on any axioms\n'LexLeanCollections.lookupEntry._sunfold' does not depend on any axioms\n'LexLeanCollections.lookupEntry._unsafe_rec' does not depend on any axioms\n'LexLeanCollections.mapContains' does not depend on any axioms\n'LexLeanCollections.mapEntries' does not depend on any axioms\n'LexLeanCollections.mapFold' does not depend on any axioms\n'LexLeanCollections.mapInsert' does not depend on any axioms\n'LexLeanCollections.mapKeys' does not depend on any axioms\n'LexLeanCollections.mapLookup' does not depend on any axioms\n'LexLeanCollections.mapRemove' does not depend on any axioms\n'LexLeanCollections.mapSize' does not depend on any axioms\n'LexLeanCollections.mapValues' does not depend on any axioms\n'LexLeanCollections.reachableFrom' depends on axioms: [propext]\n'LexLeanCollections.reachableFrom._f' depends on axioms: [propext]\n'LexLeanCollections.reachableFrom._sparseCasesOn_1' depends on axioms: [propext]\n'LexLeanCollections.reachableFrom._sunfold' depends on axioms: [propext]\n'LexLeanCollections.reachableFrom._unsafe_rec' depends on axioms: [propext]\n'LexLeanCollections.reachableFrom.match_1' depends on axioms: [propext]\n'LexLeanCollections.reachableFrom.match_4' does not depend on any axioms\n'LexLeanCollections.removeElement' does not depend on any axioms\n'LexLeanCollections.removeElement._f' does not depend on any axioms\n'LexLeanCollections.removeElement._sunfold' does not depend on any axioms\n'LexLeanCollections.removeElement._unsafe_rec' does not depend on any axioms\n'LexLeanCollections.removeEntry' does not depend on any axioms\n'LexLeanCollections.removeEntry._f' does not depend on any axioms\n'LexLeanCollections.removeEntry._sunfold' does not depend on any axioms\n'LexLeanCollections.removeEntry._unsafe_rec' does not depend on any axioms\n'LexLeanCollections.setContains' does not depend on any axioms\n'LexLeanCollections.setDifference' does not depend on any axioms\n'LexLeanCollections.setElements' does not depend on any axioms\n'LexLeanCollections.setFold' does not depend on any axioms\n'LexLeanCollections.setInsert' does not depend on any axioms\n'LexLeanCollections.setIntersection' does not depend on any axioms\n'LexLeanCollections.setRemove' does not depend on any axioms\n'LexLeanCollections.setSize' does not depend on any axioms\n'LexLeanCollections.setUnion' does not depend on any axioms\n'LexLeanCollections.topological' does not depend on any axioms\n'LexLeanCollections.topological._f' does not depend on any axioms\n'LexLeanCollections.topological._sunfold' does not depend on any axioms\n'LexLeanCollections.topological._unsafe_rec' does not depend on any axioms\n","stdout_sha256":"b75acc0e99e23684c3cc876eacbfc93f47161cfee8a7440df17fa45f321c8c6a","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.LexLeanRuntime.Laws.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.LexLeanRuntime.Laws","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'LexLeanCollections.lessThan._sparseCasesOn_1.else_eq' depends on axioms: [propext]\n'LexLeanCollections.lessThan.eq_1' depends on axioms: [propext]\n'LexLeanCollections.listFold.eq_1' does not depend on any axioms\n'LexLeanLaws.append_list' does not depend on any axioms\n'LexLeanLaws.length_list' does not depend on any axioms\n'LexLeanLaws.lessThan_int' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.lessThan_int16' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.lessThan_int32' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.lessThan_int64' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.lessThan_int8' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.lessThan_nat' depends on axioms: [propext]\n'LexLeanLaws.lessThan_uint16' depends on axioms: [propext]\n'LexLeanLaws.lessThan_uint32' depends on axioms: [propext]\n'LexLeanLaws.lessThan_uint64' depends on axioms: [propext]\n'LexLeanLaws.lessThan_uint8' depends on axioms: [propext]\n'LexLeanLaws.listFold_add_int' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.listFold_add_int_self' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.listFold_add_nat' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.listFold_add_nat_self' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.listFold_append' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.listFold_cons' does not depend on any axioms\n'LexLeanLaws.listFold_extend' depends on axioms: [propext]\n'LexLeanLaws.listFold_fusion' does not depend on any axioms\n'LexLeanLaws.listFold_nil' does not depend on any axioms\n'LexLeanLaws.listFold_pair' does not depend on any axioms\n'LexLeanLaws.listFold_prepend' depends on axioms: [propext]\n'LexLeanLaws.listFold_sub_int' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.listFold_sub_int_self' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.mapEntries_self' does not depend on any axioms\n'LexLeanLaws.mapFold_listFold' does not depend on any axioms\n'LexLeanLaws.mapSize_length' does not depend on any axioms\n'LexLeanLaws.quotient_int' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.quotient_nat' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.remainder_int' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.remainder_nat' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.setElements_self' does not depend on any axioms\n'LexLeanLaws.setFold_listFold' does not depend on any axioms\n'LexLeanLaws.setSize_length' does not depend on any axioms\n'LexLeanLaws.sumInt' does not depend on any axioms\n'LexLeanLaws.sumInt._f' does not depend on any axioms\n'LexLeanLaws.sumInt._sunfold' does not depend on any axioms\n'LexLeanLaws.sumInt._unsafe_rec' does not depend on any axioms\n'LexLeanLaws.sumInt.eq_1' does not depend on any axioms\n'LexLeanLaws.sumInt.eq_2' does not depend on any axioms\n'LexLeanLaws.sumInt.eq_def' does not depend on any axioms\n'LexLeanLaws.sumInt_add' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumInt_append' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumInt_cons' does not depend on any axioms\n'LexLeanLaws.sumInt_const' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumInt_mul' depends on axioms: [propext]\n'LexLeanLaws.sumInt_mul_right' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumInt_mul_self' depends on axioms: [propext]\n'LexLeanLaws.sumInt_neg' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumInt_neg_self' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumInt_nil' does not depend on any axioms\n'LexLeanLaws.sumInt_perm' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumInt_reverse' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumInt_sub' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumNat' does not depend on any axioms\n'LexLeanLaws.sumNat._f' does not depend on any axioms\n'LexLeanLaws.sumNat._sunfold' does not depend on any axioms\n'LexLeanLaws.sumNat._unsafe_rec' does not depend on any axioms\n'LexLeanLaws.sumNat.eq_1' does not depend on any axioms\n'LexLeanLaws.sumNat.eq_2' does not depend on any axioms\n'LexLeanLaws.sumNat.eq_def' does not depend on any axioms\n'LexLeanLaws.sumNat.match_1' does not depend on any axioms\n'LexLeanLaws.sumNat_add' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumNat_append' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumNat_cons' does not depend on any axioms\n'LexLeanLaws.sumNat_const' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumNat_mul' does not depend on any axioms\n'LexLeanLaws.sumNat_mul_right' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumNat_mul_self' does not depend on any axioms\n'LexLeanLaws.sumNat_nil' does not depend on any axioms\n'LexLeanLaws.sumNat_perm' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.sumNat_reverse' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.tdiv_ediv' depends on axioms: [propext, Quot.sound]\n'LexLeanLaws.tmod_emod' depends on axioms: [propext, Quot.sound]\n'LexLeanRuntime.quotient.eq_1' does not depend on any axioms\n'LexLeanRuntime.remainder.eq_1' does not depend on any axioms\n","stdout_sha256":"a4ba2d39c9cdfd5e40c41c5ccf4726d937fd192fc042b74bb56cc0651e28919e","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.LexLeanRuntime.Portable.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.LexLeanRuntime.Portable","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'LexLeanRuntime.Appendable' does not depend on any axioms\n'LexLeanRuntime.Appendable.append' does not depend on any axioms\n'LexLeanRuntime.Appendable.casesOn' does not depend on any axioms\n'LexLeanRuntime.Appendable.ctorIdx' does not depend on any axioms\n'LexLeanRuntime.Appendable.mk._flat_ctor' does not depend on any axioms\n'LexLeanRuntime.Appendable.mk.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Appendable.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Appendable.noConfusionType' does not depend on any axioms\n'LexLeanRuntime.Appendable.recOn' does not depend on any axioms\n'LexLeanRuntime.Decimal' does not depend on any axioms\n'LexLeanRuntime.Decimal.casesOn' does not depend on any axioms\n'LexLeanRuntime.Decimal.ctorIdx' does not depend on any axioms\n'LexLeanRuntime.Decimal.format' does not depend on any axioms\n'LexLeanRuntime.Decimal.mk._flat_ctor' does not depend on any axioms\n'LexLeanRuntime.Decimal.mk.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Decimal.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Decimal.noConfusionType' does not depend on any axioms\n'LexLeanRuntime.Decimal.parse' does not depend on any axioms\n'LexLeanRuntime.Decimal.recOn' does not depend on any axioms\n'LexLeanRuntime.Fixed' does not depend on any axioms\n'LexLeanRuntime.Fixed.bitAnd' does not depend on any axioms\n'LexLeanRuntime.Fixed.bitNot' does not depend on any axioms\n'LexLeanRuntime.Fixed.bitOr' does not depend on any axioms\n'LexLeanRuntime.Fixed.bitXor' does not depend on any axioms\n'LexLeanRuntime.Fixed.casesOn' does not depend on any axioms\n'LexLeanRuntime.Fixed.ctorIdx' does not depend on any axioms\n'LexLeanRuntime.Fixed.fromInt' does not depend on any axioms\n'LexLeanRuntime.Fixed.maximum' does not depend on any axioms\n'LexLeanRuntime.Fixed.minimum' does not depend on any axioms\n'LexLeanRuntime.Fixed.mk._flat_ctor' does not depend on any axioms\n'LexLeanRuntime.Fixed.mk.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Fixed.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Fixed.noConfusionType' does not depend on any axioms\n'LexLeanRuntime.Fixed.recOn' does not depend on any axioms\n'LexLeanRuntime.Fixed.shiftLeft' does not depend on any axioms\n'LexLeanRuntime.Fixed.shiftRight' does not depend on any axioms\n'LexLeanRuntime.Fixed.toToMathInt' does not depend on any axioms\n'LexLeanRuntime.Indexable' does not depend on any axioms\n'LexLeanRuntime.Indexable.casesOn' does not depend on any axioms\n'LexLeanRuntime.Indexable.ctorIdx' does not depend on any axioms\n'LexLeanRuntime.Indexable.index' does not depend on any axioms\n'LexLeanRuntime.Indexable.mk._flat_ctor' does not depend on any axioms\n'LexLeanRuntime.Indexable.mk.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Indexable.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Indexable.noConfusionType' does not depend on any axioms\n'LexLeanRuntime.Indexable.recOn' does not depend on any axioms\n'LexLeanRuntime.Lengthable' does not depend on any axioms\n'LexLeanRuntime.Lengthable.casesOn' does not depend on any axioms\n'LexLeanRuntime.Lengthable.ctorIdx' does not depend on any axioms\n'LexLeanRuntime.Lengthable.length' does not depend on any axioms\n'LexLeanRuntime.Lengthable.mk._flat_ctor' does not depend on any axioms\n'LexLeanRuntime.Lengthable.mk.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Lengthable.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Lengthable.noConfusionType' does not depend on any axioms\n'LexLeanRuntime.Lengthable.recOn' does not depend on any axioms\n'LexLeanRuntime.Quotient' does not depend on any axioms\n'LexLeanRuntime.Quotient.casesOn' does not depend on any axioms\n'LexLeanRuntime.Quotient.ctorIdx' does not depend on any axioms\n'LexLeanRuntime.Quotient.isZero' does not depend on any axioms\n'LexLeanRuntime.Quotient.mk._flat_ctor' does not depend on any axioms\n'LexLeanRuntime.Quotient.mk.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Quotient.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Quotient.noConfusionType' does not depend on any axioms\n'LexLeanRuntime.Quotient.quotient' does not depend on any axioms\n'LexLeanRuntime.Quotient.recOn' does not depend on any axioms\n'LexLeanRuntime.Quotient.remainder' does not depend on any axioms\n'LexLeanRuntime.Sliceable' does not depend on any axioms\n'LexLeanRuntime.Sliceable.casesOn' does not depend on any axioms\n'LexLeanRuntime.Sliceable.ctorIdx' does not depend on any axioms\n'LexLeanRuntime.Sliceable.mk._flat_ctor' does not depend on any axioms\n'LexLeanRuntime.Sliceable.mk.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Sliceable.noConfusion' does not depend on any axioms\n'LexLeanRuntime.Sliceable.noConfusionType' does not depend on any axioms\n'LexLeanRuntime.Sliceable.recOn' does not depend on any axioms\n'LexLeanRuntime.Sliceable.slice' does not depend on any axioms\n'LexLeanRuntime.ToMathInt' does not depend on any axioms\n'LexLeanRuntime.ToMathInt.casesOn' does not depend on any axioms\n'LexLeanRuntime.ToMathInt.ctorIdx' does not depend on any axioms\n'LexLeanRuntime.ToMathInt.mk._flat_ctor' does not depend on any axioms\n'LexLeanRuntime.ToMathInt.mk.noConfusion' does not depend on any axioms\n'LexLeanRuntime.ToMathInt.noConfusion' does not depend on any axioms\n'LexLeanRuntime.ToMathInt.noConfusionType' does not depend on any axioms\n'LexLeanRuntime.ToMathInt.recOn' does not depend on any axioms\n'LexLeanRuntime.ToMathInt.toInt' does not depend on any axioms\n'LexLeanRuntime.append' does not depend on any axioms\n'LexLeanRuntime.bitAnd' does not depend on any axioms\n'LexLeanRuntime.bitNot' does not depend on any axioms\n'LexLeanRuntime.bitOr' does not depend on any axioms\n'LexLeanRuntime.bitXor' does not depend on any axioms\n'LexLeanRuntime.checkedAdd' does not depend on any axioms\n'LexLeanRuntime.checkedAddInt64' does not depend on any axioms\n'LexLeanRuntime.checkedConvert' does not depend on any axioms\n'LexLeanRuntime.checkedFromInt' does not depend on any axioms\n'LexLeanRuntime.checkedMultiply' does not depend on any axioms\n'LexLeanRuntime.checkedMultiplyInt64' does not depend on any axioms\n'LexLeanRuntime.checkedMultiplyInt64.match_1' does not depend on any axioms\n'LexLeanRuntime.checkedNegate' does not depend on any axioms\n'LexLeanRuntime.checkedNegateInt64' does not depend on any axioms\n'LexLeanRuntime.checkedQuotient' does not depend on any axioms\n'LexLeanRuntime.checkedQuotientInt64' does not depend on any axioms\n'LexLeanRuntime.checkedSubtract' does not depend on any axioms\n'LexLeanRuntime.checkedSubtractInt64' does not depend on any axioms\n'LexLeanRuntime.compareBytes' depends on axioms: [propext]\n'LexLeanRuntime.divideMagnitudeInt64' does not depend on any axioms\n'LexLeanRuntime.divideMagnitudeInt64._f' does not depend on any axioms\n'LexLeanRuntime.divideMagnitudeInt64._sunfold' does not depend on any axioms\n'LexLeanRuntime.divideMagnitudeInt64._unsafe_rec' does not depend on any axioms\n'LexLeanRuntime.divideMagnitudeInt64.match_1' does not depend on any axioms\n'LexLeanRuntime.equal' does not depend on any axioms\n'LexLeanRuntime.formatDecimal' does not depend on any axioms\n'LexLeanRuntime.index' does not depend on any axioms\n'LexLeanRuntime.instAppendableByteArray' does not depend on any axioms\n'LexLeanRuntime.instAppendableList' does not depend on any axioms\n'LexLeanRuntime.instDecimalInt' depends on axioms: [propext, Classical.choice, Quot.sound]\n'LexLeanRuntime.instDecimalInt.match_1' does not depend on any axioms\n'LexLeanRuntime.instDecimalOfFixedOfToString' depends on axioms: [propext, Classical.choice, Quot.sound]\n'LexLeanRuntime.instFixedInt16' depends on axioms: [propext, Quot.sound]\n'LexLeanRuntime.instFixedInt32' depends on axioms: [propext, Quot.sound]\n'LexLeanRuntime.instFixedInt64' depends on axioms: [propext, Quot.sound]\n'LexLeanRuntime.instFixedInt8' depends on axioms: [propext, Quot.sound]\n'LexLeanRuntime.instFixedUInt16' depends on axioms: [propext, Quot.sound]\n'LexLeanRuntime.instFixedUInt32' depends on axioms: [propext, Quot.sound]\n'LexLeanRuntime.instFixedUInt64' depends on axioms: [propext, Quot.sound]\n'LexLeanRuntime.instFixedUInt8' depends on axioms: [propext, Quot.sound]\n'LexLeanRuntime.instIndexableByteArrayUInt8' does not depend on any axioms\n'LexLeanRuntime.instIndexableList' does not depend on any axioms\n'LexLeanRuntime.instLengthableByteArray' does not depend on any axioms\n'LexLeanRuntime.instLengthableList' does not depend on any axioms\n'LexLeanRuntime.instLengthableString' depends on axioms: [propext, Classical.choice, Quot.sound]\n'LexLeanRuntime.instQuotientInt' does not depend on any axioms\n'LexLeanRuntime.instQuotientNat' does not depend on any axioms\n'LexLeanRuntime.instSliceableByteArray' does not depend on any axioms\n'LexLeanRuntime.instSliceableList' does not depend on any axioms\n'LexLeanRuntime.instToMathIntInt' does not depend on any axioms\n'LexLeanRuntime.join' depends on axioms: [propext]\n'LexLeanRuntime.length' does not depend on any axioms\n'LexLeanRuntime.listIndex' does not depend on any axioms\n'LexLeanRuntime.listIndex._f' does not depend on any axioms\n'LexLeanRuntime.listIndex._sunfold' does not depend on any axioms\n'LexLeanRuntime.listIndex._unsafe_rec' does not depend on any axioms\n'LexLeanRuntime.listIndex.match_1' does not depend on any axioms\n'LexLeanRuntime.magnitudeInt64' does not depend on any axioms\n'LexLeanRuntime.multiply' does not depend on any axioms\n'LexLeanRuntime.multiplyMagnitudeInt64' does not depend on any axioms\n'LexLeanRuntime.multiplyMagnitudeInt64._f' does not depend on any axioms\n'LexLeanRuntime.multiplyMagnitudeInt64._sunfold' does not depend on any axioms\n'LexLeanRuntime.multiplyMagnitudeInt64._unsafe_rec' does not depend on any axioms\n'LexLeanRuntime.multiplyMagnitudeInt64.match_1' does not depend on any axioms\n'LexLeanRuntime.negate' does not depend on any axioms\n'LexLeanRuntime.parseDecimal' does not depend on any axioms\n'LexLeanRuntime.quotient' does not depend on any axioms\n'LexLeanRuntime.remainder' does not depend on any axioms\n'LexLeanRuntime.shiftLeft' does not depend on any axioms\n'LexLeanRuntime.shiftRight' does not depend on any axioms\n'LexLeanRuntime.signedMagnitudeInt64' does not depend on any axioms\n'LexLeanRuntime.slice' does not depend on any axioms\n'LexLeanRuntime.splitExact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'LexLeanRuntime.subtract' does not depend on any axioms\n'LexLeanRuntime.utf8Decode' depends on axioms: [propext, Classical.choice, Quot.sound]\n'LexLeanRuntime.utf8Encode' does not depend on any axioms\n","stdout_sha256":"73fea1d9e9e9f0a2f1363b9f284eeeb9e434430e9fa910260b9526bad864641e","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Arch.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Arch","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Foundation.Arch.Component' does not depend on any axioms\n'StitchModel.Foundation.Arch.ComponentKind' does not depend on any axioms\n'StitchModel.Foundation.Arch.Concern' does not depend on any axioms\n'StitchModel.Foundation.Arch.DesignDiagram' does not depend on any axioms\n'StitchModel.Foundation.Arch.DesignView' does not depend on any axioms\n'StitchModel.Foundation.Arch.Edge' does not depend on any axioms\n'StitchModel.Foundation.Arch.EdgeKind' does not depend on any axioms\n'StitchModel.Foundation.Arch.Feature' does not depend on any axioms\n'StitchModel.Foundation.Arch.Journey' does not depend on any axioms\n'StitchModel.Foundation.Arch.ModelKind' does not depend on any axioms\n'StitchModel.Foundation.Arch.OpmLink' does not depend on any axioms\n'StitchModel.Foundation.Arch.OpmLinkKind' does not depend on any axioms\n'StitchModel.Foundation.Arch.OpmState' does not depend on any axioms\n'StitchModel.Foundation.Arch.OpmThing' does not depend on any axioms\n'StitchModel.Foundation.Arch.OpmThingKind' does not depend on any axioms\n'StitchModel.Foundation.Arch.OpmZoom' does not depend on any axioms\n'StitchModel.Foundation.Arch.Stakeholder' does not depend on any axioms\n'StitchModel.Foundation.Arch.StandardReference' does not depend on any axioms\n'StitchModel.Foundation.Arch.SystemProcess' does not depend on any axioms\n'StitchModel.Foundation.Arch.SystemState' does not depend on any axioms\n'StitchModel.Foundation.Arch.UmlComponent' does not depend on any axioms\n'StitchModel.Foundation.Arch.UmlConnector' does not depend on any axioms\n'StitchModel.Foundation.Arch.UmlLifeline' does not depend on any axioms\n'StitchModel.Foundation.Arch.UmlMessage' does not depend on any axioms\n'StitchModel.Foundation.Arch.UmlMessageKind' does not depend on any axioms\n'StitchModel.Foundation.Arch.UmlState' does not depend on any axioms\n'StitchModel.Foundation.Arch.UmlTransition' does not depend on any axioms\n'StitchModel.Foundation.Arch.View' does not depend on any axioms\n'StitchModel.Foundation.Arch.Viewpoint' does not depend on any axioms\n","stdout_sha256":"e513862b2c528fff48d9ec3615b26ff10a600a5042e0d4439944076f49c0ef99","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Bytes.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Bytes","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Foundation.Bytes.BoundedBuffer' does not depend on any axioms\n'StitchModel.Foundation.Bytes.BufferError' does not depend on any axioms\n'StitchModel.Foundation.Bytes.ByteOrder' does not depend on any axioms\n'StitchModel.Foundation.Bytes.appendBytes' does not depend on any axioms\n'StitchModel.Foundation.Bytes.byteAt' does not depend on any axioms\n'StitchModel.Foundation.Bytes.byteLength' does not depend on any axioms\n'StitchModel.Foundation.Bytes.compareBytes' depends on axioms: [propext]\n'StitchModel.Foundation.Bytes.sliceBytes' does not depend on any axioms\n","stdout_sha256":"8c0ca489be52ea02191bcf6c91e33dd49f6148493d01c91f52e7ad73272f96ff","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Experience.V1.Model.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Experience.V1.Model","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Foundation.Experience.V1.Model.Authority' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.BrandElement' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.BrandElementKind' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.ContrastCriterion' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.ContrastPair' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.DesignToken' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.Environment' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.EnvironmentKind' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.Goal' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.Source' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.Task' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.TokenType' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.UsabilityMeasure' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.UsabilityOutcome' does not depend on any axioms\n'StitchModel.Foundation.Experience.V1.Model.UserGroup' does not depend on any axioms\n","stdout_sha256":"004c368ac28d273bfdd1317c3b6f497ebf3693969ed18f984f59db3d9d26d1ce","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Qual.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Qual","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Foundation.Qual.ProductQualityCharacteristic' does not depend on any axioms\n'StitchModel.Foundation.Qual.QualityMeasure' does not depend on any axioms\n'StitchModel.Foundation.Qual.QualityRequirement' does not depend on any axioms\n'StitchModel.Foundation.Qual.QualitySubcharacteristic' does not depend on any axioms\n","stdout_sha256":"4033993252b345dc104c10fb87b7cea99e8a4a13f1cf4acd55c5bd71f4eb301c","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Sec.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.Sec","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Foundation.Sec.ApplicationSecurityControl' does not depend on any axioms\n'StitchModel.Foundation.Sec.Asset' does not depend on any axioms\n'StitchModel.Foundation.Sec.Impact' does not depend on any axioms\n'StitchModel.Foundation.Sec.Likelihood' does not depend on any axioms\n'StitchModel.Foundation.Sec.Risk' does not depend on any axioms\n'StitchModel.Foundation.Sec.SecurityActivity' does not depend on any axioms\n'StitchModel.Foundation.Sec.Threat' does not depend on any axioms\n'StitchModel.Foundation.Sec.VerificationMeasurement' does not depend on any axioms\n","stdout_sha256":"1a71fc96893f0787c02ee8b7a2d73902c40a562364a0a8ac391c99879c3927d6","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.View.Text.V1.Model.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Foundation.View.Text.V1.Model","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Foundation.View.Text.V1.Model.AcceptanceVector' does not depend on any axioms\n'StitchModel.Foundation.View.Text.V1.Model.TextApplication' does not depend on any axioms\n'StitchModel.Foundation.View.Text.V1.Model.TextView' does not depend on any axioms\n'StitchModel.Foundation.View.Text.V1.Model.textApplicationProfile' does not depend on any axioms\n","stdout_sha256":"78d0d2c2c59344b97e31d8d878c58e7f2857e8d2071aeef5f65c101772f24d22","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Architecture.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Architecture","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Architecture.admission' does not depend on any axioms\n'StitchModel.Product.Architecture.browser' does not depend on any axioms\n'StitchModel.Product.Architecture.browserAdmission' does not depend on any axioms\n'StitchModel.Product.Architecture.browserCompute' does not depend on any axioms\n'StitchModel.Product.Architecture.browserDiscovery' does not depend on any axioms\n'StitchModel.Product.Architecture.browserPrismId' does not depend on any axioms\n'StitchModel.Product.Architecture.browserScheduler' does not depend on any axioms\n'StitchModel.Product.Architecture.browserStorage' does not depend on any axioms\n'StitchModel.Product.Architecture.browserTransport' does not depend on any axioms\n'StitchModel.Product.Architecture.browserVm' does not depend on any axioms\n'StitchModel.Product.Architecture.compute' does not depend on any axioms\n'StitchModel.Product.Architecture.computeAdmission' does not depend on any axioms\n'StitchModel.Product.Architecture.computeIdentity' does not depend on any axioms\n'StitchModel.Product.Architecture.computeStorage' does not depend on any axioms\n'StitchModel.Product.Architecture.computeTransport' does not depend on any axioms\n'StitchModel.Product.Architecture.cryptography' does not depend on any axioms\n'StitchModel.Product.Architecture.discovery' does not depend on any axioms\n'StitchModel.Product.Architecture.discoveryAdmission' does not depend on any axioms\n'StitchModel.Product.Architecture.discoveryAuthority' does not depend on any axioms\n'StitchModel.Product.Architecture.discoveryHost' does not depend on any axioms\n'StitchModel.Product.Architecture.identity' does not depend on any axioms\n'StitchModel.Product.Architecture.identityCryptography' does not depend on any axioms\n'StitchModel.Product.Architecture.legacy' does not depend on any axioms\n'StitchModel.Product.Architecture.nativeRouting' does not depend on any axioms\n'StitchModel.Product.Architecture.operator' does not depend on any axioms\n'StitchModel.Product.Architecture.peers' does not depend on any axioms\n'StitchModel.Product.Architecture.pointerAuthority' does not depend on any axioms\n'StitchModel.Product.Architecture.prismId' does not depend on any axioms\n'StitchModel.Product.Architecture.prismIdCryptography' does not depend on any axioms\n'StitchModel.Product.Architecture.prismIdTransport' does not depend on any axioms\n'StitchModel.Product.Architecture.productView' does not depend on any axioms\n'StitchModel.Product.Architecture.productViewpoint' does not depend on any axioms\n'StitchModel.Product.Architecture.publicRelay' does not depend on any axioms\n'StitchModel.Product.Architecture.reader' does not depend on any axioms\n'StitchModel.Product.Architecture.readerView' does not depend on any axioms\n'StitchModel.Product.Architecture.readerViewpoint' does not depend on any axioms\n'StitchModel.Product.Architecture.recoverability' does not depend on any axioms\n'StitchModel.Product.Architecture.relayTransport' does not depend on any axioms\n'StitchModel.Product.Architecture.reviewer' does not depend on any axioms\n'StitchModel.Product.Architecture.reviewerView' does not depend on any axioms\n'StitchModel.Product.Architecture.reviewerViewpoint' does not depend on any axioms\n'StitchModel.Product.Architecture.runtimeHost' does not depend on any axioms\n'StitchModel.Product.Architecture.scheduler' does not depend on any axioms\n'StitchModel.Product.Architecture.schedulerAdmission' does not depend on any axioms\n'StitchModel.Product.Architecture.schedulerTransport' does not depend on any axioms\n'StitchModel.Product.Architecture.security' does not depend on any axioms\n'StitchModel.Product.Architecture.signaling' does not depend on any axioms\n'StitchModel.Product.Architecture.signalingTransport' does not depend on any axioms\n'StitchModel.Product.Architecture.staticBrowser' does not depend on any axioms\n'StitchModel.Product.Architecture.staticHost' does not depend on any axioms\n'StitchModel.Product.Architecture.staticVm' does not depend on any axioms\n'StitchModel.Product.Architecture.storage' does not depend on any axioms\n'StitchModel.Product.Architecture.storageAdmission' does not depend on any axioms\n'StitchModel.Product.Architecture.storageIdentity' does not depend on any axioms\n'StitchModel.Product.Architecture.storagePeers' does not depend on any axioms\n'StitchModel.Product.Architecture.storageTransport' does not depend on any axioms\n'StitchModel.Product.Architecture.systemIntegrator' does not depend on any axioms\n'StitchModel.Product.Architecture.systemIntegratorView' does not depend on any axioms\n'StitchModel.Product.Architecture.systemIntegratorViewpoint' does not depend on any axioms\n'StitchModel.Product.Architecture.transparency' does not depend on any axioms\n'StitchModel.Product.Architecture.transport' does not depend on any axioms\n'StitchModel.Product.Architecture.transportAdmission' does not depend on any axioms\n'StitchModel.Product.Architecture.transportPeers' does not depend on any axioms\n'StitchModel.Product.Architecture.transportSignaling' does not depend on any axioms\n'StitchModel.Product.Architecture.transportVm' does not depend on any axioms\n'StitchModel.Product.Architecture.usability' does not depend on any axioms\n'StitchModel.Product.Architecture.vm' does not depend on any axioms\n'StitchModel.Product.Architecture.vmStorage' does not depend on any axioms\n'StitchModel.Product.Architecture.vmTransport' does not depend on any axioms\n","stdout_sha256":"bd772f8ce147a0892fefd938b6114e9c723c9919178375dd59c1b65075b34e68","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Brand.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Brand","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Brand.Source' does not depend on any axioms\n'StitchModel.Product.Brand.authority' does not depend on any axioms\n'StitchModel.Product.Brand.brandSources' does not depend on any axioms\n'StitchModel.Product.Brand.contrastScope' does not depend on any axioms\n'StitchModel.Product.Brand.contrasts' does not depend on any axioms\n'StitchModel.Product.Brand.elements' does not depend on any axioms\n'StitchModel.Product.Brand.sources' does not depend on any axioms\n'StitchModel.Product.Brand.tokens' does not depend on any axioms\n","stdout_sha256":"fbfc920a195dc80b444190c4525a3d407fab7280c5ccfe636170d8dcb0ac7486","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Compliance.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Compliance","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Compliance.Obligation' does not depend on any axioms\n'StitchModel.Product.Compliance.Source' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationArchitecture' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationBrand' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationCanonicalBytes' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationContextOfUse' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationDesign' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationDistribution' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationDns' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationFeatures' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationIdentityPersistence' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationQuality' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationRelease' does not depend on any axioms\n'StitchModel.Product.Compliance.obligationThreatModel' does not depend on any axioms\n'StitchModel.Product.Compliance.obligations' does not depend on any axioms\n'StitchModel.Product.Compliance.scope' does not depend on any axioms\n'StitchModel.Product.Compliance.sources' does not depend on any axioms\n","stdout_sha256":"edfcc9abb1f8bd8d5b54d9266dd330a6aca331eb603cd20e99cc5832877512ce","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Design.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Design","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Design.Source' does not depend on any axioms\n'StitchModel.Product.Design.boundary' does not depend on any axioms\n'StitchModel.Product.Design.componentAdmission' does not depend on any axioms\n'StitchModel.Product.Design.componentBrowser' does not depend on any axioms\n'StitchModel.Product.Design.componentCompute' does not depend on any axioms\n'StitchModel.Product.Design.componentCryptography' does not depend on any axioms\n'StitchModel.Product.Design.componentDiscovery' does not depend on any axioms\n'StitchModel.Product.Design.componentIdentity' does not depend on any axioms\n'StitchModel.Product.Design.componentLegacy' does not depend on any axioms\n'StitchModel.Product.Design.componentNativeRouting' does not depend on any axioms\n'StitchModel.Product.Design.componentPeers' does not depend on any axioms\n'StitchModel.Product.Design.componentPointerAuthority' does not depend on any axioms\n'StitchModel.Product.Design.componentPrismId' does not depend on any axioms\n'StitchModel.Product.Design.componentPublicRelay' does not depend on any axioms\n'StitchModel.Product.Design.componentRuntimeHost' does not depend on any axioms\n'StitchModel.Product.Design.componentScheduler' does not depend on any axioms\n'StitchModel.Product.Design.componentSignaling' does not depend on any axioms\n'StitchModel.Product.Design.componentStaticHost' does not depend on any axioms\n'StitchModel.Product.Design.componentStorage' does not depend on any axioms\n'StitchModel.Product.Design.componentTransport' does not depend on any axioms\n'StitchModel.Product.Design.componentVm' does not depend on any axioms\n'StitchModel.Product.Design.connectorBrowserAdmission' does not depend on any axioms\n'StitchModel.Product.Design.connectorBrowserCompute' does not depend on any axioms\n'StitchModel.Product.Design.connectorBrowserDiscovery' does not depend on any axioms\n'StitchModel.Product.Design.connectorBrowserPrismId' does not depend on any axioms\n'StitchModel.Product.Design.connectorBrowserScheduler' does not depend on any axioms\n'StitchModel.Product.Design.connectorBrowserStorage' does not depend on any axioms\n'StitchModel.Product.Design.connectorBrowserTransport' does not depend on any axioms\n'StitchModel.Product.Design.connectorBrowserVm' does not depend on any axioms\n'StitchModel.Product.Design.connectorComputeAdmission' does not depend on any axioms\n'StitchModel.Product.Design.connectorComputeIdentity' does not depend on any axioms\n'StitchModel.Product.Design.connectorComputeStorage' does not depend on any axioms\n'StitchModel.Product.Design.connectorComputeTransport' does not depend on any axioms\n'StitchModel.Product.Design.connectorDiscoveryAdmission' does not depend on any axioms\n'StitchModel.Product.Design.connectorDiscoveryAuthority' does not depend on any axioms\n'StitchModel.Product.Design.connectorDiscoveryHost' does not depend on any axioms\n'StitchModel.Product.Design.connectorIdentityCryptography' does not depend on any axioms\n'StitchModel.Product.Design.connectorPrismIdCryptography' does not depend on any axioms\n'StitchModel.Product.Design.connectorPrismIdTransport' does not depend on any axioms\n'StitchModel.Product.Design.connectorRelayTransport' does not depend on any axioms\n'StitchModel.Product.Design.connectorSchedulerAdmission' does not depend on any axioms\n'StitchModel.Product.Design.connectorSchedulerTransport' does not depend on any axioms\n'StitchModel.Product.Design.connectorSignalingTransport' does not depend on any axioms\n'StitchModel.Product.Design.connectorStaticBrowser' does not depend on any axioms\n'StitchModel.Product.Design.connectorStaticVm' does not depend on any axioms\n'StitchModel.Product.Design.connectorStorageAdmission' does not depend on any axioms\n'StitchModel.Product.Design.connectorStorageIdentity' does not depend on any axioms\n'StitchModel.Product.Design.connectorStoragePeers' does not depend on any axioms\n'StitchModel.Product.Design.connectorStorageTransport' does not depend on any axioms\n'StitchModel.Product.Design.connectorTransportAdmission' does not depend on any axioms\n'StitchModel.Product.Design.connectorTransportPeers' does not depend on any axioms\n'StitchModel.Product.Design.connectorTransportSignaling' does not depend on any axioms\n'StitchModel.Product.Design.connectorTransportVm' does not depend on any axioms\n'StitchModel.Product.Design.connectorVmStorage' does not depend on any axioms\n'StitchModel.Product.Design.connectorVmTransport' does not depend on any axioms\n'StitchModel.Product.Design.lifelineBrowser' does not depend on any axioms\n'StitchModel.Product.Design.lifelineDiscovery' does not depend on any axioms\n'StitchModel.Product.Design.lifelinePointerAuthority' does not depend on any axioms\n'StitchModel.Product.Design.lifelineRuntimeHost' does not depend on any axioms\n'StitchModel.Product.Design.message0' does not depend on any axioms\n'StitchModel.Product.Design.message1' does not depend on any axioms\n'StitchModel.Product.Design.message2' does not depend on any axioms\n'StitchModel.Product.Design.message3' does not depend on any axioms\n'StitchModel.Product.Design.message4' does not depend on any axioms\n'StitchModel.Product.Design.message5' does not depend on any axioms\n'StitchModel.Product.Design.message6' does not depend on any axioms\n'StitchModel.Product.Design.message7' does not depend on any axioms\n'StitchModel.Product.Design.message8' does not depend on any axioms\n'StitchModel.Product.Design.objectAdmission' does not depend on any axioms\n'StitchModel.Product.Design.objectIdentity' does not depend on any axioms\n'StitchModel.Product.Design.objectPeers' does not depend on any axioms\n'StitchModel.Product.Design.objectStorage' does not depend on any axioms\n'StitchModel.Product.Design.opmAdmitObject' does not depend on any axioms\n'StitchModel.Product.Design.opmCheckReceipt' does not depend on any axioms\n'StitchModel.Product.Design.opmCommitLocal' does not depend on any axioms\n'StitchModel.Product.Design.opmLink0' does not depend on any axioms\n'StitchModel.Product.Design.opmLink1' does not depend on any axioms\n'StitchModel.Product.Design.opmLink2' does not depend on any axioms\n'StitchModel.Product.Design.opmLink3' does not depend on any axioms\n'StitchModel.Product.Design.opmLink4' does not depend on any axioms\n'StitchModel.Product.Design.opmLink5' does not depend on any axioms\n'StitchModel.Product.Design.opmLink6' does not depend on any axioms\n'StitchModel.Product.Design.opmLink7' does not depend on any axioms\n'StitchModel.Product.Design.opmRecover' does not depend on any axioms\n'StitchModel.Product.Design.opmRequestPlacement' does not depend on any axioms\n'StitchModel.Product.Design.processAdmitObject' does not depend on any axioms\n'StitchModel.Product.Design.processAuthorizePointer' does not depend on any axioms\n'StitchModel.Product.Design.processBeginWrite' does not depend on any axioms\n'StitchModel.Product.Design.processCheckReceipt' does not depend on any axioms\n'StitchModel.Product.Design.processCommitLocal' does not depend on any axioms\n'StitchModel.Product.Design.processConfirm' does not depend on any axioms\n'StitchModel.Product.Design.processDispatchDnsWrite' does not depend on any axioms\n'StitchModel.Product.Design.processObserveDnsRecord' does not depend on any axioms\n'StitchModel.Product.Design.processReconcile' does not depend on any axioms\n'StitchModel.Product.Design.processRecover' does not depend on any axioms\n'StitchModel.Product.Design.processRefuse' does not depend on any axioms\n'StitchModel.Product.Design.processRequestPlacement' does not depend on any axioms\n'StitchModel.Product.Design.processRetainUnknown' does not depend on any axioms\n'StitchModel.Product.Design.sources' does not depend on any axioms\n'StitchModel.Product.Design.stateIdle' does not depend on any axioms\n'StitchModel.Product.Design.statePublished' does not depend on any axioms\n'StitchModel.Product.Design.stateRefused' does not depend on any axioms\n'StitchModel.Product.Design.stateUnknown' does not depend on any axioms\n'StitchModel.Product.Design.transition0' does not depend on any axioms\n'StitchModel.Product.Design.transition1' does not depend on any axioms\n'StitchModel.Product.Design.transition2' does not depend on any axioms\n'StitchModel.Product.Design.transition3' does not depend on any axioms\n'StitchModel.Product.Design.transition4' does not depend on any axioms\n'StitchModel.Product.Design.transition5' does not depend on any axioms\n'StitchModel.Product.Design.transition6' does not depend on any axioms\n'StitchModel.Product.Design.umlIdle' does not depend on any axioms\n'StitchModel.Product.Design.umlPublished' does not depend on any axioms\n'StitchModel.Product.Design.umlRefused' does not depend on any axioms\n'StitchModel.Product.Design.umlUnknown' does not depend on any axioms\n'StitchModel.Product.Design.viewComponents' does not depend on any axioms\n'StitchModel.Product.Design.viewObjectProcess' does not depend on any axioms\n'StitchModel.Product.Design.viewPublicationSequence' does not depend on any axioms\n'StitchModel.Product.Design.viewPublicationState' does not depend on any axioms\n","stdout_sha256":"0e714606a4d9b5373f527b932aec2168c5240efb8508357937d91dbeb21f4664","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Experience.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Experience","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Experience.Action' does not depend on any axioms\n'StitchModel.Product.Experience.EvidenceStyle' does not depend on any axioms\n'StitchModel.Product.Experience.Facts' does not depend on any axioms\n'StitchModel.Product.Experience.Journey' does not depend on any axioms\n'StitchModel.Product.Experience.View' does not depend on any axioms\n'StitchModel.Product.Experience.actionAdmit' does not depend on any axioms\n'StitchModel.Product.Experience.actionAllowed' does not depend on any axioms\n'StitchModel.Product.Experience.actionBoot' does not depend on any axioms\n'StitchModel.Product.Experience.actionClear' does not depend on any axioms\n'StitchModel.Product.Experience.actionExecute' does not depend on any axioms\n'StitchModel.Product.Experience.actionExport' does not depend on any axioms\n'StitchModel.Product.Experience.actionJoin' does not depend on any axioms\n'StitchModel.Product.Experience.actionLoadPublication' does not depend on any axioms\n'StitchModel.Product.Experience.actionPin' does not depend on any axioms\n'StitchModel.Product.Experience.actionPlacementRepair' does not depend on any axioms\n'StitchModel.Product.Experience.actionPublish' does not depend on any axioms\n'StitchModel.Product.Experience.actionReconcile' does not depend on any axioms\n'StitchModel.Product.Experience.actionRecover' does not depend on any axioms\n'StitchModel.Product.Experience.actionRecoveryDownload' does not depend on any axioms\n'StitchModel.Product.Experience.actionRecoveryExport' does not depend on any axioms\n'StitchModel.Product.Experience.actionRecoveryFinish' does not depend on any axioms\n'StitchModel.Product.Experience.actionRecoveryImport' does not depend on any axioms\n'StitchModel.Product.Experience.actionRecoveryRestore' does not depend on any axioms\n'StitchModel.Product.Experience.actionRecoverySave' does not depend on any axioms\n'StitchModel.Product.Experience.actionRecoveryTrust' does not depend on any axioms\n'StitchModel.Product.Experience.actionRenew' does not depend on any axioms\n'StitchModel.Product.Experience.actionResume' does not depend on any axioms\n'StitchModel.Product.Experience.actionSaveAuthority' does not depend on any axioms\n'StitchModel.Product.Experience.actionSrv' does not depend on any axioms\n'StitchModel.Product.Experience.actionStart' does not depend on any axioms\n'StitchModel.Product.Experience.actionStore' does not depend on any axioms\n'StitchModel.Product.Experience.actionTxt' does not depend on any axioms\n'StitchModel.Product.Experience.actionVmCancel' does not depend on any axioms\n'StitchModel.Product.Experience.actionVmDestroy' does not depend on any axioms\n'StitchModel.Product.Experience.actionVmForget' does not depend on any axioms\n'StitchModel.Product.Experience.actionVmReconcile' does not depend on any axioms\n'StitchModel.Product.Experience.actionVmStop' does not depend on any axioms\n'StitchModel.Product.Experience.actions' does not depend on any axioms\n'StitchModel.Product.Experience.admissionInputVisible' does not depend on any axioms\n'StitchModel.Product.Experience.blockedPolicyCannotRepair' does not depend on any axioms\n'StitchModel.Product.Experience.budgetBlockNeverPermitsPublication' does not depend on any axioms\n'StitchModel.Product.Experience.computeDone' does not depend on any axioms\n'StitchModel.Product.Experience.computeEmpty' does not depend on any axioms\n'StitchModel.Product.Experience.computeReplay' does not depend on any axioms\n'StitchModel.Product.Experience.computeUnverified' does not depend on any axioms\n'StitchModel.Product.Experience.computeView' does not depend on any axioms\n'StitchModel.Product.Experience.disclosureLabel' does not depend on any axioms\n'StitchModel.Product.Experience.evidenceStyles' does not depend on any axioms\n'StitchModel.Product.Experience.executionAllowed' does not depend on any axioms\n'StitchModel.Product.Experience.executionLabel' does not depend on any axioms\n'StitchModel.Product.Experience.explanationInitiallyOpen' does not depend on any axioms\n'StitchModel.Product.Experience.explanationLabel' does not depend on any axioms\n'StitchModel.Product.Experience.focusNavigationTarget' does not depend on any axioms\n'StitchModel.Product.Experience.initialFacts' does not depend on any axioms\n'StitchModel.Product.Experience.initialMeshCannotJoinWithoutDisclosure' does not depend on any axioms\n'StitchModel.Product.Experience.initialPolicyCanBeExported' does not depend on any axioms\n'StitchModel.Product.Experience.initialVmCannotExecute' does not depend on any axioms\n'StitchModel.Product.Experience.integrityLabel' does not depend on any axioms\n'StitchModel.Product.Experience.joinAllowed' does not depend on any axioms\n'StitchModel.Product.Experience.journeyCompute' does not depend on any axioms\n'StitchModel.Product.Experience.journeyMesh' does not depend on any axioms\n'StitchModel.Product.Experience.journeyObjects' does not depend on any axioms\n'StitchModel.Product.Experience.journeyPointers' does not depend on any axioms\n'StitchModel.Product.Experience.journeyResources' does not depend on any axioms\n'StitchModel.Product.Experience.journeyVisible' does not depend on any axioms\n'StitchModel.Product.Experience.journeyVm' does not depend on any axioms\n'StitchModel.Product.Experience.journeys' does not depend on any axioms\n'StitchModel.Product.Experience.knownPublicationNeverOffersReconciliation' does not depend on any axioms\n'StitchModel.Product.Experience.meshConnected' does not depend on any axioms\n'StitchModel.Product.Experience.meshDisclosure' does not depend on any axioms\n'StitchModel.Product.Experience.meshReady' does not depend on any axioms\n'StitchModel.Product.Experience.meshSearching' does not depend on any axioms\n'StitchModel.Product.Experience.meshView' does not depend on any axioms\n'StitchModel.Product.Experience.navigationLabel' does not depend on any axioms\n'StitchModel.Product.Experience.navigationScrollBehavior' does not depend on any axioms\n'StitchModel.Product.Experience.objectsEmpty' does not depend on any axioms\n'StitchModel.Product.Experience.objectsLocal' does not depend on any axioms\n'StitchModel.Product.Experience.objectsPartial' does not depend on any axioms\n'StitchModel.Product.Experience.objectsPlaced' does not depend on any axioms\n'StitchModel.Product.Experience.objectsView' does not depend on any axioms\n'StitchModel.Product.Experience.placementRepairAllowed' does not depend on any axioms\n'StitchModel.Product.Experience.pointerLocal' does not depend on any axioms\n'StitchModel.Product.Experience.pointerPending' does not depend on any axioms\n'StitchModel.Product.Experience.pointerPinned' does not depend on any axioms\n'StitchModel.Product.Experience.pointerPublished' does not depend on any axioms\n'StitchModel.Product.Experience.pointerUnknown' does not depend on any axioms\n'StitchModel.Product.Experience.pointerUnpinned' does not depend on any axioms\n'StitchModel.Product.Experience.pointersView' does not depend on any axioms\n'StitchModel.Product.Experience.productTitle' does not depend on any axioms\n'StitchModel.Product.Experience.provenanceLabel' does not depend on any axioms\n'StitchModel.Product.Experience.publicationAllowed' does not depend on any axioms\n'StitchModel.Product.Experience.publicationSetupInitiallyOpen' does not depend on any axioms\n'StitchModel.Product.Experience.publicationSetupVisible' does not depend on any axioms\n'StitchModel.Product.Experience.reconciliationAllowed' does not depend on any axioms\n'StitchModel.Product.Experience.recoveryChecked' does not depend on any axioms\n'StitchModel.Product.Experience.recoveryChecking' does not depend on any axioms\n'StitchModel.Product.Experience.recoveryEmpty' does not depend on any axioms\n'StitchModel.Product.Experience.recoveryPolicyLabel' does not depend on any axioms\n'StitchModel.Product.Experience.recoveryPolicyVisible' does not depend on any axioms\n'StitchModel.Product.Experience.recoveryRestored' does not depend on any axioms\n'StitchModel.Product.Experience.recoveryTrusted' does not depend on any axioms\n'StitchModel.Product.Experience.recoveryView' does not depend on any axioms\n'StitchModel.Product.Experience.relayLabel' does not depend on any axioms\n'StitchModel.Product.Experience.resourcesActive' does not depend on any axioms\n'StitchModel.Product.Experience.resourcesBlocked' does not depend on any axioms\n'StitchModel.Product.Experience.resourcesView' does not depend on any axioms\n'StitchModel.Product.Experience.statusLivePolicy' does not depend on any axioms\n'StitchModel.Product.Experience.undisclosedNeverPermitsJoin' does not depend on any axioms\n'StitchModel.Product.Experience.unknownNeverPermitsPublication' does not depend on any axioms\n'StitchModel.Product.Experience.unknownPublicationDoesNotPermitNewCandidate' does not depend on any axioms\n'StitchModel.Product.Experience.unknownPublicationFacts' does not depend on any axioms\n'StitchModel.Product.Experience.unknownPublicationIsVisible' does not depend on any axioms\n'StitchModel.Product.Experience.unknownPublicationOffersReconciliation' does not depend on any axioms\n'StitchModel.Product.Experience.unreadyNeverPermitsGuestExecution' does not depend on any axioms\n'StitchModel.Product.Experience.unselectedObjectCannotRepair' does not depend on any axioms\n'StitchModel.Product.Experience.viewStyle' does not depend on any axioms\n'StitchModel.Product.Experience.vmBooting' does not depend on any axioms\n'StitchModel.Product.Experience.vmCommandVisible' does not depend on any axioms\n'StitchModel.Product.Experience.vmDestroyed' does not depend on any axioms\n'StitchModel.Product.Experience.vmFailed' does not depend on any axioms\n'StitchModel.Product.Experience.vmIdle' does not depend on any axioms\n'StitchModel.Product.Experience.vmQuarantined' does not depend on any axioms\n'StitchModel.Product.Experience.vmReady' does not depend on any axioms\n'StitchModel.Product.Experience.vmStopped' does not depend on any axioms\n'StitchModel.Product.Experience.vmTerminationPending' does not depend on any axioms\n'StitchModel.Product.Experience.vmView' does not depend on any axioms\n","stdout_sha256":"e63753856bd3d458986e69085edcb7ae7b3560a8f86644a2ebb11071e3dc52e9","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Features.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Features","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Features.Source' does not depend on any axioms\n'StitchModel.Product.Features.acceptAdmit' does not depend on any axioms\n'StitchModel.Product.Features.acceptBoot' does not depend on any axioms\n'StitchModel.Product.Features.acceptClear' does not depend on any axioms\n'StitchModel.Product.Features.acceptCompactAuthorityJournal' does not depend on any axioms\n'StitchModel.Product.Features.acceptExecute' does not depend on any axioms\n'StitchModel.Product.Features.acceptExport' does not depend on any axioms\n'StitchModel.Product.Features.acceptExportAuthorityJournal' does not depend on any axioms\n'StitchModel.Product.Features.acceptExtendProtocol' does not depend on any axioms\n'StitchModel.Product.Features.acceptInspectAuthorityStorage' does not depend on any axioms\n'StitchModel.Product.Features.acceptInspectFacetSources' does not depend on any axioms\n'StitchModel.Product.Features.acceptJoin' does not depend on any axioms\n'StitchModel.Product.Features.acceptLearnProtocol' does not depend on any axioms\n'StitchModel.Product.Features.acceptLoadPublication' does not depend on any axioms\n'StitchModel.Product.Features.acceptMigrateTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.acceptPersistAuthorityStorage' does not depend on any axioms\n'StitchModel.Product.Features.acceptPin' does not depend on any axioms\n'StitchModel.Product.Features.acceptPlacementRepair' does not depend on any axioms\n'StitchModel.Product.Features.acceptPublish' does not depend on any axioms\n'StitchModel.Product.Features.acceptReconcile' does not depend on any axioms\n'StitchModel.Product.Features.acceptRecover' does not depend on any axioms\n'StitchModel.Product.Features.acceptRecoveryDownload' does not depend on any axioms\n'StitchModel.Product.Features.acceptRecoveryExport' does not depend on any axioms\n'StitchModel.Product.Features.acceptRecoveryFinish' does not depend on any axioms\n'StitchModel.Product.Features.acceptRecoveryImport' does not depend on any axioms\n'StitchModel.Product.Features.acceptRecoveryRestore' does not depend on any axioms\n'StitchModel.Product.Features.acceptRecoverySave' does not depend on any axioms\n'StitchModel.Product.Features.acceptRecoveryTrust' does not depend on any axioms\n'StitchModel.Product.Features.acceptRenew' does not depend on any axioms\n'StitchModel.Product.Features.acceptRestoreTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.acceptResume' does not depend on any axioms\n'StitchModel.Product.Features.acceptReviewHostBoundaries' does not depend on any axioms\n'StitchModel.Product.Features.acceptRevokeAuthority' does not depend on any axioms\n'StitchModel.Product.Features.acceptRevokeTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.acceptRotateAuthority' does not depend on any axioms\n'StitchModel.Product.Features.acceptSaveAuthority' does not depend on any axioms\n'StitchModel.Product.Features.acceptSaveTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.acceptSrv' does not depend on any axioms\n'StitchModel.Product.Features.acceptStart' does not depend on any axioms\n'StitchModel.Product.Features.acceptStore' does not depend on any axioms\n'StitchModel.Product.Features.acceptTxt' does not depend on any axioms\n'StitchModel.Product.Features.acceptVmCancel' does not depend on any axioms\n'StitchModel.Product.Features.acceptVmDestroy' does not depend on any axioms\n'StitchModel.Product.Features.acceptVmForget' does not depend on any axioms\n'StitchModel.Product.Features.acceptVmReconcile' does not depend on any axioms\n'StitchModel.Product.Features.acceptVmStop' does not depend on any axioms\n'StitchModel.Product.Features.callAdmit' does not depend on any axioms\n'StitchModel.Product.Features.callBoot' does not depend on any axioms\n'StitchModel.Product.Features.callClear' does not depend on any axioms\n'StitchModel.Product.Features.callCompactAuthorityJournal' does not depend on any axioms\n'StitchModel.Product.Features.callExecute' does not depend on any axioms\n'StitchModel.Product.Features.callExport' does not depend on any axioms\n'StitchModel.Product.Features.callExportAuthorityJournal' does not depend on any axioms\n'StitchModel.Product.Features.callExtendProtocol' does not depend on any axioms\n'StitchModel.Product.Features.callInspectAuthorityStorage' does not depend on any axioms\n'StitchModel.Product.Features.callInspectFacetSources' does not depend on any axioms\n'StitchModel.Product.Features.callJoin' does not depend on any axioms\n'StitchModel.Product.Features.callLearnProtocol' does not depend on any axioms\n'StitchModel.Product.Features.callLoadPublication' does not depend on any axioms\n'StitchModel.Product.Features.callMigrateTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.callPersistAuthorityStorage' does not depend on any axioms\n'StitchModel.Product.Features.callPin' does not depend on any axioms\n'StitchModel.Product.Features.callPlacementRepair' does not depend on any axioms\n'StitchModel.Product.Features.callPublish' does not depend on any axioms\n'StitchModel.Product.Features.callReconcile' does not depend on any axioms\n'StitchModel.Product.Features.callRecover' does not depend on any axioms\n'StitchModel.Product.Features.callRecoveryDownload' does not depend on any axioms\n'StitchModel.Product.Features.callRecoveryExport' does not depend on any axioms\n'StitchModel.Product.Features.callRecoveryFinish' does not depend on any axioms\n'StitchModel.Product.Features.callRecoveryImport' does not depend on any axioms\n'StitchModel.Product.Features.callRecoveryRestore' does not depend on any axioms\n'StitchModel.Product.Features.callRecoverySave' does not depend on any axioms\n'StitchModel.Product.Features.callRecoveryTrust' does not depend on any axioms\n'StitchModel.Product.Features.callRenew' does not depend on any axioms\n'StitchModel.Product.Features.callRestoreTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.callResume' does not depend on any axioms\n'StitchModel.Product.Features.callReviewHostBoundaries' does not depend on any axioms\n'StitchModel.Product.Features.callRevokeAuthority' does not depend on any axioms\n'StitchModel.Product.Features.callRevokeTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.callRotateAuthority' does not depend on any axioms\n'StitchModel.Product.Features.callSaveAuthority' does not depend on any axioms\n'StitchModel.Product.Features.callSaveTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.callSrv' does not depend on any axioms\n'StitchModel.Product.Features.callStart' does not depend on any axioms\n'StitchModel.Product.Features.callStore' does not depend on any axioms\n'StitchModel.Product.Features.callTxt' does not depend on any axioms\n'StitchModel.Product.Features.callVmCancel' does not depend on any axioms\n'StitchModel.Product.Features.callVmDestroy' does not depend on any axioms\n'StitchModel.Product.Features.callVmForget' does not depend on any axioms\n'StitchModel.Product.Features.callVmReconcile' does not depend on any axioms\n'StitchModel.Product.Features.callVmStop' does not depend on any axioms\n'StitchModel.Product.Features.featureAdmit' does not depend on any axioms\n'StitchModel.Product.Features.featureBoot' does not depend on any axioms\n'StitchModel.Product.Features.featureClear' does not depend on any axioms\n'StitchModel.Product.Features.featureCompactAuthorityJournal' does not depend on any axioms\n'StitchModel.Product.Features.featureExecute' does not depend on any axioms\n'StitchModel.Product.Features.featureExport' does not depend on any axioms\n'StitchModel.Product.Features.featureExportAuthorityJournal' does not depend on any axioms\n'StitchModel.Product.Features.featureExtendProtocol' does not depend on any axioms\n'StitchModel.Product.Features.featureInspectAuthorityStorage' does not depend on any axioms\n'StitchModel.Product.Features.featureInspectFacetSources' does not depend on any axioms\n'StitchModel.Product.Features.featureJoin' does not depend on any axioms\n'StitchModel.Product.Features.featureLearnProtocol' does not depend on any axioms\n'StitchModel.Product.Features.featureLoadPublication' does not depend on any axioms\n'StitchModel.Product.Features.featureMigrateTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.featurePersistAuthorityStorage' does not depend on any axioms\n'StitchModel.Product.Features.featurePin' does not depend on any axioms\n'StitchModel.Product.Features.featurePlacementRepair' does not depend on any axioms\n'StitchModel.Product.Features.featurePublish' does not depend on any axioms\n'StitchModel.Product.Features.featureReconcile' does not depend on any axioms\n'StitchModel.Product.Features.featureRecover' does not depend on any axioms\n'StitchModel.Product.Features.featureRecoveryDownload' does not depend on any axioms\n'StitchModel.Product.Features.featureRecoveryExport' does not depend on any axioms\n'StitchModel.Product.Features.featureRecoveryFinish' does not depend on any axioms\n'StitchModel.Product.Features.featureRecoveryImport' does not depend on any axioms\n'StitchModel.Product.Features.featureRecoveryRestore' does not depend on any axioms\n'StitchModel.Product.Features.featureRecoverySave' does not depend on any axioms\n'StitchModel.Product.Features.featureRecoveryTrust' does not depend on any axioms\n'StitchModel.Product.Features.featureRenew' does not depend on any axioms\n'StitchModel.Product.Features.featureRestoreTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.featureResume' does not depend on any axioms\n'StitchModel.Product.Features.featureReviewHostBoundaries' does not depend on any axioms\n'StitchModel.Product.Features.featureRevokeAuthority' does not depend on any axioms\n'StitchModel.Product.Features.featureRevokeTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.featureRotateAuthority' does not depend on any axioms\n'StitchModel.Product.Features.featureSaveAuthority' does not depend on any axioms\n'StitchModel.Product.Features.featureSaveTrustedAnchor' does not depend on any axioms\n'StitchModel.Product.Features.featureSrv' does not depend on any axioms\n'StitchModel.Product.Features.featureStart' does not depend on any axioms\n'StitchModel.Product.Features.featureStore' does not depend on any axioms\n'StitchModel.Product.Features.featureTxt' does not depend on any axioms\n'StitchModel.Product.Features.featureVmCancel' does not depend on any axioms\n'StitchModel.Product.Features.featureVmDestroy' does not depend on any axioms\n'StitchModel.Product.Features.featureVmForget' does not depend on any axioms\n'StitchModel.Product.Features.featureVmReconcile' does not depend on any axioms\n'StitchModel.Product.Features.featureVmStop' does not depend on any axioms\n'StitchModel.Product.Features.journeyAuthority' does not depend on any axioms\n'StitchModel.Product.Features.journeyCompute' does not depend on any axioms\n'StitchModel.Product.Features.journeyIntegrator' does not depend on any axioms\n'StitchModel.Product.Features.journeyMesh' does not depend on any axioms\n'StitchModel.Product.Features.journeyObjects' does not depend on any axioms\n'StitchModel.Product.Features.journeyPointers' does not depend on any axioms\n'StitchModel.Product.Features.journeyReader' does not depend on any axioms\n'StitchModel.Product.Features.journeyResources' does not depend on any axioms\n'StitchModel.Product.Features.journeyReviewer' does not depend on any axioms\n'StitchModel.Product.Features.journeyVm' does not depend on any axioms\n'StitchModel.Product.Features.scope' does not depend on any axioms\n'StitchModel.Product.Features.sources' does not depend on any axioms\n","stdout_sha256":"a0547cd6b4313dd9b85fcf2403fd1f249e2c865bf56b361d0d218f72bca9031a","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Host.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Host","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Host.Capability' does not depend on any axioms\n'StitchModel.Product.Host.Effect' does not depend on any axioms\n'StitchModel.Product.Host.Grant' does not depend on any axioms\n'StitchModel.Product.Host.Observation' does not depend on any axioms\n'StitchModel.Product.Host.Outcome' does not depend on any axioms\n'StitchModel.Product.Host.Request' does not depend on any axioms\n'StitchModel.Product.Host.State' does not depend on any axioms\n'StitchModel.Product.Host.browserSupported' does not depend on any axioms\n'StitchModel.Product.Host.capabilityCode' does not depend on any axioms\n'StitchModel.Product.Host.finish' does not depend on any axioms\n'StitchModel.Product.Host.ledgerFilter' does not depend on any axioms\n'StitchModel.Product.Host.ledgerFilterSame' does not depend on any axioms\n'StitchModel.Product.Host.nativeRoutingRefused' does not depend on any axioms\n'StitchModel.Product.Host.observationCandidate' does not depend on any axioms\n'StitchModel.Product.Host.observationCannotRefundLedger' depends on axioms: [propext]\n'StitchModel.Product.Host.observationMatches' does not depend on any axioms\n'StitchModel.Product.Host.observe' does not depend on any axioms\n'StitchModel.Product.Host.outcomeCode' does not depend on any axioms\n'StitchModel.Product.Host.pendingMatches' does not depend on any axioms\n'StitchModel.Product.Host.positiveSessionFilterFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Product.Host.requestAllowed' does not depend on any axioms\n'StitchModel.Product.Host.requestDoesNotCreateObservation' does not depend on any axioms\n'StitchModel.Product.Host.requiresDisclosure' does not depend on any axioms\n'StitchModel.Product.Host.reserve' does not depend on any axioms\n'StitchModel.Product.Host.sessionFilter' does not depend on any axioms\n'StitchModel.Product.Host.sessionFilterLedger' does not depend on any axioms\n'StitchModel.Product.Host.sessionLessThanDifference' depends on axioms: [propext, Quot.sound]\n'StitchModel.Product.Host.staleSessionCannotComplete' depends on axioms: [propext, Classical.choice, Quot.sound]\n","stdout_sha256":"d24a06b47d4f3b226b11f23199cd808ca2035967f2b147fa93597bfccf65904f","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Model.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Model","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Model.Asset' does not depend on any axioms\n'StitchModel.Product.Model.Assumption' does not depend on any axioms\n'StitchModel.Product.Model.CapabilityContract' does not depend on any axioms\n'StitchModel.Product.Model.Component' does not depend on any axioms\n'StitchModel.Product.Model.Dependency' does not depend on any axioms\n'StitchModel.Product.Model.Deployment' does not depend on any axioms\n'StitchModel.Product.Model.Model' does not depend on any axioms\n'StitchModel.Product.Model.assetAuthorityUi' does not depend on any axioms\n'StitchModel.Product.Model.assetBrowserAuthority' does not depend on any axioms\n'StitchModel.Product.Model.assetChannelFlow' does not depend on any axioms\n'StitchModel.Product.Model.assetDnsWire' does not depend on any axioms\n'StitchModel.Product.Model.assetFile0' does not depend on any axioms\n'StitchModel.Product.Model.assetFile1' does not depend on any axioms\n'StitchModel.Product.Model.assetFile10' does not depend on any axioms\n'StitchModel.Product.Model.assetFile11' does not depend on any axioms\n'StitchModel.Product.Model.assetFile12' does not depend on any axioms\n'StitchModel.Product.Model.assetFile13' does not depend on any axioms\n'StitchModel.Product.Model.assetFile14' does not depend on any axioms\n'StitchModel.Product.Model.assetFile15' does not depend on any axioms\n'StitchModel.Product.Model.assetFile16' does not depend on any axioms\n'StitchModel.Product.Model.assetFile17' does not depend on any axioms\n'StitchModel.Product.Model.assetFile2' does not depend on any axioms\n'StitchModel.Product.Model.assetFile3' does not depend on any axioms\n'StitchModel.Product.Model.assetFile4' does not depend on any axioms\n'StitchModel.Product.Model.assetFile5' does not depend on any axioms\n'StitchModel.Product.Model.assetFile6' does not depend on any axioms\n'StitchModel.Product.Model.assetFile7' does not depend on any axioms\n'StitchModel.Product.Model.assetFile8' does not depend on any axioms\n'StitchModel.Product.Model.assetFile9' does not depend on any axioms\n'StitchModel.Product.Model.assetIds' does not depend on any axioms\n'StitchModel.Product.Model.assetLifecycleEffects' does not depend on any axioms\n'StitchModel.Product.Model.assetPrismId' does not depend on any axioms\n'StitchModel.Product.Model.assetProductExperience' does not depend on any axioms\n'StitchModel.Product.Model.assetRecovery' does not depend on any axioms\n'StitchModel.Product.Model.assetRecoveryUi' does not depend on any axioms\n'StitchModel.Product.Model.assetRelayFraming' does not depend on any axioms\n'StitchModel.Product.Model.assetRustConformance' does not depend on any axioms\n'StitchModel.Product.Model.assetSignaling' does not depend on any axioms\n'StitchModel.Product.Model.assetSiteCatalog' does not depend on any axioms\n'StitchModel.Product.Model.assetSiteExplorer' does not depend on any axioms\n'StitchModel.Product.Model.assetSiteFabric' does not depend on any axioms\n'StitchModel.Product.Model.assetSiteFacets' does not depend on any axioms\n'StitchModel.Product.Model.assetSiteStyle' does not depend on any axioms\n'StitchModel.Product.Model.assetVmAdministration' does not depend on any axioms\n'StitchModel.Product.Model.assumptionArtifactConformance' does not depend on any axioms\n'StitchModel.Product.Model.assumptionBrowserSemantics' does not depend on any axioms\n'StitchModel.Product.Model.assumptionCryptographicSecurity' does not depend on any axioms\n'StitchModel.Product.Model.assumptionDisclosureConsent' does not depend on any axioms\n'StitchModel.Product.Model.assumptionFailureDomains' does not depend on any axioms\n'StitchModel.Product.Model.assumptionIds' does not depend on any axioms\n'StitchModel.Product.Model.assumptionNetworkAvailability' does not depend on any axioms\n'StitchModel.Product.Model.assumptionObserverAnchor' does not depend on any axioms\n'StitchModel.Product.Model.assumptionPeerAssertion' does not depend on any axioms\n'StitchModel.Product.Model.assumptionSerializedJournal' does not depend on any axioms\n'StitchModel.Product.Model.assumptionTimeSources' does not depend on any axioms\n'StitchModel.Product.Model.assumptionVmIsolation' does not depend on any axioms\n'StitchModel.Product.Model.capabilityArtifactFetch' does not depend on any axioms\n'StitchModel.Product.Model.capabilityContractIds' does not depend on any axioms\n'StitchModel.Product.Model.capabilityCrypto' does not depend on any axioms\n'StitchModel.Product.Model.capabilityDnsRead' does not depend on any axioms\n'StitchModel.Product.Model.capabilityDnsWrite' does not depend on any axioms\n'StitchModel.Product.Model.capabilityDom' does not depend on any axioms\n'StitchModel.Product.Model.capabilityLocalBroadcast' does not depend on any axioms\n'StitchModel.Product.Model.capabilityMonotonicClock' does not depend on any axioms\n'StitchModel.Product.Model.capabilityNativeRouting' does not depend on any axioms\n'StitchModel.Product.Model.capabilityOriginStorage' does not depend on any axioms\n'StitchModel.Product.Model.capabilityPeerChannel' does not depend on any axioms\n'StitchModel.Product.Model.capabilityPublicRelay' does not depend on any axioms\n'StitchModel.Product.Model.capabilityPublicSignaling' does not depend on any axioms\n'StitchModel.Product.Model.capabilitySessionStorage' does not depend on any axioms\n'StitchModel.Product.Model.capabilityVm' does not depend on any axioms\n'StitchModel.Product.Model.capabilityWallClock' does not depend on any axioms\n'StitchModel.Product.Model.capabilityWebLock' does not depend on any axioms\n'StitchModel.Product.Model.componentAdmission' does not depend on any axioms\n'StitchModel.Product.Model.componentAssetsClosed' does not depend on any axioms\n'StitchModel.Product.Model.componentBrowser' does not depend on any axioms\n'StitchModel.Product.Model.componentCompute' does not depend on any axioms\n'StitchModel.Product.Model.componentCryptography' does not depend on any axioms\n'StitchModel.Product.Model.componentDiscovery' does not depend on any axioms\n'StitchModel.Product.Model.componentIdentity' does not depend on any axioms\n'StitchModel.Product.Model.componentIds' does not depend on any axioms\n'StitchModel.Product.Model.componentLegacy' does not depend on any axioms\n'StitchModel.Product.Model.componentNativeRouting' does not depend on any axioms\n'StitchModel.Product.Model.componentPeers' does not depend on any axioms\n'StitchModel.Product.Model.componentPointerAuthority' does not depend on any axioms\n'StitchModel.Product.Model.componentPrismId' does not depend on any axioms\n'StitchModel.Product.Model.componentPublicRelay' does not depend on any axioms\n'StitchModel.Product.Model.componentRuntimeHost' does not depend on any axioms\n'StitchModel.Product.Model.componentScheduler' does not depend on any axioms\n'StitchModel.Product.Model.componentSignaling' does not depend on any axioms\n'StitchModel.Product.Model.componentStaticHost' does not depend on any axioms\n'StitchModel.Product.Model.componentStorage' does not depend on any axioms\n'StitchModel.Product.Model.componentTransport' does not depend on any axioms\n'StitchModel.Product.Model.componentVm' does not depend on any axioms\n'StitchModel.Product.Model.contractsClosed' does not depend on any axioms\n'StitchModel.Product.Model.dependenciesClosed' does not depend on any axioms\n'StitchModel.Product.Model.dependencyBrowserApis' does not depend on any axioms\n'StitchModel.Product.Model.dependencyCloudflareDns' does not depend on any axioms\n'StitchModel.Product.Model.dependencyCloudflareStun' does not depend on any axioms\n'StitchModel.Product.Model.dependencyCloudflareWriter' does not depend on any axioms\n'StitchModel.Product.Model.dependencyGoogleStun' does not depend on any axioms\n'StitchModel.Product.Model.dependencyIds' does not depend on any axioms\n'StitchModel.Product.Model.dependencyNtfyRelay' does not depend on any axioms\n'StitchModel.Product.Model.dependencyNtfySignaling' does not depend on any axioms\n'StitchModel.Product.Model.dependencyPrismCode' does not depend on any axioms\n'StitchModel.Product.Model.dependencyPrismSdk' does not depend on any axioms\n'StitchModel.Product.Model.dependencyStaticOrigin' does not depend on any axioms\n'StitchModel.Product.Model.dependencyVmAssets' does not depend on any axioms\n'StitchModel.Product.Model.deploymentBrowserSession' does not depend on any axioms\n'StitchModel.Product.Model.deploymentIds' does not depend on any axioms\n'StitchModel.Product.Model.deploymentPureProbe' does not depend on any axioms\n'StitchModel.Product.Model.deploymentsClosed' does not depend on any axioms\n'StitchModel.Product.Model.member' does not depend on any axioms\n'StitchModel.Product.Model.members' does not depend on any axioms\n'StitchModel.Product.Model.product' does not depend on any axioms\n'StitchModel.Product.Model.productAssetsRedistributable' does not depend on any axioms\n'StitchModel.Product.Model.productGraphIsClosed' does not depend on any axioms\n'StitchModel.Product.Model.redistributionClosed' does not depend on any axioms\n'StitchModel.Product.Model.unique' does not depend on any axioms\n'StitchModel.Product.Model.valid' does not depend on any axioms\n'StitchModel.Product.Model.vendorDistributionMaterialsRecorded' does not depend on any axioms\n","stdout_sha256":"a8e6f66006f9c031d4e4a935baa8223b584fccdfd5e616630b016e3435e52242","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Persistence.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Persistence","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Persistence.Mechanism' does not depend on any axioms\n'StitchModel.Product.Persistence.Source' does not depend on any axioms\n'StitchModel.Product.Persistence.absentSignerIsNeverRestored' does not depend on any axioms\n'StitchModel.Product.Persistence.identitySeparation' does not depend on any axioms\n'StitchModel.Product.Persistence.mechanismBudgetLedger' does not depend on any axioms\n'StitchModel.Product.Persistence.mechanismObjectCustody' does not depend on any axioms\n'StitchModel.Product.Persistence.mechanismPureCheckpoint' does not depend on any axioms\n'StitchModel.Product.Persistence.mechanismRecoveryVault' does not depend on any axioms\n'StitchModel.Product.Persistence.mechanismSavedSigner' does not depend on any axioms\n'StitchModel.Product.Persistence.mechanismTrustedHead' does not depend on any axioms\n'StitchModel.Product.Persistence.mechanismUnknownPublication' does not depend on any axioms\n'StitchModel.Product.Persistence.mechanismVmCommand' does not depend on any axioms\n'StitchModel.Product.Persistence.mechanisms' does not depend on any axioms\n'StitchModel.Product.Persistence.restoreExistingSignerAllowed' does not depend on any axioms\n'StitchModel.Product.Persistence.revokedSignerIsNeverRestored' does not depend on any axioms\n'StitchModel.Product.Persistence.sources' does not depend on any axioms\n'StitchModel.Product.Persistence.unknownPublicationOffersReconciliation' does not depend on any axioms\n'StitchModel.Product.Persistence.unknownPublicationRetainsReadOnlyBoundary' does not depend on any axioms\n","stdout_sha256":"2d0e3c79585f1d3287d37b86aa71992d53faefcb45c49bc8a8a8e172e37b857e","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Quality.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Quality","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Quality.MeasureContract' does not depend on any axioms\n'StitchModel.Product.Quality.Source' does not depend on any axioms\n'StitchModel.Product.Quality.characteristicFunctionalSuitability' does not depend on any axioms\n'StitchModel.Product.Quality.characteristicInteractionCapability' does not depend on any axioms\n'StitchModel.Product.Quality.characteristicMaintainability' does not depend on any axioms\n'StitchModel.Product.Quality.characteristicPerformanceEfficiency' does not depend on any axioms\n'StitchModel.Product.Quality.characteristicReliability' does not depend on any axioms\n'StitchModel.Product.Quality.characteristicSecurity' does not depend on any axioms\n'StitchModel.Product.Quality.contractActionCoverage' does not depend on any axioms\n'StitchModel.Product.Quality.contractAuthorityRollback' does not depend on any axioms\n'StitchModel.Product.Quality.contractComponentCoverage' does not depend on any axioms\n'StitchModel.Product.Quality.contractForgedCheckpoints' does not depend on any axioms\n'StitchModel.Product.Quality.contractProgramInstructions' does not depend on any axioms\n'StitchModel.Product.Quality.contractProgramWork' does not depend on any axioms\n'StitchModel.Product.Quality.contractSilentEvidencePromotion' does not depend on any axioms\n'StitchModel.Product.Quality.contractSourceDrift' does not depend on any axioms\n'StitchModel.Product.Quality.contractTermWidth' does not depend on any axioms\n'StitchModel.Product.Quality.contractUnknownWriteReplay' does not depend on any axioms\n'StitchModel.Product.Quality.measureActionCoverage' does not depend on any axioms\n'StitchModel.Product.Quality.measureAuthorityRollback' does not depend on any axioms\n'StitchModel.Product.Quality.measureComponentCoverage' does not depend on any axioms\n'StitchModel.Product.Quality.measureForgedCheckpoints' does not depend on any axioms\n'StitchModel.Product.Quality.measureProgramInstructions' does not depend on any axioms\n'StitchModel.Product.Quality.measureProgramWork' does not depend on any axioms\n'StitchModel.Product.Quality.measureSilentEvidencePromotion' does not depend on any axioms\n'StitchModel.Product.Quality.measureSourceDrift' does not depend on any axioms\n'StitchModel.Product.Quality.measureTermWidth' does not depend on any axioms\n'StitchModel.Product.Quality.measureUnknownWriteReplay' does not depend on any axioms\n'StitchModel.Product.Quality.openQualities' does not depend on any axioms\n'StitchModel.Product.Quality.requirementActionCoverage' does not depend on any axioms\n'StitchModel.Product.Quality.requirementAuthorityRollback' does not depend on any axioms\n'StitchModel.Product.Quality.requirementComponentCoverage' does not depend on any axioms\n'StitchModel.Product.Quality.requirementForgedCheckpoints' does not depend on any axioms\n'StitchModel.Product.Quality.requirementProgramInstructions' does not depend on any axioms\n'StitchModel.Product.Quality.requirementProgramWork' does not depend on any axioms\n'StitchModel.Product.Quality.requirementSilentEvidencePromotion' does not depend on any axioms\n'StitchModel.Product.Quality.requirementSourceDrift' does not depend on any axioms\n'StitchModel.Product.Quality.requirementTermWidth' does not depend on any axioms\n'StitchModel.Product.Quality.requirementUnknownWriteReplay' does not depend on any axioms\n'StitchModel.Product.Quality.sources' does not depend on any axioms\n'StitchModel.Product.Quality.subcharacteristicAuthenticity' does not depend on any axioms\n'StitchModel.Product.Quality.subcharacteristicCapacity' does not depend on any axioms\n'StitchModel.Product.Quality.subcharacteristicFunctionalCompleteness' does not depend on any axioms\n'StitchModel.Product.Quality.subcharacteristicIntegrity' does not depend on any axioms\n'StitchModel.Product.Quality.subcharacteristicModularity' does not depend on any axioms\n'StitchModel.Product.Quality.subcharacteristicRecoverability' does not depend on any axioms\n'StitchModel.Product.Quality.subcharacteristicSelfDescriptiveness' does not depend on any axioms\n'StitchModel.Product.Quality.subcharacteristicTestability' does not depend on any axioms\n","stdout_sha256":"5ee67d79c31e005a08c7623dae448096cef9ac331508e14307f679984c0738ed","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Release.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Release","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Release.Artifact' does not depend on any axioms\n'StitchModel.Product.Release.Deployment' does not depend on any axioms\n'StitchModel.Product.Release.Source' does not depend on any axioms\n'StitchModel.Product.Release.artifact000' does not depend on any axioms\n'StitchModel.Product.Release.artifact001' does not depend on any axioms\n'StitchModel.Product.Release.artifact002' does not depend on any axioms\n'StitchModel.Product.Release.artifact003' does not depend on any axioms\n'StitchModel.Product.Release.artifact004' does not depend on any axioms\n'StitchModel.Product.Release.artifact005' does not depend on any axioms\n'StitchModel.Product.Release.artifact006' does not depend on any axioms\n'StitchModel.Product.Release.artifact007' does not depend on any axioms\n'StitchModel.Product.Release.artifact008' does not depend on any axioms\n'StitchModel.Product.Release.artifact009' does not depend on any axioms\n'StitchModel.Product.Release.artifact010' does not depend on any axioms\n'StitchModel.Product.Release.artifact011' does not depend on any axioms\n'StitchModel.Product.Release.artifact012' does not depend on any axioms\n'StitchModel.Product.Release.artifact013' does not depend on any axioms\n'StitchModel.Product.Release.artifact014' does not depend on any axioms\n'StitchModel.Product.Release.artifact015' does not depend on any axioms\n'StitchModel.Product.Release.artifact016' does not depend on any axioms\n'StitchModel.Product.Release.artifact017' does not depend on any axioms\n'StitchModel.Product.Release.artifact018' does not depend on any axioms\n'StitchModel.Product.Release.artifact019' does not depend on any axioms\n'StitchModel.Product.Release.artifact020' does not depend on any axioms\n'StitchModel.Product.Release.artifact021' does not depend on any axioms\n'StitchModel.Product.Release.artifact022' does not depend on any axioms\n'StitchModel.Product.Release.artifact023' does not depend on any axioms\n'StitchModel.Product.Release.artifact024' does not depend on any axioms\n'StitchModel.Product.Release.artifact025' does not depend on any axioms\n'StitchModel.Product.Release.artifact026' does not depend on any axioms\n'StitchModel.Product.Release.artifact027' does not depend on any axioms\n'StitchModel.Product.Release.artifact028' does not depend on any axioms\n'StitchModel.Product.Release.artifact029' does not depend on any axioms\n'StitchModel.Product.Release.artifact030' does not depend on any axioms\n'StitchModel.Product.Release.artifact031' does not depend on any axioms\n'StitchModel.Product.Release.artifact032' does not depend on any axioms\n'StitchModel.Product.Release.artifact033' does not depend on any axioms\n'StitchModel.Product.Release.artifact034' does not depend on any axioms\n'StitchModel.Product.Release.artifact035' does not depend on any axioms\n'StitchModel.Product.Release.deploymentBrowserSession' does not depend on any axioms\n'StitchModel.Product.Release.deploymentPureProbe' does not depend on any axioms\n'StitchModel.Product.Release.gate' does not depend on any axioms\n'StitchModel.Product.Release.releaseBoundary' does not depend on any axioms\n'StitchModel.Product.Release.releaseRequirements' does not depend on any axioms\n'StitchModel.Product.Release.sources' does not depend on any axioms\n'StitchModel.Product.Release.version' does not depend on any axioms\n","stdout_sha256":"8a2e447d093f50aeffef4a34bc3742fc14c57329166e89f4f3ffb6faa0264830","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Security.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Security","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Security.Source' does not depend on any axioms\n'StitchModel.Product.Security.activityAuthoritySpoofing' does not depend on any axioms\n'StitchModel.Product.Security.activityCheckpointForgery' does not depend on any axioms\n'StitchModel.Product.Security.activityDisclosure' does not depend on any axioms\n'StitchModel.Product.Security.activityEffectReplay' does not depend on any axioms\n'StitchModel.Product.Security.activityFragmentTampering' does not depend on any axioms\n'StitchModel.Product.Security.activityGuestPrivilege' does not depend on any axioms\n'StitchModel.Product.Security.activityOriginCompromise' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismActionReplay' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismCanonicalDivergence' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismDelegateOverreach' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismGenesisConfusion' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismGuardianCollusion' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismGuardianDeception' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismKeyClaimForgery' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismLinkHijack' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismLinkability' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismLogFlooding' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismLogTampering' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismMutualRevocation' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismOriginScript' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismPersonaHijack' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismQuantumForgery' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismQuantumHarvest' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismRecoveryLoss' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismRekeyWithholding' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismRepudiation' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismRogueBind' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismStolenDevice' does not depend on any axioms\n'StitchModel.Product.Security.activityPrismSyncObservation' does not depend on any axioms\n'StitchModel.Product.Security.activityResourceExhaustion' does not depend on any axioms\n'StitchModel.Product.Security.activitySignalingSpoofing' does not depend on any axioms\n'StitchModel.Product.Security.activityStorageLoss' does not depend on any axioms\n'StitchModel.Product.Security.activityVendorSubstitution' does not depend on any axioms\n'StitchModel.Product.Security.assessmentPolicy' does not depend on any axioms\n'StitchModel.Product.Security.assetAdmission' does not depend on any axioms\n'StitchModel.Product.Security.assetBrowser' does not depend on any axioms\n'StitchModel.Product.Security.assetCompute' does not depend on any axioms\n'StitchModel.Product.Security.assetDiscovery' does not depend on any axioms\n'StitchModel.Product.Security.assetPointerAuthority' does not depend on any axioms\n'StitchModel.Product.Security.assetPrismId' does not depend on any axioms\n'StitchModel.Product.Security.assetPublicRelay' does not depend on any axioms\n'StitchModel.Product.Security.assetStorage' does not depend on any axioms\n'StitchModel.Product.Security.assetTransport' does not depend on any axioms\n'StitchModel.Product.Security.assetVm' does not depend on any axioms\n'StitchModel.Product.Security.controlAuthoritySpoofing' does not depend on any axioms\n'StitchModel.Product.Security.controlCheckpointForgery' does not depend on any axioms\n'StitchModel.Product.Security.controlDisclosure' does not depend on any axioms\n'StitchModel.Product.Security.controlEffectReplay' does not depend on any axioms\n'StitchModel.Product.Security.controlFragmentTampering' does not depend on any axioms\n'StitchModel.Product.Security.controlGuestPrivilege' does not depend on any axioms\n'StitchModel.Product.Security.controlOriginCompromise' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismActionReplay' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismCanonicalDivergence' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismDelegateOverreach' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismGenesisConfusion' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismGuardianCollusion' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismGuardianDeception' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismKeyClaimForgery' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismLinkHijack' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismLinkability' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismLogFlooding' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismLogTampering' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismMutualRevocation' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismOriginScript' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismPersonaHijack' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismQuantumForgery' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismQuantumHarvest' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismRecoveryLoss' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismRekeyWithholding' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismRepudiation' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismRogueBind' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismStolenDevice' does not depend on any axioms\n'StitchModel.Product.Security.controlPrismSyncObservation' does not depend on any axioms\n'StitchModel.Product.Security.controlResourceExhaustion' does not depend on any axioms\n'StitchModel.Product.Security.controlSet' does not depend on any axioms\n'StitchModel.Product.Security.controlSignalingSpoofing' does not depend on any axioms\n'StitchModel.Product.Security.controlStorageLoss' does not depend on any axioms\n'StitchModel.Product.Security.controlVendorSubstitution' does not depend on any axioms\n'StitchModel.Product.Security.mappingAuthoritySpoofing' does not depend on any axioms\n'StitchModel.Product.Security.mappingCheckpointForgery' does not depend on any axioms\n'StitchModel.Product.Security.mappingDisclosure' does not depend on any axioms\n'StitchModel.Product.Security.mappingEffectReplay' does not depend on any axioms\n'StitchModel.Product.Security.mappingFragmentTampering' does not depend on any axioms\n'StitchModel.Product.Security.mappingGuestPrivilege' does not depend on any axioms\n'StitchModel.Product.Security.mappingOriginCompromise' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismActionReplay' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismCanonicalDivergence' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismDelegateOverreach' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismGenesisConfusion' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismGuardianCollusion' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismGuardianDeception' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismKeyClaimForgery' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismLinkHijack' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismLinkability' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismLogFlooding' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismLogTampering' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismMutualRevocation' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismOriginScript' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismPersonaHijack' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismQuantumForgery' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismQuantumHarvest' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismRecoveryLoss' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismRekeyWithholding' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismRepudiation' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismRogueBind' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismStolenDevice' does not depend on any axioms\n'StitchModel.Product.Security.mappingPrismSyncObservation' does not depend on any axioms\n'StitchModel.Product.Security.mappingResourceExhaustion' does not depend on any axioms\n'StitchModel.Product.Security.mappingSignalingSpoofing' does not depend on any axioms\n'StitchModel.Product.Security.mappingStorageLoss' does not depend on any axioms\n'StitchModel.Product.Security.mappingVendorSubstitution' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetAdmission' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetBrowser' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetCompute' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetDiscovery' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetPointerAuthority' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetPrismId' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetPublicRelay' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetStorage' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetTransport' does not depend on any axioms\n'StitchModel.Product.Security.modeledAssetVm' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlAuthoritySpoofing' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlCheckpointForgery' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlDisclosure' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlEffectReplay' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlFragmentTampering' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlGuestPrivilege' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlOriginCompromise' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismActionReplay' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismCanonicalDivergence' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismDelegateOverreach' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismGenesisConfusion' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismGuardianCollusion' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismGuardianDeception' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismKeyClaimForgery' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismLinkHijack' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismLinkability' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismLogFlooding' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismLogTampering' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismMutualRevocation' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismOriginScript' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismPersonaHijack' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismQuantumForgery' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismQuantumHarvest' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismRecoveryLoss' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismRekeyWithholding' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismRepudiation' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismRogueBind' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismStolenDevice' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlPrismSyncObservation' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlResourceExhaustion' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlSignalingSpoofing' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlStorageLoss' does not depend on any axioms\n'StitchModel.Product.Security.modeledControlVendorSubstitution' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatAuthoritySpoofing' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatCheckpointForgery' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatDisclosure' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatEffectReplay' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatFragmentTampering' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatGuestPrivilege' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatOriginCompromise' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismActionReplay' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismCanonicalDivergence' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismDelegateOverreach' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismGenesisConfusion' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismGuardianCollusion' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismGuardianDeception' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismKeyClaimForgery' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismLinkHijack' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismLinkability' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismLogFlooding' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismLogTampering' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismMutualRevocation' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismOriginScript' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismPersonaHijack' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismQuantumForgery' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismQuantumHarvest' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismRecoveryLoss' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismRekeyWithholding' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismRepudiation' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismRogueBind' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismStolenDevice' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatPrismSyncObservation' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatResourceExhaustion' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatSignalingSpoofing' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatStorageLoss' does not depend on any axioms\n'StitchModel.Product.Security.modeledThreatVendorSubstitution' does not depend on any axioms\n'StitchModel.Product.Security.riskAuthoritySpoofing' does not depend on any axioms\n'StitchModel.Product.Security.riskCheckpointForgery' does not depend on any axioms\n'StitchModel.Product.Security.riskDisclosure' does not depend on any axioms\n'StitchModel.Product.Security.riskEffectReplay' does not depend on any axioms\n'StitchModel.Product.Security.riskFragmentTampering' does not depend on any axioms\n'StitchModel.Product.Security.riskGuestPrivilege' does not depend on any axioms\n'StitchModel.Product.Security.riskOriginCompromise' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismActionReplay' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismCanonicalDivergence' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismDelegateOverreach' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismGenesisConfusion' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismGuardianCollusion' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismGuardianDeception' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismKeyClaimForgery' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismLinkHijack' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismLinkability' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismLogFlooding' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismLogTampering' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismMutualRevocation' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismOriginScript' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismPersonaHijack' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismQuantumForgery' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismQuantumHarvest' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismRecoveryLoss' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismRekeyWithholding' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismRepudiation' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismRogueBind' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismStolenDevice' does not depend on any axioms\n'StitchModel.Product.Security.riskPrismSyncObservation' does not depend on any axioms\n'StitchModel.Product.Security.riskResourceExhaustion' does not depend on any axioms\n'StitchModel.Product.Security.riskSignalingSpoofing' does not depend on any axioms\n'StitchModel.Product.Security.riskStorageLoss' does not depend on any axioms\n'StitchModel.Product.Security.riskVendorSubstitution' does not depend on any axioms\n'StitchModel.Product.Security.sources' does not depend on any axioms\n'StitchModel.Product.Security.threatAuthoritySpoofing' does not depend on any axioms\n'StitchModel.Product.Security.threatCheckpointForgery' does not depend on any axioms\n'StitchModel.Product.Security.threatDisclosure' does not depend on any axioms\n'StitchModel.Product.Security.threatEffectReplay' does not depend on any axioms\n'StitchModel.Product.Security.threatFragmentTampering' does not depend on any axioms\n'StitchModel.Product.Security.threatGuestPrivilege' does not depend on any axioms\n'StitchModel.Product.Security.threatOriginCompromise' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismActionReplay' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismCanonicalDivergence' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismDelegateOverreach' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismGenesisConfusion' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismGuardianCollusion' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismGuardianDeception' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismKeyClaimForgery' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismLinkHijack' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismLinkability' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismLogFlooding' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismLogTampering' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismMutualRevocation' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismOriginScript' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismPersonaHijack' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismQuantumForgery' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismQuantumHarvest' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismRecoveryLoss' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismRekeyWithholding' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismRepudiation' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismRogueBind' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismStolenDevice' does not depend on any axioms\n'StitchModel.Product.Security.threatPrismSyncObservation' does not depend on any axioms\n'StitchModel.Product.Security.threatResourceExhaustion' does not depend on any axioms\n'StitchModel.Product.Security.threatSignalingSpoofing' does not depend on any axioms\n'StitchModel.Product.Security.threatStorageLoss' does not depend on any axioms\n'StitchModel.Product.Security.threatVendorSubstitution' does not depend on any axioms\n","stdout_sha256":"2bb0093397a362709329a7e371ad89333b9e951250cbd09b8af0fe5af8632ef4","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Users.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Product.Users","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Product.Users.Source' does not depend on any axioms\n'StitchModel.Product.Users.authority' does not depend on any axioms\n'StitchModel.Product.Users.contextNotes' does not depend on any axioms\n'StitchModel.Product.Users.environments' does not depend on any axioms\n'StitchModel.Product.Users.everyGoalNamesAUser' does not depend on any axioms\n'StitchModel.Product.Users.everyTaskNamesAGoal' does not depend on any axioms\n'StitchModel.Product.Users.everyTaskNamesAcceptanceEvidence' does not depend on any axioms\n'StitchModel.Product.Users.goals' does not depend on any axioms\n'StitchModel.Product.Users.goalsHaveUsers' does not depend on any axioms\n'StitchModel.Product.Users.groups' does not depend on any axioms\n'StitchModel.Product.Users.measures' does not depend on any axioms\n'StitchModel.Product.Users.nonemptyAcceptance' does not depend on any axioms\n'StitchModel.Product.Users.sources' does not depend on any axioms\n'StitchModel.Product.Users.tasks' does not depend on any axioms\n'StitchModel.Product.Users.tasksHaveAcceptance' does not depend on any axioms\n'StitchModel.Product.Users.tasksHaveGoals' does not depend on any axioms\n","stdout_sha256":"6561a95d15c8e595c99b64ba61af047dc594dce2dc5f06c8983dc807867d71c7","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Production.ThreatModel.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Production.ThreatModel","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Production.ThreatModel.AcceptedRisk' does not depend on any axioms\n'StitchModel.Production.ThreatModel.ControlSet' does not depend on any axioms\n'StitchModel.Production.ThreatModel.Evidence' does not depend on any axioms\n'StitchModel.Production.ThreatModel.EvidenceKind' does not depend on any axioms\n'StitchModel.Production.ThreatModel.ModeledAsset' does not depend on any axioms\n'StitchModel.Production.ThreatModel.ModeledControl' does not depend on any axioms\n'StitchModel.Production.ThreatModel.ModeledThreat' does not depend on any axioms\n'StitchModel.Production.ThreatModel.NormalizedThreatModel' does not depend on any axioms\n'StitchModel.Production.ThreatModel.Stride' does not depend on any axioms\n'StitchModel.Production.ThreatModel.ThreatMapping' does not depend on any axioms\n","stdout_sha256":"3cf02e1a1d74a87639df50936c1235b47218a5f439aa5a7d073d2e3416994157","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Authority.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Authority","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Authority.State' does not depend on any axioms\n'StitchModel.Stitch.Authority.anchorChronologyAllowed' does not depend on any axioms\n'StitchModel.Stitch.Authority.anchorSaveAllowed' does not depend on any axioms\n'StitchModel.Stitch.Authority.changedAnchorCannotMigrate' does not depend on any axioms\n'StitchModel.Stitch.Authority.controlAllowed' does not depend on any axioms\n'StitchModel.Stitch.Authority.journalRemovalAllowed' does not depend on any axioms\n'StitchModel.Stitch.Authority.maySign' does not depend on any axioms\n'StitchModel.Stitch.Authority.migrate' does not depend on any axioms\n'StitchModel.Stitch.Authority.migrationAllowed' does not depend on any axioms\n'StitchModel.Stitch.Authority.publicationAllowed' does not depend on any axioms\n'StitchModel.Stitch.Authority.retiredAuthorityCannotPublish' does not depend on any axioms\n'StitchModel.Stitch.Authority.revocationAllowed' does not depend on any axioms\n'StitchModel.Stitch.Authority.revocationBlocksSigning' does not depend on any axioms\n'StitchModel.Stitch.Authority.revoke' does not depend on any axioms\n'StitchModel.Stitch.Authority.rotate' does not depend on any axioms\n'StitchModel.Stitch.Authority.rotateCreatesNextGeneration' does not depend on any axioms\n'StitchModel.Stitch.Authority.rotationAllowed' does not depend on any axioms\n'StitchModel.Stitch.Authority.sameKeyRollbackRefused' does not depend on any axioms\n'StitchModel.Stitch.Authority.signingAllowed' does not depend on any axioms\n'StitchModel.Stitch.Authority.staleMigrationPreservesState' does not depend on any axioms\n'StitchModel.Stitch.Authority.uncertainJournalCannotBeRemoved' does not depend on any axioms\n'StitchModel.Stitch.Authority.unconfirmedRotationRefused' does not depend on any axioms\n","stdout_sha256":"ac9f5c2ff6d092dee2b9c3b0243db18f2791a4bf0d3bf667648ba3e84d05cc84","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Budget.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Budget","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Budget.Budget' does not depend on any axioms\n'StitchModel.Stitch.Budget.Ledger' does not depend on any axioms\n'StitchModel.Stitch.Budget.Reservation' does not depend on any axioms\n'StitchModel.Stitch.Budget.Resources' does not depend on any axioms\n'StitchModel.Stitch.Budget.Selection' does not depend on any axioms\n'StitchModel.Stitch.Budget.SettlementObservation' does not depend on any axioms\n'StitchModel.Stitch.Budget.SettlementOutcome' does not depend on any axioms\n'StitchModel.Stitch.Budget.addResources' does not depend on any axioms\n'StitchModel.Stitch.Budget.admitAction' does not depend on any axioms\n'StitchModel.Stitch.Budget.boolAndFalse' does not depend on any axioms\n'StitchModel.Stitch.Budget.boolFalseAnd' does not depend on any axioms\n'StitchModel.Stitch.Budget.boolImpliesTruth' does not depend on any axioms\n'StitchModel.Stitch.Budget.boolNotTrue' does not depend on any axioms\n'StitchModel.Stitch.Budget.budgetValid' does not depend on any axioms\n'StitchModel.Stitch.Budget.chargeComparisonObserved' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.chargeFourConjunctionFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.chargedAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseBoolFalse' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseBoolTrue' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseNat' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseNatFalse' does not depend on any axioms\n'StitchModel.Stitch.Budget.chooseNatTrue' does not depend on any axioms\n'StitchModel.Stitch.Budget.clockRollbackRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.headChargedAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.ledgerBudget' does not depend on any axioms\n'StitchModel.Stitch.Budget.ledgerValid' does not depend on any axioms\n'StitchModel.Stitch.Budget.ledgerValiditySelect' does not depend on any axioms\n'StitchModel.Stitch.Budget.outcomeKnown' does not depend on any axioms\n'StitchModel.Stitch.Budget.recordSettlement' does not depend on any axioms\n'StitchModel.Stitch.Budget.recordSettlementFrom' does not depend on any axioms\n'StitchModel.Stitch.Budget.recordedIdCannotBeReservedAgain' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationCandidate' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationCandidateClock' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationCandidateGuarantee' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.reservationCandidateListGuarantee' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationCandidateNumericGuarantee' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.reservationConjunctionClosure' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationCostValid' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationEpochReflexive' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationFreshCostValidity' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationLedgerClockSelect' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationLedgerParts' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationListAdmissionFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationNumericValidity' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationPreservesLimit' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.reservationSelectNat' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationSelectedClockFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reservationSelectedSafety' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationTrueAnd' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationUnused' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationValidityOrder' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservationsValid' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveAction' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveAllowed' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveAmount' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveLedger' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveLedgerAllowed' does not depend on any axioms\n'StitchModel.Stitch.Budget.reserveLedgerClockFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.reserveLedgerPreservesValidity' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.reserveLedgerPreservesValidityFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.reservedAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.reservedTotal' does not depend on any axioms\n'StitchModel.Stitch.Budget.resourceAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.resourceAtBound' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.resourceAtChargeConstraint' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.resourcesAtMost' does not depend on any axioms\n'StitchModel.Stitch.Budget.resourcesWithin' does not depend on any axioms\n'StitchModel.Stitch.Budget.sameResources' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarAccounting' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarAccountingStep' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarAdditionCancellation' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.scalarAdditionMonotone' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarBoolToBound' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.scalarBoundToBool' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.scalarChargeObservation' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarChargeRejected' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarChargeSafe' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarCheckAdditionCancellation' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.scalarCheckComparisonCongruence' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarCheckReflected' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarConsChargeCheck' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.scalarFreshChargeCheck' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarFreshChargeGate' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarSameConsequent' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarSettlementFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarSettlementSafety' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarStepChargeGuarantee' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.scalarStepChargeSafe' does not depend on any axioms\n'StitchModel.Stitch.Budget.scalarTrueConsequent' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.scalarTrueConsequentObserved' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.selectBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectBoolFromBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectBoolFromValue' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectBoth' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectLedger' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectNat' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectNatFromBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectRemaining' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedAdmissionSafety' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordCeiling' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordCharge' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordChargeExpanded' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordCostValidity' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordEpoch' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedRecordId' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectedSettlementRecord' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectionFromBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectionValue' does not depend on any axioms\n'StitchModel.Stitch.Budget.selectionValueFromBool' does not depend on any axioms\n'StitchModel.Stitch.Budget.settleLedger' does not depend on any axioms\n'StitchModel.Stitch.Budget.settleLedgerAllowed' does not depend on any axioms\n'StitchModel.Stitch.Budget.settleLedgerClockFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settleLedgerPreservesValidity' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.settleLedgerPreservesValidityFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.settleReserved' does not depend on any axioms\n'StitchModel.Stitch.Budget.settleSpent' does not depend on any axioms\n'StitchModel.Stitch.Budget.settledHeadCannotBeChargedAgain' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settledSelectionChargeStep' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementAllowed' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementCandidate' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementCandidateClock' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementCandidateGuarantee' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.settlementCandidateListBoolean' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementCandidateListGuarantee' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementCandidateNumericBoolean' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.settlementCandidateNumericGuarantee' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.settlementCandidateNumericTransferFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.settlementCannotIncreaseLedgerCharge' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.settlementCannotIncreaseLedgerChargeFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Budget.settlementClockRollbackRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.settlementDoesNotIncreaseCharge' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.settlementFromPreservesReservationValidity' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementFromPreservesUnusedIds' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementImplicationObserved' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementImplies' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementListDomainGate' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementListGateBooleanFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementListGateFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementNumericDomainGate' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementNumericGateBooleanFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementNumericGateFact' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementOldReservationsFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementPreservesReservationValidity' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementPreservesUnusedIds' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementRecorded' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementReservationValidityFact' depends on axioms: [propext]\n'StitchModel.Stitch.Budget.settlementValidityProjection' does not depend on any axioms\n'StitchModel.Stitch.Budget.settlementValidityStep' does not depend on any axioms\n'StitchModel.Stitch.Budget.spentAt' does not depend on any axioms\n'StitchModel.Stitch.Budget.spentTotal' does not depend on any axioms\n'StitchModel.Stitch.Budget.staleEpochCannotSettle' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Budget.unknownOutcomeRetainsLedger' does not depend on any axioms\n'StitchModel.Stitch.Budget.unknownSettlementRetainsReservation' does not depend on any axioms\n'StitchModel.Stitch.Budget.updateSettlementRecord' does not depend on any axioms\n'StitchModel.Stitch.Budget.vectorReservationPreservesBudget' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Budget.zeroResources' does not depend on any axioms\n","stdout_sha256":"2a7cf4c5ead0cc23678c85edfe882855bf746425124dae52af83c2c639ed1855","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.ChannelFlow.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.ChannelFlow","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.ChannelFlow.append' does not depend on any axioms\n'StitchModel.Stitch.ChannelFlow.appendAllowed' does not depend on any axioms\n'StitchModel.Stitch.ChannelFlow.queueAllowed' does not depend on any axioms\n'StitchModel.Stitch.ChannelFlow.sendAllowed' does not depend on any axioms\n'StitchModel.Stitch.ChannelFlow.staleCannotSend' does not depend on any axioms\n","stdout_sha256":"991b29e7df0b802696351d778e795fe61b2812a84102dfe42a8d77fdb49199a9","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Compute.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Compute","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Compute.Checkpoint' does not depend on any axioms\n'StitchModel.Stitch.Compute.CheckpointCommitments' does not depend on any axioms\n'StitchModel.Stitch.Compute.CheckpointDigestInput' does not depend on any axioms\n'StitchModel.Stitch.Compute.CheckpointDigestObservation' does not depend on any axioms\n'StitchModel.Stitch.Compute.InputDigestInput' does not depend on any axioms\n'StitchModel.Stitch.Compute.InputDigestObservation' does not depend on any axioms\n'StitchModel.Stitch.Compute.Instruction' does not depend on any axioms\n'StitchModel.Stitch.Compute.Job' does not depend on any axioms\n'StitchModel.Stitch.Compute.JobCommitments' does not depend on any axioms\n'StitchModel.Stitch.Compute.JobDigestInput' does not depend on any axioms\n'StitchModel.Stitch.Compute.JobDigestObservation' does not depend on any axioms\n'StitchModel.Stitch.Compute.Program' does not depend on any axioms\n'StitchModel.Stitch.Compute.ProgramDigestInput' does not depend on any axioms\n'StitchModel.Stitch.Compute.ProgramDigestObservation' does not depend on any axioms\n'StitchModel.Stitch.Compute.StateDigestInput' does not depend on any axioms\n'StitchModel.Stitch.Compute.StateDigestObservation' does not depend on any axioms\n'StitchModel.Stitch.Compute.TypedInstruction' does not depend on any axioms\n'StitchModel.Stitch.Compute.Word' does not depend on any axioms\n'StitchModel.Stitch.Compute.acceptedCheckpointIsSemanticReplay' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Compute.advanceCheckpoint' does not depend on any axioms\n'StitchModel.Stitch.Compute.appendProgram' does not depend on any axioms\n'StitchModel.Stitch.Compute.appendTypedProgram' does not depend on any axioms\n'StitchModel.Stitch.Compute.arithmeticWidth' does not depend on any axioms\n'StitchModel.Stitch.Compute.binaryLength' does not depend on any axioms\n'StitchModel.Stitch.Compute.binaryLengthAcc' does not depend on any axioms\n'StitchModel.Stitch.Compute.bitwiseAcc' does not depend on any axioms\n'StitchModel.Stitch.Compute.byteWidth' does not depend on any axioms\n'StitchModel.Stitch.Compute.checkpointCommitted' does not depend on any axioms\n'StitchModel.Stitch.Compute.checkpointLinkAllowed' does not depend on any axioms\n'StitchModel.Stitch.Compute.checkpointMatchesJob' does not depend on any axioms\n'StitchModel.Stitch.Compute.checkpointStrictlyAdvances' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Compute.checkpointSuccessor' does not depend on any axioms\n'StitchModel.Stitch.Compute.checkpointTransitionNeverRollsBack' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Compute.committedCheckpointAllowed' does not depend on any axioms\n'StitchModel.Stitch.Compute.committedCheckpointReplays' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Compute.committedCheckpointSuccessor' does not depend on any axioms\n'StitchModel.Stitch.Compute.concatCapacityCannotTruncate' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Compute.concatIsBigEndianAppend' does not depend on any axioms\n'StitchModel.Stitch.Compute.concatPreservesDeclaredWidth' does not depend on any axioms\n'StitchModel.Stitch.Compute.concatWords' does not depend on any axioms\n'StitchModel.Stitch.Compute.execute' does not depend on any axioms\n'StitchModel.Stitch.Compute.inputCommitted' does not depend on any axioms\n'StitchModel.Stitch.Compute.instructionAllowed' does not depend on any axioms\n'StitchModel.Stitch.Compute.instructionCount' does not depend on any axioms\n'StitchModel.Stitch.Compute.instructionWellFormed' does not depend on any axioms\n'StitchModel.Stitch.Compute.instructionWork' does not depend on any axioms\n'StitchModel.Stitch.Compute.instructionsAllowed' does not depend on any axioms\n'StitchModel.Stitch.Compute.instructionsWellFormed' does not depend on any axioms\n'StitchModel.Stitch.Compute.jobAllowed' does not depend on any axioms\n'StitchModel.Stitch.Compute.jobCommitted' does not depend on any axioms\n'StitchModel.Stitch.Compute.mismatchedStateValueRejected' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Compute.natBitwise' does not depend on any axioms\n'StitchModel.Stitch.Compute.naturalPower' does not depend on any axioms\n'StitchModel.Stitch.Compute.normalize' does not depend on any axioms\n'StitchModel.Stitch.Compute.operandWidth' does not depend on any axioms\n'StitchModel.Stitch.Compute.powerRetainsExponentBitsAboveU64' does not depend on any axioms\n'StitchModel.Stitch.Compute.powerWork' does not depend on any axioms\n'StitchModel.Stitch.Compute.powerWorkAcc' does not depend on any axioms\n'StitchModel.Stitch.Compute.programAllowed' does not depend on any axioms\n'StitchModel.Stitch.Compute.programCommitted' does not depend on any axioms\n'StitchModel.Stitch.Compute.replayedValue' does not depend on any axioms\n'StitchModel.Stitch.Compute.resumeEqualsUninterrupted' depends on axioms: [propext]\n'StitchModel.Stitch.Compute.ringModulus' does not depend on any axioms\n'StitchModel.Stitch.Compute.ringPow' does not depend on any axioms\n'StitchModel.Stitch.Compute.ringStep' does not depend on any axioms\n'StitchModel.Stitch.Compute.sameInstruction' does not depend on any axioms\n'StitchModel.Stitch.Compute.sameInstructions' does not depend on any axioms\n'StitchModel.Stitch.Compute.semanticTamperingRefused' does not depend on any axioms\n'StitchModel.Stitch.Compute.stateCommitted' does not depend on any axioms\n'StitchModel.Stitch.Compute.supportedWidth' does not depend on any axioms\n'StitchModel.Stitch.Compute.takeSteps' does not depend on any axioms\n'StitchModel.Stitch.Compute.typedAdmissionBoundsDeclaredWidth' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Compute.typedAdmissionBoundsResultWidth' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Compute.typedExecute' does not depend on any axioms\n'StitchModel.Stitch.Compute.typedInstructionAdmission' does not depend on any axioms\n'StitchModel.Stitch.Compute.typedInstructionAllowed' does not depend on any axioms\n'StitchModel.Stitch.Compute.typedInstructionWork' does not depend on any axioms\n'StitchModel.Stitch.Compute.typedProgramAllowed' does not depend on any axioms\n'StitchModel.Stitch.Compute.typedProgramWork' does not depend on any axioms\n'StitchModel.Stitch.Compute.typedProgramWorkAcc' does not depend on any axioms\n'StitchModel.Stitch.Compute.typedResultBits' does not depend on any axioms\n'StitchModel.Stitch.Compute.typedResumeEqualsUninterrupted' depends on axioms: [propext]\n'StitchModel.Stitch.Compute.typedStep' does not depend on any axioms\n'StitchModel.Stitch.Compute.unsupportedWidthCannotCommit' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Compute.wordAllowed' does not depend on any axioms\n'StitchModel.Stitch.Compute.zeroExponentCostsNoMultiplications' depends on axioms: [propext]\n'StitchModel.Stitch.Compute.zeroExponentIsRingUnit' depends on axioms: [propext]\n","stdout_sha256":"eff4b2135cc5c17bfa34ae1e31298188bba47a153eab75db7064f0d710e9087d","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Custody.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Custody","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Custody.FragmentIntegrityObservation' does not depend on any axioms\n'StitchModel.Stitch.Custody.PhysicalCopy' does not depend on any axioms\n'StitchModel.Stitch.Custody.Placement' does not depend on any axioms\n'StitchModel.Stitch.Custody.Receipt' does not depend on any axioms\n'StitchModel.Stitch.Custody.Transfer' does not depend on any axioms\n'StitchModel.Stitch.Custody.TransferPhase' does not depend on any axioms\n'StitchModel.Stitch.Custody.acknowledgeTransfer' does not depend on any axioms\n'StitchModel.Stitch.Custody.activationAllowed' does not depend on any axioms\n'StitchModel.Stitch.Custody.activeCount' does not depend on any axioms\n'StitchModel.Stitch.Custody.activeFirstPreservationFact' does not depend on any axioms\n'StitchModel.Stitch.Custody.activeIndexedPreservationFact' does not depend on any axioms\n'StitchModel.Stitch.Custody.activeRetirementPreservationFact' does not depend on any axioms\n'StitchModel.Stitch.Custody.activeThreshold' does not depend on any axioms\n'StitchModel.Stitch.Custody.booleanSelfPreservationFact' does not depend on any axioms\n'StitchModel.Stitch.Custody.choosePlacement' does not depend on any axioms\n'StitchModel.Stitch.Custody.chooseTruth' does not depend on any axioms\n'StitchModel.Stitch.Custody.commitAllowed' does not depend on any axioms\n'StitchModel.Stitch.Custody.commitTransfer' does not depend on any axioms\n'StitchModel.Stitch.Custody.committedMigrationPreservesRecovery' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Custody.committedMigrationPreservesRecoveryFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Custody.committedPhase' does not depend on any axioms\n'StitchModel.Stitch.Custody.committedPlacement0' does not depend on any axioms\n'StitchModel.Stitch.Custody.committedPlacement1' does not depend on any axioms\n'StitchModel.Stitch.Custody.committedPlacement2' does not depend on any axioms\n'StitchModel.Stitch.Custody.conjunctionPreservationFact' does not depend on any axioms\n'StitchModel.Stitch.Custody.distinctFirstPreservationFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Custody.distinctHolders' does not depend on any axioms\n'StitchModel.Stitch.Custody.distinctIndexedPreservationFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Custody.expiredReceiptDoesNotCountAsLive' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Custody.expiredReservationCannotActivate' does not depend on any axioms\n'StitchModel.Stitch.Custody.failTransfer' does not depend on any axioms\n'StitchModel.Stitch.Custody.fallbackPreservationFact' does not depend on any axioms\n'StitchModel.Stitch.Custody.fragmentBound' does not depend on any axioms\n'StitchModel.Stitch.Custody.fragmentIntegrityAccepted' does not depend on any axioms\n'StitchModel.Stitch.Custody.indexedCopyLive' does not depend on any axioms\n'StitchModel.Stitch.Custody.indexedCopyLiveOne' does not depend on any axioms\n'StitchModel.Stitch.Custody.indexedCopyLiveTwo' does not depend on any axioms\n'StitchModel.Stitch.Custody.indexedCopyLiveZero' does not depend on any axioms\n'StitchModel.Stitch.Custody.indexedMigrationPreservesRecovery' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Custody.indexedMigrationPreservesRecoveryFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.Custody.installReceipt' does not depend on any axioms\n'StitchModel.Stitch.Custody.liveCount' does not depend on any axioms\n'StitchModel.Stitch.Custody.liveGate0Preservation' does not depend on any axioms\n'StitchModel.Stitch.Custody.liveGate1Preservation' does not depend on any axioms\n'StitchModel.Stitch.Custody.liveGate2Preservation' does not depend on any axioms\n'StitchModel.Stitch.Custody.liveMigrationGate0Fact' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.liveMigrationGate1Fact' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.liveMigrationGate2Fact' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.liveRecoveryOfChoice' does not depend on any axioms\n'StitchModel.Stitch.Custody.liveRecoveryOfSelection' does not depend on any axioms\n'StitchModel.Stitch.Custody.migrate' does not depend on any axioms\n'StitchModel.Stitch.Custody.migrationAllowed' does not depend on any axioms\n'StitchModel.Stitch.Custody.migrationBase' does not depend on any axioms\n'StitchModel.Stitch.Custody.migrationGate0' does not depend on any axioms\n'StitchModel.Stitch.Custody.migrationGate1' does not depend on any axioms\n'StitchModel.Stitch.Custody.migrationGate2' does not depend on any axioms\n'StitchModel.Stitch.Custody.physicalBytes' does not depend on any axioms\n'StitchModel.Stitch.Custody.physicalCopyLive' does not depend on any axioms\n'StitchModel.Stitch.Custody.prepareCompletion' does not depend on any axioms\n'StitchModel.Stitch.Custody.receiptBound' does not depend on any axioms\n'StitchModel.Stitch.Custody.receiptLive' does not depend on any axioms\n'StitchModel.Stitch.Custody.recordCompletion' does not depend on any axioms\n'StitchModel.Stitch.Custody.recoverable' does not depend on any axioms\n'StitchModel.Stitch.Custody.recoverableAt' does not depend on any axioms\n'StitchModel.Stitch.Custody.recoveryOfChoice' does not depend on any axioms\n'StitchModel.Stitch.Custody.recoveryOfSelection' does not depend on any axioms\n'StitchModel.Stitch.Custody.replaceFirst' does not depend on any axioms\n'StitchModel.Stitch.Custody.replaceIndex' does not depend on any axioms\n'StitchModel.Stitch.Custody.replacedRouteCannotActivate' does not depend on any axioms\n'StitchModel.Stitch.Custody.requestRecorded' does not depend on any axioms\n'StitchModel.Stitch.Custody.requestUnused' does not depend on any axioms\n'StitchModel.Stitch.Custody.requestWellFormed' does not depend on any axioms\n'StitchModel.Stitch.Custody.requestedPhase' does not depend on any axioms\n'StitchModel.Stitch.Custody.retireAllowed' does not depend on any axioms\n'StitchModel.Stitch.Custody.retireFirst' does not depend on any axioms\n'StitchModel.Stitch.Custody.retirementPreservesRecovery' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.retirementPreservesRecoveryFact' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.retirementPreservesThreshold' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Custody.sameRequest' does not depend on any axioms\n'StitchModel.Stitch.Custody.selectPlacement' does not depend on any axioms\n'StitchModel.Stitch.Custody.selectTruth' does not depend on any axioms\n'StitchModel.Stitch.Custody.selectionOfTruth' does not depend on any axioms\n'StitchModel.Stitch.Custody.sourceLive' does not depend on any axioms\n'StitchModel.Stitch.Custody.sourcePlaced' does not depend on any axioms\n'StitchModel.Stitch.Custody.staticGate0Preservation' does not depend on any axioms\n'StitchModel.Stitch.Custody.staticGate1Preservation' does not depend on any axioms\n'StitchModel.Stitch.Custody.staticGate2Preservation' does not depend on any axioms\n'StitchModel.Stitch.Custody.staticMigrationGate0Fact' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.staticMigrationGate1Fact' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.staticMigrationGate2Fact' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.typedMigrationPreservesLiveRecoveryAtObservationTime' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.typedMigrationPreservesLiveRecoveryAtObservationTimeFact' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.typedMigrationPreservesRecovery' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.typedMigrationPreservesRecoveryFact' depends on axioms: [propext]\n'StitchModel.Stitch.Custody.unacknowledgedCannotCommit' does not depend on any axioms\n'StitchModel.Stitch.Custody.uncommittedCannotRetire' does not depend on any axioms\n","stdout_sha256":"bab17e1c6cb721b73415a6a03a4951357d3c0c468c8d08ffe6e0f77e6a5fd570","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Effects.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Effects","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Effects.C1Progress' does not depend on any axioms\n'StitchModel.Stitch.Effects.DnsCandidate' does not depend on any axioms\n'StitchModel.Stitch.Effects.DnsDecision' does not depend on any axioms\n'StitchModel.Stitch.Effects.DnsPhase' does not depend on any axioms\n'StitchModel.Stitch.Effects.DnsPublication' does not depend on any axioms\n'StitchModel.Stitch.Effects.DnsRead' does not depend on any axioms\n'StitchModel.Stitch.Effects.DnsScope' does not depend on any axioms\n'StitchModel.Stitch.Effects.DnsWriteResult' does not depend on any axioms\n'StitchModel.Stitch.Effects.Transport' does not depend on any axioms\n'StitchModel.Stitch.Effects.TransportCallback' does not depend on any axioms\n'StitchModel.Stitch.Effects.Vm' does not depend on any axioms\n'StitchModel.Stitch.Effects.VmPhase' does not depend on any axioms\n'StitchModel.Stitch.Effects.authorityMayCreate' does not depend on any axioms\n'StitchModel.Stitch.Effects.bootingCannotBootAgain' does not depend on any axioms\n'StitchModel.Stitch.Effects.bootingCannotExecute' does not depend on any axioms\n'StitchModel.Stitch.Effects.c1ConnectionQualified' does not depend on any axioms\n'StitchModel.Stitch.Effects.c1DirectSuccess' does not depend on any axioms\n'StitchModel.Stitch.Effects.c1InWindow' does not depend on any axioms\n'StitchModel.Stitch.Effects.c1ObserveProbe' does not depend on any axioms\n'StitchModel.Stitch.Effects.c1ProbeAccepted' does not depend on any axioms\n'StitchModel.Stitch.Effects.closedTransportCannotSend' does not depend on any axioms\n'StitchModel.Stitch.Effects.closingAdvancesGeneration' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsBeginWrite' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsDecisionWrites' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsFinishWrite' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsMayReconcile' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsMayWritePhase' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsReadDecision' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsReconciled' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsRequestAllowed' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsScopeMatches' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsSelectGatedRead' does not depend on any axioms\n'StitchModel.Stitch.Effects.dnsSelectRead' does not depend on any axioms\n'StitchModel.Stitch.Effects.existingAuthorityNeverRotates' does not depend on any axioms\n'StitchModel.Stitch.Effects.expiredConnectionCannotQualify' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Effects.failedVmCanRetry' does not depend on any axioms\n'StitchModel.Stitch.Effects.fewerThanTenCannotQualify' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Effects.foreignCandidateCannotFinish' does not depend on any axioms\n'StitchModel.Stitch.Effects.journalMayClaim' does not depend on any axioms\n'StitchModel.Stitch.Effects.journalMayFinish' does not depend on any axioms\n'StitchModel.Stitch.Effects.reconnectCannotReviveCapturedCallback' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Effects.staleTransportGenerationCannotCallback' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Effects.staleVmCannotResurrectReadiness' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Effects.staleVmGenerationCannotCallback' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Effects.transportCanSend' does not depend on any axioms\n'StitchModel.Stitch.Effects.transportChannelCallbackAllowed' does not depend on any axioms\n'StitchModel.Stitch.Effects.transportClose' does not depend on any axioms\n'StitchModel.Stitch.Effects.transportOpen' does not depend on any axioms\n'StitchModel.Stitch.Effects.transportPeerAllocationAllowed' does not depend on any axioms\n'StitchModel.Stitch.Effects.transportPeerCallbackAllowed' does not depend on any axioms\n'StitchModel.Stitch.Effects.transportSessionMatches' does not depend on any axioms\n'StitchModel.Stitch.Effects.transportSignalAllowed' does not depend on any axioms\n'StitchModel.Stitch.Effects.unknownCannotAuthorizeWrite' does not depend on any axioms\n'StitchModel.Stitch.Effects.unknownGatedReadNeverWrites' does not depend on any axioms\n'StitchModel.Stitch.Effects.unknownJournalCannotClaim' does not depend on any axioms\n'StitchModel.Stitch.Effects.unknownOffersReconciliation' does not depend on any axioms\n'StitchModel.Stitch.Effects.unknownReadNeverWrites' does not depend on any axioms\n'StitchModel.Stitch.Effects.unresolvedDnsReadCannotWrite' depends on axioms: [propext]\n'StitchModel.Stitch.Effects.vmCallbackAllowed' does not depend on any axioms\n'StitchModel.Stitch.Effects.vmCanBoot' does not depend on any axioms\n'StitchModel.Stitch.Effects.vmCanExecute' does not depend on any axioms\n'StitchModel.Stitch.Effects.vmFail' does not depend on any axioms\n'StitchModel.Stitch.Effects.vmFailAllowed' does not depend on any axioms\n'StitchModel.Stitch.Effects.vmGenerationFilter' does not depend on any axioms\n'StitchModel.Stitch.Effects.vmIsBooting' does not depend on any axioms\n'StitchModel.Stitch.Effects.vmObserveReady' does not depend on any axioms\n'StitchModel.Stitch.Effects.vmOldGenerationDifference' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Effects.vmPositiveGenerationFilterFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Effects.vmReadyCandidate' does not depend on any axioms\n'StitchModel.Stitch.Effects.vmStart' does not depend on any axioms\n","stdout_sha256":"7ced0557a27f50dd7ef495af771fef61daeb6445a502375389ff2b09e3bb0474","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Encoding.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Encoding","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Encoding.Dependency' does not depend on any axioms\n'StitchModel.Stitch.Encoding.DependencyKind' does not depend on any axioms\n'StitchModel.Stitch.Encoding.Encoding' does not depend on any axioms\n'StitchModel.Stitch.Encoding.RecoveryObservation' does not depend on any axioms\n'StitchModel.Stitch.Encoding.dependenciesReady' does not depend on any axioms\n'StitchModel.Stitch.Encoding.exactRecovery' does not depend on any axioms\n'StitchModel.Stitch.Encoding.externalBasisNotFree' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Encoding.rawDecode' does not depend on any axioms\n'StitchModel.Stitch.Encoding.rawRecoveryExact' does not depend on any axioms\n'StitchModel.Stitch.Encoding.selfContainedBytes' does not depend on any axioms\n'StitchModel.Stitch.Encoding.totalRecoveryBytes' does not depend on any axioms\n","stdout_sha256":"78b53f7e3cf7174490f655c792714845d5baee9f754f6bc7f6f4b08d12a006e0","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Evidence.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Evidence","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Evidence.ClaimKind' does not depend on any axioms\n'StitchModel.Stitch.Evidence.Evidence' does not depend on any axioms\n'StitchModel.Stitch.Evidence.EvidenceKind' does not depend on any axioms\n'StitchModel.Stitch.Evidence.HostAssumptions' does not depend on any axioms\n'StitchModel.Stitch.Evidence.HostEffect' does not depend on any axioms\n'StitchModel.Stitch.Evidence.Scope' does not depend on any axioms\n'StitchModel.Stitch.Evidence.cannotExtendEvidenceHorizon' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Evidence.claimCode' does not depend on any axioms\n'StitchModel.Stitch.Evidence.dependenciesUnchanged' does not depend on any axioms\n'StitchModel.Stitch.Evidence.dependencyKindCode' does not depend on any axioms\n'StitchModel.Stitch.Evidence.effectCode' does not depend on any axioms\n'StitchModel.Stitch.Evidence.effectMember' does not depend on any axioms\n'StitchModel.Stitch.Evidence.effectsCovered' does not depend on any axioms\n'StitchModel.Stitch.Evidence.expiredEvidenceCannotBeReused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Evidence.kindCode' does not depend on any axioms\n'StitchModel.Stitch.Evidence.positiveEvidenceKind' does not depend on any axioms\n'StitchModel.Stitch.Evidence.pureEffectAllowed' does not depend on any axioms\n'StitchModel.Stitch.Evidence.sameAssumptions' does not depend on any axioms\n'StitchModel.Stitch.Evidence.sameDependency' does not depend on any axioms\n'StitchModel.Stitch.Evidence.scopeReusable' does not depend on any axioms\n","stdout_sha256":"7b94a5775d8ae8c13a0ad00edb33d1fa04c7344f8256fbcab72b2975b116f3eb","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Fragments.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Fragments","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Fragments.Bit' does not depend on any axioms\n'StitchModel.Stitch.Fragments.BitBlocks' does not depend on any axioms\n'StitchModel.Stitch.Fragments.BitPair' does not depend on any axioms\n'StitchModel.Stitch.Fragments.Blocks' does not depend on any axioms\n'StitchModel.Stitch.Fragments.Fragment' does not depend on any axioms\n'StitchModel.Stitch.Fragments.PairSelection' does not depend on any axioms\n'StitchModel.Stitch.Fragments.decodePair' does not depend on any axioms\n'StitchModel.Stitch.Fragments.duplicateIndexCannotRecover' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Fragments.encodeForPair' does not depend on any axioms\n'StitchModel.Stitch.Fragments.encodePair' does not depend on any axioms\n'StitchModel.Stitch.Fragments.everyCompatiblePairRecoversFiniteBlocks' depends on axioms: [propext]\n'StitchModel.Stitch.Fragments.leftParity' does not depend on any axioms\n'StitchModel.Stitch.Fragments.leftParityBitExact' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Fragments.leftParityInvolutive' depends on axioms: [propext]\n'StitchModel.Stitch.Fragments.pairAllowed' does not depend on any axioms\n'StitchModel.Stitch.Fragments.recoverLeftParity' does not depend on any axioms\n'StitchModel.Stitch.Fragments.recoverRightParity' does not depend on any axioms\n'StitchModel.Stitch.Fragments.rightParity' does not depend on any axioms\n'StitchModel.Stitch.Fragments.rightParityBitExact' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Fragments.rightParityInvolutive' depends on axioms: [propext]\n'StitchModel.Stitch.Fragments.xorBit' does not depend on any axioms\n'StitchModel.Stitch.Fragments.xorCell' does not depend on any axioms\n","stdout_sha256":"39b8e41327c5f844239f262330a2d170d221603bf0142e73fd7e3b5fd64ebf97","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Identity.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Identity","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Identity.Digest' does not depend on any axioms\n'StitchModel.Stitch.Identity.DigestObservation' does not depend on any axioms\n'StitchModel.Stitch.Identity.Object' does not depend on any axioms\n'StitchModel.Stitch.Identity.digestAccepted' does not depend on any axioms\n'StitchModel.Stitch.Identity.digestWellFormed' does not depend on any axioms\n'StitchModel.Stitch.Identity.fullDigestReflexive' depends on axioms: [propext]\n'StitchModel.Stitch.Identity.sameDigest' does not depend on any axioms\n","stdout_sha256":"fe98638b6008f340c69c6153591a61d3ce966cd643c539d83e03c4e1568e33da","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Observation.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Observation","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Observation.PeerObservation' does not depend on any axioms\n'StitchModel.Stitch.Observation.Reachability' does not depend on any axioms\n'StitchModel.Stitch.Observation.acceptObservation' does not depend on any axioms\n'StitchModel.Stitch.Observation.acceptedObservationIsFresh' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Observation.expiredObservationRejected' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Observation.futureObservationRejected' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Observation.observationFresh' does not depend on any axioms\n'StitchModel.Stitch.Observation.reachableObservation' does not depend on any axioms\n'StitchModel.Stitch.Observation.updateObservation' does not depend on any axioms\n","stdout_sha256":"7fcaf19825c005110f5b1d141231b6b01becaedb07bb8849dc726e41aa47f79c","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Pointer.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Pointer","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Pointer.Authority' does not depend on any axioms\n'StitchModel.Stitch.Pointer.Pointer' does not depend on any axioms\n'StitchModel.Stitch.Pointer.acceptPointer' does not depend on any axioms\n'StitchModel.Stitch.Pointer.differentRetainedHeadRestoreRefused' depends on axioms: [propext]\n'StitchModel.Stitch.Pointer.expiredRestoreRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Pointer.restoreAllowed' does not depend on any axioms\n'StitchModel.Stitch.Pointer.restoreDifferentHeadGuard' does not depend on any axioms\n'StitchModel.Stitch.Pointer.rollbackRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Pointer.successorAllowed' does not depend on any axioms\n'StitchModel.Stitch.Pointer.successorStrictlyAdvances' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Pointer.unacceptedRestoreRefused' does not depend on any axioms\n'StitchModel.Stitch.Pointer.wrongAuthorityRefused' does not depend on any axioms\n","stdout_sha256":"b75348a1c47daad5129f4b20c8bc4d97ecee6348b30c2a901d133d10e7afe605","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.PrismId.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.PrismId","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.PrismId.actionAllowed' does not depend on any axioms\n'StitchModel.Stitch.PrismId.actionFresh' does not depend on any axioms\n'StitchModel.Stitch.PrismId.actionGate' does not depend on any axioms\n'StitchModel.Stitch.PrismId.approvalOfOtherActionRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.attestationBinds' does not depend on any axioms\n'StitchModel.Stitch.PrismId.attestationForOtherKeyRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.belowThresholdRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.PrismId.bindAllowed' does not depend on any axioms\n'StitchModel.Stitch.PrismId.boundaryKeyAdmitted' does not depend on any axioms\n'StitchModel.Stitch.PrismId.boundaryShared' does not depend on any axioms\n'StitchModel.Stitch.PrismId.boundaryVisibleTo' does not depend on any axioms\n'StitchModel.Stitch.PrismId.classicalSignatureAlwaysRequired' does not depend on any axioms\n'StitchModel.Stitch.PrismId.delegateCannotBind' does not depend on any axioms\n'StitchModel.Stitch.PrismId.delegateNeverReceivesPrivateBoundary' does not depend on any axioms\n'StitchModel.Stitch.PrismId.delegateOutsideScopeRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.deviceMaySign' does not depend on any axioms\n'StitchModel.Stitch.PrismId.expiredOfferRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.PrismId.foreignPrismBindRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.forgedApprovalRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.hardenedDeviceCannotShare' does not depend on any axioms\n'StitchModel.Stitch.PrismId.hostAdmitsDevice' does not depend on any axioms\n'StitchModel.Stitch.PrismId.hybridSignatureAccepted' does not depend on any axioms\n'StitchModel.Stitch.PrismId.hybridWrapRequired' does not depend on any axioms\n'StitchModel.Stitch.PrismId.invalidBindSignatureRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.linkGate' does not depend on any axioms\n'StitchModel.Stitch.PrismId.linkOfferAccepted' does not depend on any axioms\n'StitchModel.Stitch.PrismId.mayAdminister' does not depend on any axioms\n'StitchModel.Stitch.PrismId.mayShareBoundary' does not depend on any axioms\n'StitchModel.Stitch.PrismId.memberCannotReplaceRecovery' does not depend on any axioms\n'StitchModel.Stitch.PrismId.memberCannotRevokeRecovery' does not depend on any axioms\n'StitchModel.Stitch.PrismId.nonMemberSeesOnlyPublished' does not depend on any axioms\n'StitchModel.Stitch.PrismId.postQuantumDowngradeRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.postQuantumSignatureStripRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.presenceSatisfied' does not depend on any axioms\n'StitchModel.Stitch.PrismId.receivesPrivateBoundary' does not depend on any axioms\n'StitchModel.Stitch.PrismId.recoveryBindAllowed' does not depend on any axioms\n'StitchModel.Stitch.PrismId.replayedActionRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.revocationCounts' does not depend on any axioms\n'StitchModel.Stitch.PrismId.revokedByRecoveryCannotRevoke' does not depend on any axioms\n'StitchModel.Stitch.PrismId.revokedDeviceActionRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.revokedDeviceCannotSign' does not depend on any axioms\n'StitchModel.Stitch.PrismId.scopeAdmits' does not depend on any axioms\n'StitchModel.Stitch.PrismId.singleIdentityBoundaryPrivate' does not depend on any axioms\n'StitchModel.Stitch.PrismId.staleActionRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.PrismId.staleBoundaryKeyRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.PrismId.thresholdMet' does not depend on any axioms\n'StitchModel.Stitch.PrismId.twoIdentitiesMakeBoundaryShared' depends on axioms: [propext]\n'StitchModel.Stitch.PrismId.unattestedDeviceRefusedWhenRequired' does not depend on any axioms\n'StitchModel.Stitch.PrismId.unconfirmedLinkRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.unlinkedDeviceCannotSign' does not depend on any axioms\n'StitchModel.Stitch.PrismId.unlinkedSignerCannotBind' does not depend on any axioms\n'StitchModel.Stitch.PrismId.unverifiedApprovalRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.usedOfferRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.wrongAudienceActionRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.wrongSecretRefused' does not depend on any axioms\n'StitchModel.Stitch.PrismId.zeroThresholdRefused' does not depend on any axioms\n","stdout_sha256":"4251e174d58739ec9d0910e3c886bb1ee4707dc0f6bafc658fb46b5b86544928","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Recovery.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Recovery","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Recovery.Limits' does not depend on any axioms\n'StitchModel.Stitch.Recovery.State' does not depend on any axioms\n'StitchModel.Stitch.Recovery.acceptedCandidateWithinBounds' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.Recovery.admitted' does not depend on any axioms\n'StitchModel.Stitch.Recovery.anchorAllowed' does not depend on any axioms\n'StitchModel.Stitch.Recovery.commit' does not depend on any axioms\n'StitchModel.Stitch.Recovery.progressAllowed' does not depend on any axioms\n'StitchModel.Stitch.Recovery.rollbackProgressRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Recovery.staleGenerationRefused' depends on axioms: [propext, Quot.sound]\n'StitchModel.Stitch.Recovery.unverifiedImportPreservesState' does not depend on any axioms\n","stdout_sha256":"b399659c8c7fcbb309ca911acdf55473e07d926a514d85f8100322a82bb2bac5","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Relay.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Relay","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Relay.Assembly' does not depend on any axioms\n'StitchModel.Stitch.Relay.Capacity' does not depend on any axioms\n'StitchModel.Stitch.Relay.Frame' does not depend on any axioms\n'StitchModel.Stitch.Relay.Identity' does not depend on any axioms\n'StitchModel.Stitch.Relay.Limits' does not depend on any axioms\n'StitchModel.Stitch.Relay.admissionAllowed' does not depend on any axioms\n'StitchModel.Stitch.Relay.admitCapacity' does not depend on any axioms\n'StitchModel.Stitch.Relay.append' does not depend on any axioms\n'StitchModel.Stitch.Relay.appendAllowed' does not depend on any axioms\n'StitchModel.Stitch.Relay.assemblyCurrent' does not depend on any axioms\n'StitchModel.Stitch.Relay.beginVerification' does not depend on any axioms\n'StitchModel.Stitch.Relay.closedSessionCannotPublish' does not depend on any axioms\n'StitchModel.Stitch.Relay.deliveryAllowed' does not depend on any axioms\n'StitchModel.Stitch.Relay.duplicateDoesNotAdvanceAssembly' does not depend on any axioms\n'StitchModel.Stitch.Relay.effectAllowed' does not depend on any axioms\n'StitchModel.Stitch.Relay.effectFalseGuard' does not depend on any axioms\n'StitchModel.Stitch.Relay.frameAllowed' does not depend on any axioms\n'StitchModel.Stitch.Relay.limits' does not depend on any axioms\n'StitchModel.Stitch.Relay.ready' does not depend on any axioms\n'StitchModel.Stitch.Relay.release' does not depend on any axioms\n'StitchModel.Stitch.Relay.sameIdentity' does not depend on any axioms\n'StitchModel.Stitch.Relay.signalLifetime' does not depend on any axioms\n'StitchModel.Stitch.Relay.unverifiedMessageCannotDeliver' does not depend on any axioms\n'StitchModel.Stitch.Relay.warmLifetime' does not depend on any axioms\n'StitchModel.Stitch.Relay.withdrawnConsentCannotPublish' depends on axioms: [propext]\n","stdout_sha256":"110952dbd1a70d2be18b0c847664d6a4283940148d9c95982b2ffa2f2190b6eb","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Signaling.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.Signaling","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.Signaling.admissionAllowed' does not depend on any axioms\n'StitchModel.Stitch.Signaling.unverifiedCannotAdmit' does not depend on any axioms\n","stdout_sha256":"adb0a3dbb25ab4b88e6836564ce119804614e2ebdb5a2ad76fba0af1a1ddf5b7","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.System.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.System","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.System.Action' does not depend on any axioms\n'StitchModel.Stitch.System.ActionKind' does not depend on any axioms\n'StitchModel.Stitch.System.State' does not depend on any axioms\n'StitchModel.Stitch.System.admitAction' does not depend on any axioms\n'StitchModel.Stitch.System.applyMigration' does not depend on any axioms\n'StitchModel.Stitch.System.choosePlacement' does not depend on any axioms\n'StitchModel.Stitch.System.clockAdvanceFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.System.clockViewGrouping' does not depend on any axioms\n'StitchModel.Stitch.System.completeMigrationAllowed' does not depend on any axioms\n'StitchModel.Stitch.System.completionBudget' does not depend on any axioms\n'StitchModel.Stitch.System.completionClock' does not depend on any axioms\n'StitchModel.Stitch.System.completionHistory' does not depend on any axioms\n'StitchModel.Stitch.System.completionLedger' does not depend on any axioms\n'StitchModel.Stitch.System.completionLedgerValidityFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.System.completionSafetyGuard' does not depend on any axioms\n'StitchModel.Stitch.System.completionSelectionReserved' does not depend on any axioms\n'StitchModel.Stitch.System.completionTime' does not depend on any axioms\n'StitchModel.Stitch.System.guardedProductPreservationFact' does not depend on any axioms\n'StitchModel.Stitch.System.historyPreservedFact' does not depend on any axioms\n'StitchModel.Stitch.System.ledgerClockView' depends on axioms: [propext]\n'StitchModel.Stitch.System.ledgerHistory' does not depend on any axioms\n'StitchModel.Stitch.System.ledgerPlacementValid' does not depend on any axioms\n'StitchModel.Stitch.System.ledgerPlacementValiditySelect' does not depend on any axioms\n'StitchModel.Stitch.System.ledgerTime' does not depend on any axioms\n'StitchModel.Stitch.System.migrationCandidateValidity' does not depend on any axioms\n'StitchModel.Stitch.System.migrationCandidateValidityFact' depends on axioms: [propext, Classical.choice, Quot.sound]\n'StitchModel.Stitch.System.migrationCompletionDoesNotRefundBudget' does not depend on any axioms\n'StitchModel.Stitch.System.migrationPreservesProductInvariant' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.System.migrationPreservesProductInvariantFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.System.migrationRequestDoesNotEstablishCustody' does not depend on any axioms\n'StitchModel.Stitch.System.migrationRequestPreservesProductInvariant' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.System.migrationRequestPreservesProductInvariantFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.System.productValiditySelect' does not depend on any axioms\n'StitchModel.Stitch.System.requestAction' does not depend on any axioms\n'StitchModel.Stitch.System.requestAdmissionProductFact' does not depend on any axioms\n'StitchModel.Stitch.System.requestDoesNotChangeObjectCustody' does not depend on any axioms\n'StitchModel.Stitch.System.requestDoesNotCreateEvidence' does not depend on any axioms\n'StitchModel.Stitch.System.requestMigration' does not depend on any axioms\n'StitchModel.Stitch.System.requestMigrationAllowed' does not depend on any axioms\n'StitchModel.Stitch.System.requestMigrationCandidateValidityFact' depends on axioms: [propext,\n Classical.choice,\n Quot.sound]\n'StitchModel.Stitch.System.reservationActive' does not depend on any axioms\n'StitchModel.Stitch.System.reservationClock' does not depend on any axioms\n'StitchModel.Stitch.System.settleAction' does not depend on any axioms\n'StitchModel.Stitch.System.settleActionAllowed' does not depend on any axioms\n'StitchModel.Stitch.System.settlementDoesNotEstablishCustody' does not depend on any axioms\n'StitchModel.Stitch.System.valid' does not depend on any axioms\n'StitchModel.Stitch.System.validAt' does not depend on any axioms\n'StitchModel.Stitch.System.weakenAdmissionFact' does not depend on any axioms\n","stdout_sha256":"a30ba99cd1c07140cc78be37d487c0ddbb506643e8659a2b28c6ad119c9d24e0","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.VmAdministration.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.Stitch.VmAdministration","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.Stitch.VmAdministration.administrationAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.allocationAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.commandAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.ethernetAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.filesystemAllocationLimit' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.filesystemFileLimit' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.filesystemMetadataLimit' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.forgetAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.metadataAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.networkChangeAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.networkSharingAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.observationAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.outputLimit' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.resultReadAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.retainedInstanceCannotReconfigure' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.retainedOutputLimit' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.runtimeLimitMs' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.shareAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.staticAddressAllowed' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.terminationRequired' does not depend on any axioms\n'StitchModel.Stitch.VmAdministration.unconfiguredCannotShareEthernet' does not depend on any axioms\n","stdout_sha256":"652029325c63f565314f71e432899950374685d7cd3d88d4a5540d533dd2d46e","tool":"lean"},{"argv":["env","lean","$STAGING/audit/LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.StitchApp.lean"],"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","exit_code":0,"module":"LexLeanAudit.Af8e732898667afd4927eb16ffab20fe2.StitchModel.StitchApp","stderr":"\n","stderr_sha256":"01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b","stdout":"'StitchModel.StitchApp.application' does not depend on any axioms\n'StitchModel.StitchApp.budgetProbe' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.byteNat' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.custodyProbe' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.decimalBytes' does not depend on any axioms\n'StitchModel.StitchApp.decimalDigit' does not depend on any axioms\n'StitchModel.StitchApp.dispatch' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.flag' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.flagsCanonical' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.pairProbe' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.pointerProbe' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.ringProbe' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.unsignedBE' depends on axioms: [propext, Quot.sound]\n'StitchModel.StitchApp.verdict' does not depend on any axioms\n","stdout_sha256":"86e7905b31c13b952e4afc9cbc79ad9c2b12e60a0cc6dec3a37537a0404f53a8","tool":"lean"}],"semantic_id":"f8e732898667afd4927eb16ffab20fe2ab3ac738cccb1919e091edc67a96cf14","source_id":"0f4aa6cb23123d72e6e030ffebd0d2d36da20879ed887d416fd49f6e9b607e93","spec":"lexlean/attestation/2","status":"verified","toolchain":{"lake":{"executable_sha256":"60330ab6f07dce20f3fa9ebb08e8b984ea9549eac172afeb15d9d2227060e2b3","version_output":"Lake version 5.0.0-src+f054605 (Lean version 4.32.1)"},"lean":{"executable_sha256":"e8baaa71855a616dc351028f3ad2200051b0671f423a1696a100e809302d5550","version_output":"Lean (version 4.32.1, x86_64-unknown-linux-gnu, commit f054605aea4b840552cca2e725580bffd1e1b704, Release)"},"leanchecker":{"executable_sha256":"c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f","version_output":"leanchecker bin/leanchecker sha256:c7c51e296d28dd443ed60f9414feef41253ede89dea76dbb2adde29768c3ed5f\nuncaught exception: Could not find any oleans for: LexLeanIdentityProbe\n"}}} diff --git a/product/source-build-manifest.json b/product/source-build-manifest.json new file mode 100644 index 0000000..fd7be0c --- /dev/null +++ b/product/source-build-manifest.json @@ -0,0 +1 @@ +{"build_id":"bdcf8bfe587b8188d03aee9d87e79bec09b42818d548f80fbf124ac7f3f83046","compiler":{"semantics_id":"5262e5b4c8b5668ae7066ad686757a6bb7f80c941d515fb9d586894fbc7de69a","version":"0.3.0"},"inputs":[{"byte_length":2684,"kind":"lexicon","path":"embedded","sha256":"3bc0fb09d706ffa7d5a1363302ea87c049acc7c7dcafde63c62682620c11be9b"},{"byte_length":14885,"kind":"lexicon","path":"embedded","sha256":"e0db021e01b91d651c43921d66f6b0023c8efbf17cac2ec53192ce5305e4e1ac"},{"byte_length":36197,"kind":"lexicon","path":"embedded","sha256":"827317cae68c162f3a96c8a8de4e53ab348e7d3724fd2b834fa85ecde1a1b392"},{"byte_length":7146,"kind":"lexicon","path":"language/prism.arch","sha256":"a5b1aa879a00c8f86100410c1ec1af4e2e983838f30e6dc82b3e989b0df65e2c"},{"byte_length":1577,"kind":"lexicon","path":"language/prism.qual","sha256":"88748e3b24fa79693aed461bbce0fa626ec83356cd7ef980adaa22722a907602"},{"byte_length":2814,"kind":"lexicon","path":"language/prism.sec","sha256":"55bd2bc254d4170f6e76adc558955f1d1a31aa8a22ac88a3e3d6fe9307f76466"},{"byte_length":6813,"kind":"lexicon","path":"language/stitch.domain","sha256":"6dde6933233ce88c4aa0aa768bde3b50b3733345b183efca9aaa9d3a1244667e"},{"byte_length":3063,"kind":"lock","path":"lexlean.lock","sha256":"49b1b7b79ca4f74e69f8bfb775e4a12de98c6bb13364288a61e413a6289fd21c"},{"byte_length":1707,"kind":"project-config","path":"lexlean.toml","sha256":"db033709d967898d0bf4430ea2e9283f174a8532342e4e8e8d356ba2b5a9404f"},{"byte_length":6164,"kind":"source","path":"src/Foundation/Arch.lex.tex","sha256":"efb3f79f7f956463305800e76b5bfa197d0dc885ae5aca7d40436223cff3eda9"},{"byte_length":1494,"kind":"source","path":"src/Foundation/Bytes.lex.tex","sha256":"ce16e5b439128db3231979381f4599d3ff0617f62c2bf00c348bba35393abcd6"},{"byte_length":3880,"kind":"source","path":"src/Foundation/Experience/V1/Model.lex.tex","sha256":"fc7d2edf2c123de2232ed8166db425721696219e7454a36113eb41867e99b813"},{"byte_length":837,"kind":"source","path":"src/Foundation/Qual.lex.tex","sha256":"f1dbfafde6cb4d7262b12371699be38a9683fa7525a9519eb856d74f01b3ee81"},{"byte_length":1517,"kind":"source","path":"src/Foundation/Sec.lex.tex","sha256":"a58632af4038e6e046aae1848f4c64d89fc497cfbbdb53be2a576358a1f977aa"},{"byte_length":1739,"kind":"source","path":"src/Foundation/View/Text/V1/Model.lex.tex","sha256":"db124343ad8fe1295bc8eb305c7f59f83cf6ad76d46a5cabea500fe66f3ad5dc"},{"byte_length":19316,"kind":"source","path":"src/Product/Architecture.lex.tex","sha256":"198c55dae057fff7e5530027fd2449f86260cc58056ba4fc00c7b99734ececdc"},{"byte_length":7253,"kind":"source","path":"src/Product/Brand.lex.tex","sha256":"a06984fa4753d236c8b874a70bf0aca1bc064ad8944a5ce27ac84f1135559578"},{"byte_length":10514,"kind":"source","path":"src/Product/Compliance.lex.tex","sha256":"ee1cf13e35d64e467075ef7bff835dca1d7d5370bde59e19f82a2daf487f40e6"},{"byte_length":33416,"kind":"source","path":"src/Product/Design.lex.tex","sha256":"38da1916ac695cda70170df7d99734e59386e6626d67e08a7c2d795ac95b34cc"},{"byte_length":44528,"kind":"source","path":"src/Product/Experience.lex.tex","sha256":"6f2625fdce3d3d51899cabc17ce3d57ec0a9381dd3bf3e6477da6ae3ccfb84bd"},{"byte_length":48768,"kind":"source","path":"src/Product/Features.lex.tex","sha256":"d5b7bdf070d493f617f8ce48de3757ff6bcddc17e8c115ea52c0dc44197e5726"},{"byte_length":11971,"kind":"source","path":"src/Product/Host.lex.tex","sha256":"3bb2a621868dc683e776c9b65c58cc60cc2b89e5d007d54c4c152bedd4878871"},{"byte_length":56017,"kind":"source","path":"src/Product/Model.lex.tex","sha256":"3017e652d02156eca68bc00cbb3cdfb54cebcfe290a3b9463493d9326da399f8"},{"byte_length":10727,"kind":"source","path":"src/Product/Persistence.lex.tex","sha256":"0f651a6022c345e155563c42137dc0541b3cf9e8c7953caccaa73c9a0a3755cd"},{"byte_length":15794,"kind":"source","path":"src/Product/Quality.lex.tex","sha256":"568af2bafa27a50917dfffac0de44c9b83f05069c2ef8f961ff70071d0f07785"},{"byte_length":12435,"kind":"source","path":"src/Product/Release.lex.tex","sha256":"7aaaf03ef70e259f7af42eb52e87f6828d0ae5ba249e94b59d510db45f4a92e9"},{"byte_length":96873,"kind":"source","path":"src/Product/Security.lex.tex","sha256":"4eb9b799086128e191af7c5dbe44da2d4ffd95938e61591cc43fb47a95dfc0fc"},{"byte_length":22420,"kind":"source","path":"src/Product/Users.lex.tex","sha256":"7baf71e758f17479e3a1459b7892fa4bcaacc07887f426f86ce05167c169c1d6"},{"byte_length":2376,"kind":"source","path":"src/Production/ThreatModel.lex.tex","sha256":"649bd4a4531915fd1dc9449a37f4022380d79261907378e136257df50ac4c1bc"},{"byte_length":6036,"kind":"source","path":"src/Stitch/Authority.lex.tex","sha256":"10afc7af1503f08fe7806dbab24d93f565f34370e3b7d18135f48297e64ee573"},{"byte_length":70247,"kind":"source","path":"src/Stitch/Budget.lex.tex","sha256":"581ae188297e3e03e69869a3cfbcdae9554706e007cbeb238d97c8ad30229911"},{"byte_length":1357,"kind":"source","path":"src/Stitch/ChannelFlow.lex.tex","sha256":"7f4356ddd38fc94b32a2d6af237ce7382c34bdc7db43c8e8d6ab94cd94fc3e63"},{"byte_length":36095,"kind":"source","path":"src/Stitch/Compute.lex.tex","sha256":"ef0f1b8dcf15a8ff26a206b7bd8fa51736bb54ae14e7b6e71a4296deeb4528b7"},{"byte_length":47114,"kind":"source","path":"src/Stitch/Custody.lex.tex","sha256":"e9084ba97058adfd3017e634215af1dee12d89c4ff0d409a4271f05387d8d663"},{"byte_length":23294,"kind":"source","path":"src/Stitch/Effects.lex.tex","sha256":"7ccc2c30cca7df663541ceece0c85226f921160f56f4ec681703a8d5b589263b"},{"byte_length":3347,"kind":"source","path":"src/Stitch/Encoding.lex.tex","sha256":"75b412ab0ed56dea3aa41cc77705fb6233991ea1c2e600a7cf509c3b84e5a95f"},{"byte_length":10541,"kind":"source","path":"src/Stitch/Evidence.lex.tex","sha256":"39011e1cf70295427f716d328b1ab754242d3667f0e70a8a48dffa735465c79e"},{"byte_length":8988,"kind":"source","path":"src/Stitch/Fragments.lex.tex","sha256":"5cd8d0602cbe501ae4ffc5c18dde17fc6e5766d930ac1d9277545d1ef8d88b83"},{"byte_length":2491,"kind":"source","path":"src/Stitch/Identity.lex.tex","sha256":"c4c159234e1623b8f339e86cf47da55c89d197bf21fe334bd893f575ba053870"},{"byte_length":3301,"kind":"source","path":"src/Stitch/Observation.lex.tex","sha256":"fe3205a68576d8c7d82f86b45b78f8b6c8b49a873f00c448cccb2eb459749ae8"},{"byte_length":5712,"kind":"source","path":"src/Stitch/Pointer.lex.tex","sha256":"10239748c402cdadfc36b150a7a103dfe5124d81fa27bb276575810470c89c46"},{"byte_length":12003,"kind":"source","path":"src/Stitch/PrismId.lex.tex","sha256":"1d3d73a831097b3cc6897b94e191d38b52902496b18951e2c188055e0897f935"},{"byte_length":3632,"kind":"source","path":"src/Stitch/Recovery.lex.tex","sha256":"4a29e91526ffd1c5aa9fcfc8d990ca1b89d5129813742d9ae55e688eeb6a9121"},{"byte_length":9250,"kind":"source","path":"src/Stitch/Relay.lex.tex","sha256":"26a3b5c7f8af3cb058800716a5b73111adbe0188436ae1ad87e1a0e6ce118a03"},{"byte_length":880,"kind":"source","path":"src/Stitch/Signaling.lex.tex","sha256":"97bdfb5160e41a4ed3ab30788f2e3a558836f622c237e4bd3496536212b330c9"},{"byte_length":23022,"kind":"source","path":"src/Stitch/System.lex.tex","sha256":"b05a639514a2c56f40b8e960c6cf31023aec8b20d1c18c5ed68a0a936a9d7119"},{"byte_length":3568,"kind":"source","path":"src/Stitch/VmAdministration.lex.tex","sha256":"4c27a3a3d1b3650aa78d8fe22b6f07a7335d7e9ec58969ad50f7ad9294f30f81"},{"byte_length":11886,"kind":"source","path":"src/StitchApp.lex.tex","sha256":"ffd8a4b6b9072b27b06d67d61e1c11d085a6b82e84be4610f27f3805d87f675b"}],"language":"1.2","lean_toolchain":"leanprover/lean4:v4.32.1","modules":[{"lean_module":"StitchModel.Foundation.Arch","module":"Foundation.Arch","source_path":"src/Foundation/Arch.lex.tex"},{"lean_module":"StitchModel.Foundation.Bytes","module":"Foundation.Bytes","source_path":"src/Foundation/Bytes.lex.tex"},{"lean_module":"StitchModel.Foundation.Experience.V1.Model","module":"Foundation.Experience.V1.Model","source_path":"src/Foundation/Experience/V1/Model.lex.tex"},{"lean_module":"StitchModel.Foundation.Qual","module":"Foundation.Qual","source_path":"src/Foundation/Qual.lex.tex"},{"lean_module":"StitchModel.Foundation.Sec","module":"Foundation.Sec","source_path":"src/Foundation/Sec.lex.tex"},{"lean_module":"StitchModel.Foundation.View.Text.V1.Model","module":"Foundation.View.Text.V1.Model","source_path":"src/Foundation/View/Text/V1/Model.lex.tex"},{"lean_module":"StitchModel.Product.Architecture","module":"Product.Architecture","source_path":"src/Product/Architecture.lex.tex"},{"lean_module":"StitchModel.Product.Brand","module":"Product.Brand","source_path":"src/Product/Brand.lex.tex"},{"lean_module":"StitchModel.Product.Compliance","module":"Product.Compliance","source_path":"src/Product/Compliance.lex.tex"},{"lean_module":"StitchModel.Product.Design","module":"Product.Design","source_path":"src/Product/Design.lex.tex"},{"lean_module":"StitchModel.Product.Experience","module":"Product.Experience","source_path":"src/Product/Experience.lex.tex"},{"lean_module":"StitchModel.Product.Features","module":"Product.Features","source_path":"src/Product/Features.lex.tex"},{"lean_module":"StitchModel.Product.Host","module":"Product.Host","source_path":"src/Product/Host.lex.tex"},{"lean_module":"StitchModel.Product.Model","module":"Product.Model","source_path":"src/Product/Model.lex.tex"},{"lean_module":"StitchModel.Product.Persistence","module":"Product.Persistence","source_path":"src/Product/Persistence.lex.tex"},{"lean_module":"StitchModel.Product.Quality","module":"Product.Quality","source_path":"src/Product/Quality.lex.tex"},{"lean_module":"StitchModel.Product.Release","module":"Product.Release","source_path":"src/Product/Release.lex.tex"},{"lean_module":"StitchModel.Product.Security","module":"Product.Security","source_path":"src/Product/Security.lex.tex"},{"lean_module":"StitchModel.Product.Users","module":"Product.Users","source_path":"src/Product/Users.lex.tex"},{"lean_module":"StitchModel.Production.ThreatModel","module":"Production.ThreatModel","source_path":"src/Production/ThreatModel.lex.tex"},{"lean_module":"StitchModel.Stitch.Authority","module":"Stitch.Authority","source_path":"src/Stitch/Authority.lex.tex"},{"lean_module":"StitchModel.Stitch.Budget","module":"Stitch.Budget","source_path":"src/Stitch/Budget.lex.tex"},{"lean_module":"StitchModel.Stitch.ChannelFlow","module":"Stitch.ChannelFlow","source_path":"src/Stitch/ChannelFlow.lex.tex"},{"lean_module":"StitchModel.Stitch.Compute","module":"Stitch.Compute","source_path":"src/Stitch/Compute.lex.tex"},{"lean_module":"StitchModel.Stitch.Custody","module":"Stitch.Custody","source_path":"src/Stitch/Custody.lex.tex"},{"lean_module":"StitchModel.Stitch.Effects","module":"Stitch.Effects","source_path":"src/Stitch/Effects.lex.tex"},{"lean_module":"StitchModel.Stitch.Encoding","module":"Stitch.Encoding","source_path":"src/Stitch/Encoding.lex.tex"},{"lean_module":"StitchModel.Stitch.Evidence","module":"Stitch.Evidence","source_path":"src/Stitch/Evidence.lex.tex"},{"lean_module":"StitchModel.Stitch.Fragments","module":"Stitch.Fragments","source_path":"src/Stitch/Fragments.lex.tex"},{"lean_module":"StitchModel.Stitch.Identity","module":"Stitch.Identity","source_path":"src/Stitch/Identity.lex.tex"},{"lean_module":"StitchModel.Stitch.Observation","module":"Stitch.Observation","source_path":"src/Stitch/Observation.lex.tex"},{"lean_module":"StitchModel.Stitch.Pointer","module":"Stitch.Pointer","source_path":"src/Stitch/Pointer.lex.tex"},{"lean_module":"StitchModel.Stitch.PrismId","module":"Stitch.PrismId","source_path":"src/Stitch/PrismId.lex.tex"},{"lean_module":"StitchModel.Stitch.Recovery","module":"Stitch.Recovery","source_path":"src/Stitch/Recovery.lex.tex"},{"lean_module":"StitchModel.Stitch.Relay","module":"Stitch.Relay","source_path":"src/Stitch/Relay.lex.tex"},{"lean_module":"StitchModel.Stitch.Signaling","module":"Stitch.Signaling","source_path":"src/Stitch/Signaling.lex.tex"},{"lean_module":"StitchModel.Stitch.System","module":"Stitch.System","source_path":"src/Stitch/System.lex.tex"},{"lean_module":"StitchModel.Stitch.VmAdministration","module":"Stitch.VmAdministration","source_path":"src/Stitch/VmAdministration.lex.tex"},{"lean_module":"StitchModel.StitchApp","module":"StitchApp","source_path":"src/StitchApp.lex.tex"}],"outputs":[{"byte_length":17107,"kind":"coverage","path":"coverage/StitchModel/Foundation/Arch.coverage.json","sha256":"d622cf62ff7b7075d26d1103ab111bf246a4bbe1927f0cf2cd7310d817f2bd2e"},{"byte_length":13478,"kind":"coverage","path":"coverage/StitchModel/Foundation/Bytes.coverage.json","sha256":"46ff4dce511790c7f04eea93f2b0b8895832aaf6f7068721ab6304fa924b7e57"},{"byte_length":16093,"kind":"coverage","path":"coverage/StitchModel/Foundation/Experience/V1/Model.coverage.json","sha256":"08470147cc94569a3031b37106e15469c35d33e07fd4fda38da2f79101a756af"},{"byte_length":10367,"kind":"coverage","path":"coverage/StitchModel/Foundation/Qual.coverage.json","sha256":"841089434011942ebaad03ac3040d8fec1578068dc91da5d3cfb175607e31d9d"},{"byte_length":11396,"kind":"coverage","path":"coverage/StitchModel/Foundation/Sec.coverage.json","sha256":"3e588618287280abbe52ef3412cd6acd391e02a91ab295375cf774aa60ecf549"},{"byte_length":14472,"kind":"coverage","path":"coverage/StitchModel/Foundation/View/Text/V1/Model.coverage.json","sha256":"3d5deaf65fdc1d3d7ddf172567e440f9b25c1788dd5a3bd1740223e10e12d0c8"},{"byte_length":31351,"kind":"coverage","path":"coverage/StitchModel/Product/Architecture.coverage.json","sha256":"c7a2947e13e79dfa9e06daaa42c3103cebc587b41d3270bb84398afdbf37a5ae"},{"byte_length":15013,"kind":"coverage","path":"coverage/StitchModel/Product/Brand.coverage.json","sha256":"4eae67b34653805c54206039c40f61a3cd0aeeaa2fa8af13062b18b9b4ecaa4a"},{"byte_length":16080,"kind":"coverage","path":"coverage/StitchModel/Product/Compliance.coverage.json","sha256":"cd09101c2c7f3c1033d96db95b2dcb5ba02dc225063d6e289ca6d135879fafd7"},{"byte_length":45256,"kind":"coverage","path":"coverage/StitchModel/Product/Design.coverage.json","sha256":"129ef55154af96c0c9b2fdeb5b7cf039ad1bb583e1f9b87ed490b4bf764cde11"},{"byte_length":45802,"kind":"coverage","path":"coverage/StitchModel/Product/Experience.coverage.json","sha256":"cc643b0ccd8f8c7993ecc23def29b4936603d61a30b6937f493cb79150bd3854"},{"byte_length":53672,"kind":"coverage","path":"coverage/StitchModel/Product/Features.coverage.json","sha256":"55874ceefd2b8750662c64b738c964933cbf7d4424e2c6765a1ff7303a7bd416"},{"byte_length":20558,"kind":"coverage","path":"coverage/StitchModel/Product/Host.coverage.json","sha256":"7998010e27f9fe0782dab81a1a3c01048d46e29a750bf9f70d322cb8e885a63f"},{"byte_length":44072,"kind":"coverage","path":"coverage/StitchModel/Product/Model.coverage.json","sha256":"c8b722344f914e3679d99d346bd2bafc92ceda9dd050fe164d83a1d39b8758e7"},{"byte_length":17421,"kind":"coverage","path":"coverage/StitchModel/Product/Persistence.coverage.json","sha256":"4e35682911d8483bbdc4d3945d2585228e3a0de5acaae6bf6f75a2ab110a0518"},{"byte_length":27180,"kind":"coverage","path":"coverage/StitchModel/Product/Quality.coverage.json","sha256":"6112c906bdbe7083fee924064e8bf17ee855234531c6febdeaa80a809906c6f3"},{"byte_length":23703,"kind":"coverage","path":"coverage/StitchModel/Product/Release.coverage.json","sha256":"a3f5d139664cbd199ab5ab73933f7074f92d99e014b6fd6f34a3a5fbc6409cbc"},{"byte_length":85915,"kind":"coverage","path":"coverage/StitchModel/Product/Security.coverage.json","sha256":"b69312c435f1a6e0d85aeae6bc124f39bf1a7d0adab002daf22cf32a26258c96"},{"byte_length":20119,"kind":"coverage","path":"coverage/StitchModel/Product/Users.coverage.json","sha256":"7936318d88b7097cfa2dabacfe4f08c179a7b4a8c241dcce03039d9260a6eb09"},{"byte_length":13408,"kind":"coverage","path":"coverage/StitchModel/Production/ThreatModel.coverage.json","sha256":"78256b24147390682a1d16f53ad6431c0eb95d151045c4534301830286b7e2b6"},{"byte_length":17241,"kind":"coverage","path":"coverage/StitchModel/Stitch/Authority.coverage.json","sha256":"f8f2c6e0960ada72d02d7af22d4199fda45a46818d8496238804fcb5463dc396"},{"byte_length":54946,"kind":"coverage","path":"coverage/StitchModel/Stitch/Budget.coverage.json","sha256":"3f0a00f31dcaa23685159a0ce8b34eede8de3166f9d9e523bacf63ab7aebf210"},{"byte_length":12810,"kind":"coverage","path":"coverage/StitchModel/Stitch/ChannelFlow.coverage.json","sha256":"257d423c217317eafc692711c63b201eec60ebdbed359dbfc57ed98c1fe041a2"},{"byte_length":35858,"kind":"coverage","path":"coverage/StitchModel/Stitch/Compute.coverage.json","sha256":"fc96551ff01984aed5ff1168612b6660eb1d30d0d307a95e798746442ccbde5d"},{"byte_length":39280,"kind":"coverage","path":"coverage/StitchModel/Stitch/Custody.coverage.json","sha256":"48a215abca8ea81ad394f040182ed1539cb27de27cd062bceb6c094679c821a9"},{"byte_length":30210,"kind":"coverage","path":"coverage/StitchModel/Stitch/Effects.coverage.json","sha256":"1b63e20e0de372f5b9218cfbb94a726a19ca63e6d832b79da172d3146aa2716a"},{"byte_length":15192,"kind":"coverage","path":"coverage/StitchModel/Stitch/Encoding.coverage.json","sha256":"4f5b4b699453b707185b5a9e4962371b81480dd7690652ceaa6960606cd8bb16"},{"byte_length":18625,"kind":"coverage","path":"coverage/StitchModel/Stitch/Evidence.coverage.json","sha256":"0457c5f0364861015d416678bb9fef52b8302d9d15d2f9ebe5ebab7108bc3ff1"},{"byte_length":19226,"kind":"coverage","path":"coverage/StitchModel/Stitch/Fragments.coverage.json","sha256":"3d51768c36f5c14e4aeb2cdcd43d8fcc636d8bec49d028278d6de5b3754a591d"},{"byte_length":13139,"kind":"coverage","path":"coverage/StitchModel/Stitch/Identity.coverage.json","sha256":"004b8315b1c6c0356c15d15ace190aa45715031f191ee412955ab16aebe796a1"},{"byte_length":13887,"kind":"coverage","path":"coverage/StitchModel/Stitch/Observation.coverage.json","sha256":"9df570390c4a82964b6345b60318b85394113e993d5d85b878d5b20afb6e3f25"},{"byte_length":15395,"kind":"coverage","path":"coverage/StitchModel/Stitch/Pointer.coverage.json","sha256":"128d38fca219ffbd64f48814178256162c8e40f0b4ffdb2d53d995b4fe48d187"},{"byte_length":26362,"kind":"coverage","path":"coverage/StitchModel/Stitch/PrismId.coverage.json","sha256":"cffbec33d8e6b20fa37525a5281ccbbca3fdff577c27eb1d670a9ed9d023fd93"},{"byte_length":13951,"kind":"coverage","path":"coverage/StitchModel/Stitch/Recovery.coverage.json","sha256":"c05c00ac095f79020a777c4e3f32dc04252b74725a7933931a0a5fa3efc66b81"},{"byte_length":17787,"kind":"coverage","path":"coverage/StitchModel/Stitch/Relay.coverage.json","sha256":"bc6ec0107e5da8d13d177f6b9fed52de2a649ee854cd1422bca1a5fc04a1f22d"},{"byte_length":11851,"kind":"coverage","path":"coverage/StitchModel/Stitch/Signaling.coverage.json","sha256":"981e0c6391717031441214ff9cb9fd2949c5f0e7136ac8252bc5d96913a03fbe"},{"byte_length":32838,"kind":"coverage","path":"coverage/StitchModel/Stitch/System.coverage.json","sha256":"efe112ada4c2064ee8b0749921a67c156d021e10ff6213805ddb938c4f9b6a0a"},{"byte_length":17449,"kind":"coverage","path":"coverage/StitchModel/Stitch/VmAdministration.coverage.json","sha256":"145f87e7a7856ed9945b90edb460bccb55213e2a98f19a5bd31c3ed2328c2c2a"},{"byte_length":24758,"kind":"coverage","path":"coverage/StitchModel/StitchApp.coverage.json","sha256":"6c7bce7a63bb3018266563bd087fa7e43819d19e9275c36480392d3512fd9907"},{"byte_length":2997,"kind":"lean","path":"modules/StitchModel/Foundation/Arch.lean","sha256":"ef511dc491983707186eb9685fea79419371f6f2e43f1c199251f8d382cb449d"},{"byte_length":1210,"kind":"lean","path":"modules/StitchModel/Foundation/Bytes.lean","sha256":"2376718e1fbece860ef4b9a3ae24ec668e5045db118dfd4c7a7a2c7b7d2e4b39"},{"byte_length":2045,"kind":"lean","path":"modules/StitchModel/Foundation/Experience/V1/Model.lean","sha256":"70b7a529d966cac9306b00a7e9b5d913775a7e38af0ecc22a1db34925181041f"},{"byte_length":585,"kind":"lean","path":"modules/StitchModel/Foundation/Qual.lean","sha256":"16d386673037913732917f65d818e426394d68351df6c487aa69182a24b6de72"},{"byte_length":864,"kind":"lean","path":"modules/StitchModel/Foundation/Sec.lean","sha256":"8c209bc93e0b28b399c8d72e7a0e929e419ba405ef5fcaeccdd55193ca816369"},{"byte_length":1144,"kind":"lean","path":"modules/StitchModel/Foundation/View/Text/V1/Model.lean","sha256":"70473365be15858a0c870172c27ac142f096afe1aee2432eaab2d828af1d55bf"},{"byte_length":18526,"kind":"lean","path":"modules/StitchModel/Product/Architecture.lean","sha256":"e70d6aa4dc48852b36930de23fa7968fa2620e31d9b1b0d7b8584bb3b4fd5720"},{"byte_length":7226,"kind":"lean","path":"modules/StitchModel/Product/Brand.lean","sha256":"2be6cd1d6bface27f905c8f2c12b5328dc057525bdf9e245a81e31de942669b6"},{"byte_length":9579,"kind":"lean","path":"modules/StitchModel/Product/Compliance.lean","sha256":"6fa6b6f51ef8425b07436e529adc4cf849508046fc78820fbdd7da65e90519eb"},{"byte_length":31606,"kind":"lean","path":"modules/StitchModel/Product/Design.lean","sha256":"c92832f4b0d1a830d1ba1dcb2e668ae3aff71aa5469a85e24eba27d41b39b97c"},{"byte_length":38316,"kind":"lean","path":"modules/StitchModel/Product/Experience.lean","sha256":"b65d9cd5ab4036cb7efc3ec1d73ecd6901d7c8209b3d11ee9be07cea1a4f8992"},{"byte_length":45129,"kind":"lean","path":"modules/StitchModel/Product/Features.lean","sha256":"71a9f66291bca696e559bdb28911154f97ce023f7c253094752e9ae9d3832f6e"},{"byte_length":26725,"kind":"lean","path":"modules/StitchModel/Product/Host.lean","sha256":"4feb419016272af67eae5597304d117b4b1a2c7acd759b85493abb067dd0c768"},{"byte_length":50247,"kind":"lean","path":"modules/StitchModel/Product/Model.lean","sha256":"0f6b7b8f7d758698a6b597925028d5378c91d03ffffe92d531b384d0ab3ceb59"},{"byte_length":9776,"kind":"lean","path":"modules/StitchModel/Product/Persistence.lean","sha256":"03ceff5388f3f241779bf2737bdca31ff66c710ba5260f59f571253ee5e9eebd"},{"byte_length":14453,"kind":"lean","path":"modules/StitchModel/Product/Quality.lean","sha256":"8262a1b950294df74c7d0fdb0b31ab8f0f8a91d1d3be291851b7bb4ecc69215c"},{"byte_length":10515,"kind":"lean","path":"modules/StitchModel/Product/Release.lean","sha256":"6084663903bd6b823d5c55a063a400061bddaf1e573c8d7830e129851e3720de"},{"byte_length":95073,"kind":"lean","path":"modules/StitchModel/Product/Security.lean","sha256":"d36c7d7aeb7f8a3a8c1c1fde518d333b030ec3df6638b6ae1bf61aa73ed08104"},{"byte_length":22591,"kind":"lean","path":"modules/StitchModel/Product/Users.lean","sha256":"648aabe05b7f8c32c57e2c1e4ef50bdb3edeb1db671918ccf80afdb81fdf4e4c"},{"byte_length":1359,"kind":"lean","path":"modules/StitchModel/Production/ThreatModel.lean","sha256":"abee882bf65ad5b6a3f64e82e2f5d4aa4c100746dfc1434fdfdc873796bb09fa"},{"byte_length":5228,"kind":"lean","path":"modules/StitchModel/Stitch/Authority.lean","sha256":"a89ebf120a05fa48a03a46c55bfbff5d2ab30554a7020a6aee491e88072f6f54"},{"byte_length":136179,"kind":"lean","path":"modules/StitchModel/Stitch/Budget.lean","sha256":"01f469628c84e8cf66aa9497ed0e82d3f547ae695c7f2a61efb7c8b8bb64fcd7"},{"byte_length":1336,"kind":"lean","path":"modules/StitchModel/Stitch/ChannelFlow.lean","sha256":"88ff390c120c789e97f5d56b117d6634806e45f758436be08dc2cc88b5c470b9"},{"byte_length":65970,"kind":"lean","path":"modules/StitchModel/Stitch/Compute.lean","sha256":"5e59cbb806a08a0f18a3ac4061704621c435815022d9d8b15896e28104cca191"},{"byte_length":57563,"kind":"lean","path":"modules/StitchModel/Stitch/Custody.lean","sha256":"784e463ef8b1f7b3f6d7d6aace5f8750911e20436e020e855c2e9cdbee466765"},{"byte_length":50394,"kind":"lean","path":"modules/StitchModel/Stitch/Effects.lean","sha256":"fabf1fbd169c1c9c4043224b2ac253b0c78967e45889389e6d7f5cf90862f1c8"},{"byte_length":5338,"kind":"lean","path":"modules/StitchModel/Stitch/Encoding.lean","sha256":"c2b2a20927f3f039298791f30abd4a9cc992b6eaf29334b0b81b3d1f68d98bad"},{"byte_length":14357,"kind":"lean","path":"modules/StitchModel/Stitch/Evidence.lean","sha256":"1c6d4247e09a311388b0adf319aa5c59c3807386a2b93527e0120c275a3bad02"},{"byte_length":13931,"kind":"lean","path":"modules/StitchModel/Stitch/Fragments.lean","sha256":"556d72531877ee3eb23acf6321b1aadfcc33c1eaaa4b1f3d227c032265aa90fb"},{"byte_length":4784,"kind":"lean","path":"modules/StitchModel/Stitch/Identity.lean","sha256":"633907978f9b550c37af80d6b4c975a895e4a9cd09e512d6d0540ba04683dedf"},{"byte_length":11298,"kind":"lean","path":"modules/StitchModel/Stitch/Observation.lean","sha256":"4b4ec280f91782403b0c83591f097c8894fc3f70d4545fc60659431c88b6431c"},{"byte_length":13603,"kind":"lean","path":"modules/StitchModel/Stitch/Pointer.lean","sha256":"77deec698881364e8739668f427208ce787f376e920a44cc0c2733cb9e04a0ce"},{"byte_length":24461,"kind":"lean","path":"modules/StitchModel/Stitch/PrismId.lean","sha256":"68cabf0d5879b22b555684095baed98b0b3e916aa530251f97b8bc3abd206b70"},{"byte_length":11694,"kind":"lean","path":"modules/StitchModel/Stitch/Recovery.lean","sha256":"71b64b56354ea7f9a02de2f9489fc407e8daf02d26c5773d31a64278240c281a"},{"byte_length":7539,"kind":"lean","path":"modules/StitchModel/Stitch/Relay.lean","sha256":"948fe7db4bbe2046c574e5883a17648573f2533bbb5f2a475a278610c6114eda"},{"byte_length":788,"kind":"lean","path":"modules/StitchModel/Stitch/Signaling.lean","sha256":"44713b2e8c2beb9b66658a3ce638f5e7e94285b596cb87458278e2a6925633fb"},{"byte_length":26153,"kind":"lean","path":"modules/StitchModel/Stitch/System.lean","sha256":"b5f20f50ccf11fb0b6f403f4f4b2d43f628c7564c6d7630d7d3c956aec7f1ebf"},{"byte_length":3009,"kind":"lean","path":"modules/StitchModel/Stitch/VmAdministration.lean","sha256":"41fc36c73deb14bbf0cb0412802fa2b17dc96bcb7f44f81e525448495c2d1772"},{"byte_length":32856,"kind":"lean","path":"modules/StitchModel/StitchApp.lean","sha256":"ccb080862681bb34a67c86fa0d9ec1618969a5de6b097c3e246519d32ec8f47e"},{"byte_length":10613,"kind":"lexicon-closure","path":"lexicons/Foundation.Arch.closure.json","sha256":"2d439c1faf5579e9d2803de423cb98c2c9f97dd9808b16a9285aa7eff1b4c0cc"},{"byte_length":11890,"kind":"lexicon-closure","path":"lexicons/Foundation.Bytes.closure.json","sha256":"7f502a073cedf91a0dc2cb794a186aff8474fead1fcf21106ea2ebbd651d660e"},{"byte_length":10628,"kind":"lexicon-closure","path":"lexicons/Foundation.Experience.V1.Model.closure.json","sha256":"f459d5fd93bd21815ed7c0282090eb7571c49cab74dc5e327f8d741bd4d1efaf"},{"byte_length":10613,"kind":"lexicon-closure","path":"lexicons/Foundation.Qual.closure.json","sha256":"180c1af3766109f02c5455c076bb9dbed10a3435d613bf2560a795536f4e8bac"},{"byte_length":10612,"kind":"lexicon-closure","path":"lexicons/Foundation.Sec.closure.json","sha256":"d3fe1cbe8e7aa6994b874524a4034d101b9028a8275046745a862fee05ad8b21"},{"byte_length":11903,"kind":"lexicon-closure","path":"lexicons/Foundation.View.Text.V1.Model.closure.json","sha256":"45dba9b9bdce509a7760ca8f1d4b8170ad8ce4e51629e1e3474ef2e5a2e37b2b"},{"byte_length":11894,"kind":"lexicon-closure","path":"lexicons/Product.Architecture.closure.json","sha256":"4d0946f0d67234617826cd15fd821ea8cd32b92b6ce996c54d42e6a04ef45726"},{"byte_length":11834,"kind":"lexicon-closure","path":"lexicons/Product.Brand.closure.json","sha256":"67c7ff5df2f9f8bf4ea6eecf9051ff829bbce13e8a73d661034bef1660447a8b"},{"byte_length":11839,"kind":"lexicon-closure","path":"lexicons/Product.Compliance.closure.json","sha256":"15802357d385bb0addf045487e4e534178897c6c18673eb1518939c33230b407"},{"byte_length":11835,"kind":"lexicon-closure","path":"lexicons/Product.Design.closure.json","sha256":"6449fdd2a5e1a826a2b1070f6d3ec1d945aa03ed7500bd7a73f24bf729e74a99"},{"byte_length":11839,"kind":"lexicon-closure","path":"lexicons/Product.Experience.closure.json","sha256":"8d2f26b857a9c467b58afbc7ef68277ce27d1501bf6d28c5c0876fc4400c249c"},{"byte_length":11837,"kind":"lexicon-closure","path":"lexicons/Product.Features.closure.json","sha256":"38e0905089178b1996d29f67267ddc9ee72362337739496527ca41e8952c1748"},{"byte_length":11833,"kind":"lexicon-closure","path":"lexicons/Product.Host.closure.json","sha256":"903a413e8dba6b396378beb31df48c43e5715ff34117a22e41149f882a8aac2b"},{"byte_length":11834,"kind":"lexicon-closure","path":"lexicons/Product.Model.closure.json","sha256":"c52eada02d322c0f2329020911590b222fa360b17734e496bca86fdd96ad85b0"},{"byte_length":11840,"kind":"lexicon-closure","path":"lexicons/Product.Persistence.closure.json","sha256":"fe8bac9ba0f1bccb82c6e717cbece2bf541dcdfe42ce6e76e6a2cd37c1f3475d"},{"byte_length":13533,"kind":"lexicon-closure","path":"lexicons/Product.Quality.closure.json","sha256":"05541563bb00817caa5fe846b89a447037bf0f7f77ef9c6309cc6d5114c236a1"},{"byte_length":11836,"kind":"lexicon-closure","path":"lexicons/Product.Release.closure.json","sha256":"895cc4ce484816bb67060ad5a18e5053092bc64217da7f1304c922cf3edbe0e8"},{"byte_length":13689,"kind":"lexicon-closure","path":"lexicons/Product.Security.closure.json","sha256":"932dda5917eea1f65576ce22e92a4c1a47dad6e1938be1a8f91f6b9431c4b4ba"},{"byte_length":11834,"kind":"lexicon-closure","path":"lexicons/Product.Users.closure.json","sha256":"49b4e2ed42c17c9f2c5781e926badc402d0afff46b0f70b78a19bcb0a4e421d1"},{"byte_length":10620,"kind":"lexicon-closure","path":"lexicons/Production.ThreatModel.closure.json","sha256":"0631d41a460728c58680180b6eb59d08107f3f4e425771f87cb36481976d8d84"},{"byte_length":11837,"kind":"lexicon-closure","path":"lexicons/Stitch.Authority.closure.json","sha256":"f70d6081ce6efd99aea1b8cc52a5a6234295fcf80f2a7c86dc78465ba484b907"},{"byte_length":11834,"kind":"lexicon-closure","path":"lexicons/Stitch.Budget.closure.json","sha256":"7962b6884050c5144e339ec85f249725b3899b46243680281666fbeb7ffb0637"},{"byte_length":11839,"kind":"lexicon-closure","path":"lexicons/Stitch.ChannelFlow.closure.json","sha256":"37d5478eba678689a2b48e6b7afac6b2b3e278afb29cb62d8248d89fc5237183"},{"byte_length":11835,"kind":"lexicon-closure","path":"lexicons/Stitch.Compute.closure.json","sha256":"af140b118b0cd43c6236c26b68784dc26bdfe9a45faa0e2f506a4f11bf254bb0"},{"byte_length":11835,"kind":"lexicon-closure","path":"lexicons/Stitch.Custody.closure.json","sha256":"f0abf1bc64a6c292f846936137466e7b86839604850bb8f48fafe6ec39a1c05e"},{"byte_length":11835,"kind":"lexicon-closure","path":"lexicons/Stitch.Effects.closure.json","sha256":"e1550376fcb680525d7eee6194a16da5b4ae30475c1bc4c7769f8a6ad90f5012"},{"byte_length":11836,"kind":"lexicon-closure","path":"lexicons/Stitch.Encoding.closure.json","sha256":"79d0243fa2899ecadc7b33416e972d2e98e820e2acf1771ea0cc63e8c8ca1e3e"},{"byte_length":11836,"kind":"lexicon-closure","path":"lexicons/Stitch.Evidence.closure.json","sha256":"96a36aa43ec7448916c45b2ab031f825bd1cae3ffee6d483e903b96f18930afb"},{"byte_length":11837,"kind":"lexicon-closure","path":"lexicons/Stitch.Fragments.closure.json","sha256":"8363c5017b95ea0ea6954a4863e7eb189c2ccf3ea14fbdd059892eb8f9d5b216"},{"byte_length":11836,"kind":"lexicon-closure","path":"lexicons/Stitch.Identity.closure.json","sha256":"3ed4db2f7f9b0ac362a86f4712d33cf2228320f3460b92d26cc171260fa7de77"},{"byte_length":11839,"kind":"lexicon-closure","path":"lexicons/Stitch.Observation.closure.json","sha256":"fb7167b54677deac96c7f04f2076eaa51b382d73fc8739bdf115c6397e92991a"},{"byte_length":11835,"kind":"lexicon-closure","path":"lexicons/Stitch.Pointer.closure.json","sha256":"893a6441114c8916d5149ede3ec94cf3ac29de8690eca6f5727edb3956e2bf1e"},{"byte_length":11835,"kind":"lexicon-closure","path":"lexicons/Stitch.PrismId.closure.json","sha256":"cf6b865dee04e934a299b7188e7fc1e4d5dafe969d686786e9c011a472fefa9c"},{"byte_length":11836,"kind":"lexicon-closure","path":"lexicons/Stitch.Recovery.closure.json","sha256":"8ed91f47691e2e7c1e6b442cd42fd1b0c9ab8fe277a5295682bd219e0784d095"},{"byte_length":11833,"kind":"lexicon-closure","path":"lexicons/Stitch.Relay.closure.json","sha256":"4eabd436c489a638f6a9c53d0222cb75c75b4e3e7d8fdfdd64526dddd266c965"},{"byte_length":11837,"kind":"lexicon-closure","path":"lexicons/Stitch.Signaling.closure.json","sha256":"86052d52a1940b5d555c4685b9235d11f02546a374a223f338b01cb7e3b93a24"},{"byte_length":11834,"kind":"lexicon-closure","path":"lexicons/Stitch.System.closure.json","sha256":"5236f9657e3bb76622232caa6e7a6d194b1dcaea3f9480fd66b0f8e11e24fb3f"},{"byte_length":11844,"kind":"lexicon-closure","path":"lexicons/Stitch.VmAdministration.closure.json","sha256":"8b068115afde0691b57f84227f4343f3397764b572cf40d2d3ec73d447dfad7c"},{"byte_length":13106,"kind":"lexicon-closure","path":"lexicons/StitchApp.closure.json","sha256":"3c13af13903ce896374d40fae40b497d70c16b0863fd155aebe4b7411ef5f06f"},{"byte_length":10374,"kind":"map","path":"maps/StitchModel/Foundation/Arch.map.json","sha256":"54a753c89ea5e3f7d974c9802358c5cf9df984ab6eeeab2ff114c952a79994d4"},{"byte_length":3609,"kind":"map","path":"maps/StitchModel/Foundation/Bytes.map.json","sha256":"01586f73559806a38acd57a32c123c4a3db2ee60fa4c813728124b8d90032b56"},{"byte_length":5938,"kind":"map","path":"maps/StitchModel/Foundation/Experience/V1/Model.map.json","sha256":"3a25b7e79b7770d4397c698d61af2b96b0cf3a777228ebcbc39cb36d7bf65f5f"},{"byte_length":2319,"kind":"map","path":"maps/StitchModel/Foundation/Qual.map.json","sha256":"db1fce018036ddd0f10f26eab864e79fcf22269ba42ea71ee6bfc902b37a4132"},{"byte_length":3594,"kind":"map","path":"maps/StitchModel/Foundation/Sec.map.json","sha256":"395be72af5f8435a38676b96ab8abc46e62b94225f4dc18a72ed12a93153dda6"},{"byte_length":2395,"kind":"map","path":"maps/StitchModel/Foundation/View/Text/V1/Model.map.json","sha256":"81006d68b9a36cdf5dfb0b9e87d1353586534f2b1ce0a8c6e4a71877d4a482f7"},{"byte_length":23714,"kind":"map","path":"maps/StitchModel/Product/Architecture.map.json","sha256":"71566c4a250dc34e8f1547f8dda8770e990d49776cf94b8258d3b675db57357f"},{"byte_length":3625,"kind":"map","path":"maps/StitchModel/Product/Brand.map.json","sha256":"85e1c853e3ca786bea6b15e272e0b4aae303bec6028ad547f8bc51c2d6c2d903"},{"byte_length":6567,"kind":"map","path":"maps/StitchModel/Product/Compliance.map.json","sha256":"03fc74d25060e8ba26707c4bf0e942d29288bd7c5cc5bdaf759b8fd3a0d8686b"},{"byte_length":40037,"kind":"map","path":"maps/StitchModel/Product/Design.map.json","sha256":"ff6912b831c1805accdd3dcd030fb220dec86504ad1d611171173e9eb9463a33"},{"byte_length":42797,"kind":"map","path":"maps/StitchModel/Product/Experience.map.json","sha256":"e144b80c6e55bd08b10721983b05136d64af19eba582087f1cc0379a576642cc"},{"byte_length":50201,"kind":"map","path":"maps/StitchModel/Product/Features.map.json","sha256":"b56872b7b45faa9e0f3ed80e3e70da561256775d0003ca800e88151e8c75683d"},{"byte_length":10128,"kind":"map","path":"maps/StitchModel/Product/Host.map.json","sha256":"d9716676ac93b03dd53849e62be9727209973eb7f8fb6e904702d582d62f2bc3"},{"byte_length":41065,"kind":"map","path":"maps/StitchModel/Product/Model.map.json","sha256":"33da24a319d89b9672ae37b70d5297e7078c8bc831fcbbcd190ff463fc605c6a"},{"byte_length":6901,"kind":"map","path":"maps/StitchModel/Product/Persistence.map.json","sha256":"85138c40f4898733558fd5ccf2a277f19de57ad97f645dfb5dc587d8b0bd5120"},{"byte_length":16690,"kind":"map","path":"maps/StitchModel/Product/Quality.map.json","sha256":"35e0909e0c7e3b62c5889e03710dfc6f4e8419ce91a94dd8187c08231c847494"},{"byte_length":15950,"kind":"map","path":"maps/StitchModel/Product/Release.map.json","sha256":"f9e186e6ef63ed7ff204fa0c6ffde27f48526747740cba9aa30110f76e66ea0a"},{"byte_length":86046,"kind":"map","path":"maps/StitchModel/Product/Security.map.json","sha256":"11d88a3b979169e90648255f1c4c1c3c77f2a1ab1d426fc5c61573665fab624f"},{"byte_length":6292,"kind":"map","path":"maps/StitchModel/Product/Users.map.json","sha256":"5c684a09766766c43447196eb5f7269dbc34efa976a1c8ea9eb4a86d9457fe51"},{"byte_length":4286,"kind":"map","path":"maps/StitchModel/Production/ThreatModel.map.json","sha256":"a8a867c3628c6293c6a8344db937df36585da99abe78aaf168d01367d597d2ee"},{"byte_length":8126,"kind":"map","path":"maps/StitchModel/Stitch/Authority.map.json","sha256":"f152b06d93beaf3d000183b4ad1b8cc2ed3f126c8c4b268caf7fec7852e8eefc"},{"byte_length":53140,"kind":"map","path":"maps/StitchModel/Stitch/Budget.map.json","sha256":"a77ce59978eb1b6237d843f12c12bf216fe58796bf52fe9dca307bf0cd9e1344"},{"byte_length":2669,"kind":"map","path":"maps/StitchModel/Stitch/ChannelFlow.map.json","sha256":"e4dd07ec4cb301b0e55f5da771f7c4b98cd4d06ae41cd65da0bce9139740d652"},{"byte_length":29738,"kind":"map","path":"maps/StitchModel/Stitch/Compute.map.json","sha256":"1935ba76fd4adfc0e58e895701f9b1ff1e1199e593e3feaad10309e37da1982c"},{"byte_length":32756,"kind":"map","path":"maps/StitchModel/Stitch/Custody.map.json","sha256":"04db6d14fbd9441c8105e9d87a397f8cd59ad69d824762814cf83b679d8a0ac3"},{"byte_length":24002,"kind":"map","path":"maps/StitchModel/Stitch/Effects.map.json","sha256":"cbe71f68290de992bb62dadaac7fdb78fe0d6192776fd68892c3f7c343cab608"},{"byte_length":4592,"kind":"map","path":"maps/StitchModel/Stitch/Encoding.map.json","sha256":"8915e2ec128ef7a81c4a507c71f98560e5c25a1db1a8e49b195f1f51df050c83"},{"byte_length":7522,"kind":"map","path":"maps/StitchModel/Stitch/Evidence.map.json","sha256":"81b53764d8860dfb5f27ca5f3c7e74b79a8e9ac424b028c88bb83ef30ebaf5c9"},{"byte_length":8153,"kind":"map","path":"maps/StitchModel/Stitch/Fragments.map.json","sha256":"47cc1409c570edf0d43a1768e800ad5a9ebad7dff7b9a5c13bf572cbd9e70cfe"},{"byte_length":3297,"kind":"map","path":"maps/StitchModel/Stitch/Identity.map.json","sha256":"f6079ca90980c7efe14716fe803c61c361c18fc84c36b95f1a3df7823476c7c4"},{"byte_length":3959,"kind":"map","path":"maps/StitchModel/Stitch/Observation.map.json","sha256":"9e94597092f85b9f95cb05e22eaf378c8ff23bd4112b37613a9fd98915d43259"},{"byte_length":4923,"kind":"map","path":"maps/StitchModel/Stitch/Pointer.map.json","sha256":"1a2da2fef354f9ff8b61eb561f979271baa962703c9a2a08d2ba8a6415f55b08"},{"byte_length":19232,"kind":"map","path":"maps/StitchModel/Stitch/PrismId.map.json","sha256":"ba8645d380cf13f529d1e90cf90556f8f4bbb6c4171a2ffc83082c1d3a3e7e2c"},{"byte_length":4273,"kind":"map","path":"maps/StitchModel/Stitch/Recovery.map.json","sha256":"aaaf762c672ff3c31483b136a24bc00295e285951824a9213cdadb4e34ff0731"},{"byte_length":9099,"kind":"map","path":"maps/StitchModel/Stitch/Relay.map.json","sha256":"db799432ac9d0fe610ee2b7207ce1d00751162541f9d277f748517cd1957089a"},{"byte_length":1706,"kind":"map","path":"maps/StitchModel/Stitch/Signaling.map.json","sha256":"0d86471a9618138f39d738e5f84cac73fc7462b370953b8838170c24f92a22e8"},{"byte_length":16726,"kind":"map","path":"maps/StitchModel/Stitch/System.map.json","sha256":"d72471197b86e012fa5ef3d1f0cb15653a0df130768f45fae8c48f33233c5bc0"},{"byte_length":7838,"kind":"map","path":"maps/StitchModel/Stitch/VmAdministration.map.json","sha256":"aa321036a58dc1f12457fb71daeec3d7d7355d66e173bcd42fac386b1969af21"},{"byte_length":5558,"kind":"map","path":"maps/StitchModel/StitchApp.map.json","sha256":"6965ee327ae7cf8220d1642597f0a994143fe516631953d4769988e90430c07a"},{"byte_length":7904,"kind":"tex","path":"modules/StitchModel/Foundation/Arch.tex","sha256":"fb73999903f55e2825209793bc232c4826d409036d43c5384fde8c848a2e78b3"},{"byte_length":2411,"kind":"tex","path":"modules/StitchModel/Foundation/Bytes.tex","sha256":"fe6e59cb58d9eed864aef062f756000d515534ffa248765fb6385335833bd60b"},{"byte_length":4966,"kind":"tex","path":"modules/StitchModel/Foundation/Experience/V1/Model.tex","sha256":"aaa6d766d7b79b21686558e193d077cd723f511f9bf149a78fa4d574f0b3e5d8"},{"byte_length":935,"kind":"tex","path":"modules/StitchModel/Foundation/Qual.tex","sha256":"0c252b92d40e82accf731d56bcb4c7d0a9e046e363309a337a654bc3e56e2616"},{"byte_length":1894,"kind":"tex","path":"modules/StitchModel/Foundation/Sec.tex","sha256":"7a60081f517b73752d415dfcc4e66f7a9fa1d79883ab6cc269c41d280925c551"},{"byte_length":2293,"kind":"tex","path":"modules/StitchModel/Foundation/View/Text/V1/Model.tex","sha256":"3b141dfda1c664d6283350a6b8f47acec969f181f66f42e7fba774679dedc591"},{"byte_length":28592,"kind":"tex","path":"modules/StitchModel/Product/Architecture.tex","sha256":"ba7a2c83d27a620840aa9afaf6ec2701b0916d0e7052f5f3b678aee530bf8912"},{"byte_length":8514,"kind":"tex","path":"modules/StitchModel/Product/Brand.tex","sha256":"1f45cc39a761396bea02cf8159f752f62d2a331b41e087503185d06d82d81216"},{"byte_length":12195,"kind":"tex","path":"modules/StitchModel/Product/Compliance.tex","sha256":"9d9078ad6acb43746afc1883de31f83c3efb0ac16774495bb59a686a1aa9d347"},{"byte_length":48972,"kind":"tex","path":"modules/StitchModel/Product/Design.tex","sha256":"d1e838ff87d75f883c71e95dcd6069f3eba4372e099bc3569440724b55ff73cb"},{"byte_length":58721,"kind":"tex","path":"modules/StitchModel/Product/Experience.tex","sha256":"9aedffbb36d45a6384a0c27743529d2960b60509b313c7c85d4e394424f43f34"},{"byte_length":66840,"kind":"tex","path":"modules/StitchModel/Product/Features.tex","sha256":"2fdb847fccd0348235d428a3c0ffe1d1edeb91cf45954f070866f67fb0818229"},{"byte_length":14237,"kind":"tex","path":"modules/StitchModel/Product/Host.tex","sha256":"bddac32df1d8ee33386c79970a742a212b7ff26c8ff7846e37cacabd4ece7f0c"},{"byte_length":69658,"kind":"tex","path":"modules/StitchModel/Product/Model.tex","sha256":"4391ffe795c70931127530e60ac93364f4f730807f076671a870ca2c77cdf4a9"},{"byte_length":12445,"kind":"tex","path":"modules/StitchModel/Product/Persistence.tex","sha256":"7729509eab42c0d684e1fa6f9d3673eb763f3a71aee84cbfbc8cfc4225e8f60f"},{"byte_length":21657,"kind":"tex","path":"modules/StitchModel/Product/Quality.tex","sha256":"62dc0add4ad6030ef447e242ce2dddebf7a97bc39253595160dd07f97fa64121"},{"byte_length":17300,"kind":"tex","path":"modules/StitchModel/Product/Release.tex","sha256":"03b6c8912e4488ab97885d6e2f30e069c928c1b022d2c0446544b05a5e9f9a32"},{"byte_length":132911,"kind":"tex","path":"modules/StitchModel/Product/Security.tex","sha256":"4c521ec1371a46bb45024950037a04fb7217c2e6c2d998dd58119def4ff6bd3b"},{"byte_length":24932,"kind":"tex","path":"modules/StitchModel/Product/Users.tex","sha256":"c7f828696b0d1385f07b55b873d4085fe44f367cdc3be48bdfd132c15737ff51"},{"byte_length":2941,"kind":"tex","path":"modules/StitchModel/Production/ThreatModel.tex","sha256":"d48f40f4b12ffb475f1f950d8fb6b3d8692588703147f5ba03e8dc7510ea68d2"},{"byte_length":8749,"kind":"tex","path":"modules/StitchModel/Stitch/Authority.tex","sha256":"7ddde7e38ac4a361bf8a5bb250ac16ec58f8daeb477c02b79c289db728057d49"},{"byte_length":72932,"kind":"tex","path":"modules/StitchModel/Stitch/Budget.tex","sha256":"de267c621802d99f99079026a76ecd443cb737d81d05ee4c52aec10d0367f698"},{"byte_length":2177,"kind":"tex","path":"modules/StitchModel/Stitch/ChannelFlow.tex","sha256":"affdf490a72c98c34ebeb9cf8abe9b444b4377b6267f2b54889dc565fd65466b"},{"byte_length":44939,"kind":"tex","path":"modules/StitchModel/Stitch/Compute.tex","sha256":"586072ae82a56c29c58d2ff510546eb8bd883fc6df5419a1dcafb04fea2acd7b"},{"byte_length":54582,"kind":"tex","path":"modules/StitchModel/Stitch/Custody.tex","sha256":"8f3c8254811ca22240d4c158d58cfb8015dd1136c9a7bcb618e91823469dfbc5"},{"byte_length":29995,"kind":"tex","path":"modules/StitchModel/Stitch/Effects.tex","sha256":"ff4003135665c5926a84069574f8681a8e57ff83b404420c8c09cc9b4d07886d"},{"byte_length":4594,"kind":"tex","path":"modules/StitchModel/Stitch/Encoding.tex","sha256":"d94f1d53609a2ce7200299a99bf1c9578fb7e22273912797fbde55fbfa88196c"},{"byte_length":13395,"kind":"tex","path":"modules/StitchModel/Stitch/Evidence.tex","sha256":"7187305141df657b7315f393013667ac04674bf4242fcc976083f9dd755a72a3"},{"byte_length":7494,"kind":"tex","path":"modules/StitchModel/Stitch/Fragments.tex","sha256":"b64ace4d5d43bec4c4d0015e11e43b6754223cd3ed20eca7370d66b6a6b895c0"},{"byte_length":3117,"kind":"tex","path":"modules/StitchModel/Stitch/Identity.tex","sha256":"5a4bfa83020c9373122da82aaef40f65073434fe21d4e21292e1f38af903453d"},{"byte_length":4154,"kind":"tex","path":"modules/StitchModel/Stitch/Observation.tex","sha256":"d787ff34779abccdc2b9435768063e213d904f5a63f12a5f8eb94400e74ac3b7"},{"byte_length":6751,"kind":"tex","path":"modules/StitchModel/Stitch/Pointer.tex","sha256":"2f8be39e8442b896efa3e45d9326adce3b0b08833c5f2ddfa82d53b802b4d39a"},{"byte_length":17819,"kind":"tex","path":"modules/StitchModel/Stitch/PrismId.tex","sha256":"81368da8f2703aeb2ef5a517b6a586f89e1563f2ee490a2512d69f61070d1f15"},{"byte_length":4574,"kind":"tex","path":"modules/StitchModel/Stitch/Recovery.tex","sha256":"cdb643fe7ca7bde1a63b5f9afb3d51a5208215effe4b70506eceee4b2f08ddcc"},{"byte_length":12083,"kind":"tex","path":"modules/StitchModel/Stitch/Relay.tex","sha256":"4a5197ad593047c09504565af4e9f1fd62d308440fc66b8111bc0509fdeab775"},{"byte_length":1027,"kind":"tex","path":"modules/StitchModel/Stitch/Signaling.tex","sha256":"57c4f9d8021e498d2c8814d1c32b412208aa6086c471d757fc79e16611b5410c"},{"byte_length":26861,"kind":"tex","path":"modules/StitchModel/Stitch/System.tex","sha256":"66846e57a3a7dce4a05812e989398fb29c825dcfa68c94185e490bbaeded9ada"},{"byte_length":6503,"kind":"tex","path":"modules/StitchModel/Stitch/VmAdministration.tex","sha256":"a8bdd0398b65cc97e9d59278ac4a2ce86e3b616eab9a505bf109c6bd701647b5"},{"byte_length":17064,"kind":"tex","path":"modules/StitchModel/StitchApp.tex","sha256":"8d35554fc3002e168d6f0b91d475f7de448882d108fc47041c847618f0d98946"}],"project":"stitch-recoverable-service","selection":["Foundation.Arch","Foundation.Bytes","Foundation.Experience.V1.Model","Foundation.Qual","Foundation.Sec","Foundation.View.Text.V1.Model","Product.Architecture","Product.Brand","Product.Compliance","Product.Design","Product.Experience","Product.Features","Product.Host","Product.Model","Product.Persistence","Product.Quality","Product.Release","Product.Security","Product.Users","Production.ThreatModel","Stitch.Authority","Stitch.Budget","Stitch.ChannelFlow","Stitch.Compute","Stitch.Custody","Stitch.Effects","Stitch.Encoding","Stitch.Evidence","Stitch.Fragments","Stitch.Identity","Stitch.Observation","Stitch.Pointer","Stitch.PrismId","Stitch.Recovery","Stitch.Relay","Stitch.Signaling","Stitch.System","Stitch.VmAdministration","StitchApp"],"semantic_id":"f8e732898667afd4927eb16ffab20fe2ab3ac738cccb1919e091edc67a96cf14","source_id":"0f4aa6cb23123d72e6e030ffebd0d2d36da20879ed887d416fd49f6e9b607e93","spec":"lexlean/build-manifest/1"} diff --git a/product/source-verification.json b/product/source-verification.json new file mode 100644 index 0000000..e9af92b --- /dev/null +++ b/product/source-verification.json @@ -0,0 +1,432 @@ +{ + "format": "Stitch exact-source verification summary", + "version": 1, + "assurance": "Summary of actual pinned LexLean/Lean/leanchecker/axiom verification; not a native Prism artifact certificate or whole-host guarantee", + "attestation_id": "904f11a911a38818a4126cd11c5af64c67cc560560ec0da7b22cc32ad902274a", + "attestation_sha256": "727ce4b68f1f7e2578795943687cd20fdb70cdbcefc5e4fd907cd95f711438b5", + "source_id": "0f4aa6cb23123d72e6e030ffebd0d2d36da20879ed887d416fd49f6e9b607e93", + "semantic_id": "f8e732898667afd4927eb16ffab20fe2ab3ac738cccb1919e091edc67a96cf14", + "build_id": "bdcf8bfe587b8188d03aee9d87e79bec09b42818d548f80fbf124ac7f3f83046", + "status": "verified", + "module_count": 39, + "declaration_audits": 2133, + "successful_processes": 127, + "processes_by_tool": { + "lean": 85, + "leanchecker": 42 + }, + "sources": [ + { + "path": "app/lake-manifest.json", + "sha256": "1107bc06d0f0bf1716fbc980995e4895f608331a17863d16bb1ff631d70924f6" + }, + { + "path": "app/lakefile.toml", + "sha256": "f93d661ae8380e42c7954c0a90166abb296ac100af42b403d7af0ac7e6b50094" + }, + { + "path": "app/language/prism.arch/entries/arch-component-kind.toml", + "sha256": "bb54f236dd64badfc74d57ee43a0f4d886786b9270edb07347f062541bec613e" + }, + { + "path": "app/language/prism.arch/entries/arch-component.toml", + "sha256": "ef7345b3d4cb74e68c5da598895f13cd887cca2d2247058a1fd062adc2597c50" + }, + { + "path": "app/language/prism.arch/entries/arch-concern.toml", + "sha256": "e2b1b3f560e85d0fb51f75b19b1c18b9f5f83f48eaf952b6c9a9a75ae73f3248" + }, + { + "path": "app/language/prism.arch/entries/arch-edge-kind.toml", + "sha256": "333c549f1db8311e47c74e391839649e20ba45495f6c40843348a45588db444f" + }, + { + "path": "app/language/prism.arch/entries/arch-edge.toml", + "sha256": "3a9d18d8e28a3a3b50be9d1315037fd2c426d56cfc8e2f6115a4b0785e6a5840" + }, + { + "path": "app/language/prism.arch/entries/arch-model-kind.toml", + "sha256": "ccb283501e64ab83914728371e1e2fdf8301837bc502804c4bd18c1d49128ada" + }, + { + "path": "app/language/prism.arch/entries/arch-stakeholder.toml", + "sha256": "f8e4bc507df3cf0e384d6c9a92912500ddca2004be3cfeede0f3cc3d38a04ec7" + }, + { + "path": "app/language/prism.arch/entries/arch-standard-reference.toml", + "sha256": "07e3dcf71b75ee0dcfe8441894e5ad3744f042577c502619b3bedb787c86ca1b" + }, + { + "path": "app/language/prism.arch/entries/arch-text-application-model.toml", + "sha256": "6d92d1a7d29d4516dde60bd9539e758b1076dfbf889860e3e435f289c504b9d1" + }, + { + "path": "app/language/prism.arch/entries/arch-view-class.toml", + "sha256": "ef9465462b1adcf5c36b10b2669f03057d5215bbfd10e863db58e81727408fdb" + }, + { + "path": "app/language/prism.arch/entries/arch-view.toml", + "sha256": "2bee3378b0f94165eb8f023279eaab32ec70c5e112e3c06bce7237a1498e0e31" + }, + { + "path": "app/language/prism.arch/entries/arch-viewpoint-class.toml", + "sha256": "c1efce0dd43342b471433ae8a89d7cc46876d54ef3200aed8e08e817f36795cf" + }, + { + "path": "app/language/prism.arch/entries/arch-viewpoint.toml", + "sha256": "a6f53b7f4c58950d7230fb6445a35a80e3a93772fb024b5e7c09381c10cd466c" + }, + { + "path": "app/language/prism.arch/entries/holo-flat-validation-input.toml", + "sha256": "e3a0cf83efd144e1aa3ed6ce5b67ea3bed1df1c4f198c71655c817b65b1d0108" + }, + { + "path": "app/language/prism.arch/entries/holo-normalized-model.toml", + "sha256": "5f7f66774560717cfa55842e30e8fc1b097e1e038b0eba6da6ea3312b583080e" + }, + { + "path": "app/language/prism.arch/entries/holo-standards-profile.toml", + "sha256": "1cf436bcdcc986f4ffcb41db1f31eba74aab4e534a867b4dc5d6d6cf7523417d" + }, + { + "path": "app/language/prism.arch/entries/prism-bounded-byte-buffer.toml", + "sha256": "9b8f6d61f42389a8e63bfbac674ec1b3061f5f004adda8279158df549ee7c902" + }, + { + "path": "app/language/prism.arch/entries/prism-browser-system-model.toml", + "sha256": "3ba45fd6754e84290033a4f18ebc06f5338c8e8affd5e58ee95b07e572fcf42b" + }, + { + "path": "app/language/prism.arch/entries/prism-production-system-model.toml", + "sha256": "91df8207b685a56ba0f0032ed06e875f707202789d21aa3cb6e8b31b4855fb34" + }, + { + "path": "app/language/prism.arch/entries/prism-unicode-text-codec.toml", + "sha256": "7c296475b0a97eccee73eb522af93359eaf185b04571e280b01d394b20f9e1e1" + }, + { + "path": "app/language/prism.arch/lexicon.toml", + "sha256": "14c95df8b512edacacdb1788b58ae90cf573b4e3f1dca0e41074bfde5a380c9f" + }, + { + "path": "app/language/prism.qual/entries/qual-characteristic.toml", + "sha256": "88c99bf5804a200ea5d42c4937567ffc9469f0a500967d7db077ebc31b1c60ca" + }, + { + "path": "app/language/prism.qual/entries/qual-measure.toml", + "sha256": "304e8b84739e034eee5635801b02044d16522e82e53a54e4af173c0dcf929d09" + }, + { + "path": "app/language/prism.qual/entries/qual-requirement.toml", + "sha256": "85a2d7dec43320aa24ee3e0e3706035d94bcdf38613c0c56d44f46c194e29fa6" + }, + { + "path": "app/language/prism.qual/entries/qual-subcharacteristic.toml", + "sha256": "3e7ae6099226785e401b3bcba2c2a508b705b17cb7c33673e8f6c6be8b4aec9f" + }, + { + "path": "app/language/prism.qual/lexicon.toml", + "sha256": "a79fae9a81e748c01f19a48dd066b0dedd356c05b791bd8bc8e7ce20d44cb335" + }, + { + "path": "app/language/prism.sec/entries/sec-activity.toml", + "sha256": "a9d8f0369b33d332d58fc5155bf26fe73573d94dae627624d1c02922028fe6c5" + }, + { + "path": "app/language/prism.sec/entries/sec-asset.toml", + "sha256": "11ad482bdceffcb5413351d40566221e6ae06bd08731a27d04ad66cb8038fafb" + }, + { + "path": "app/language/prism.sec/entries/sec-control.toml", + "sha256": "2079014db65e604290d9b5b09cd9fbd63da084a4cd082e39dd4c2836ac9e9192" + }, + { + "path": "app/language/prism.sec/entries/sec-impact.toml", + "sha256": "2dcf1b527613d7d4c11f477c23f5f10fd7181a7f315dfb87c8585d1b3c28827b" + }, + { + "path": "app/language/prism.sec/entries/sec-likelihood.toml", + "sha256": "36ffd259c2d5598cd18dab6e1d023910712c7fe86f1e0b7fcebae106084954cb" + }, + { + "path": "app/language/prism.sec/entries/sec-measurement.toml", + "sha256": "2e5ff2c76971922d6321ae4ae6eeb29330d14cab2efb363ab0d10ebc5c95e400" + }, + { + "path": "app/language/prism.sec/entries/sec-risk.toml", + "sha256": "f2a6d3dbee6dab80f208394fcdfb50eccb1185ae46ad9e2a31eb057b33a36b72" + }, + { + "path": "app/language/prism.sec/entries/sec-threat.toml", + "sha256": "a9b2201976bb336399d5ba4456a32c60263101b9accbbdbf8d9361e3c3175c21" + }, + { + "path": "app/language/prism.sec/lexicon.toml", + "sha256": "d9b9663715d38c6d181becc8d433e3c3636b55d7ef97bd1f3d39688222925f7c" + }, + { + "path": "app/language/stitch.domain/entries/stitch-budget.toml", + "sha256": "0bba5b43f718ceefbe562a5f08ad29c8724071ccf4464c4bf91860288428d8f9" + }, + { + "path": "app/language/stitch.domain/entries/stitch-checkpoint.toml", + "sha256": "4d52a393476ad8e6944092fba2255b733a2980ca1c200e8e897d6b08e8e1a62a" + }, + { + "path": "app/language/stitch.domain/entries/stitch-encoding.toml", + "sha256": "7e1624765b469c5519fc07888d480477aaf20ab0d14adc2ace1b394939fff543" + }, + { + "path": "app/language/stitch.domain/entries/stitch-evidence.toml", + "sha256": "7bbbe2db8b2970c5b9943e499d1f67ee0e965d9330556f7ab9b428da8c6b6fba" + }, + { + "path": "app/language/stitch.domain/entries/stitch-fragment.toml", + "sha256": "6ecf049cdb84d7b134022012e38c5e1a114471f3b0330fd22aa6e39a1e5af8b1" + }, + { + "path": "app/language/stitch.domain/entries/stitch-object.toml", + "sha256": "9713cff899bf01e9cddbd9599e3ea70395d089b3296c79ffa5cdc1c364329714" + }, + { + "path": "app/language/stitch.domain/entries/stitch-observation.toml", + "sha256": "3ee41f31ef11a0d4fc1b54674c9bd0a55870bd7ec29354b5e189a35ca0cc3579" + }, + { + "path": "app/language/stitch.domain/entries/stitch-placement.toml", + "sha256": "2dfa9c8901fa29b87f33aff74305a72dac70a2f79ca9a480d6790d03cf51b0b2" + }, + { + "path": "app/language/stitch.domain/entries/stitch-pointer.toml", + "sha256": "fbe10dae37ae4a6ef039a7ec38585da18a434b4f8266ab285a4c85b35d3df23b" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-brand.toml", + "sha256": "83888689fe9709c366189c287993879f0c34d49c4b8edc8734979b2c3e91816e" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-compliance.toml", + "sha256": "712a56eeb947698a0f8057aa3bf0ff0fb4d63920b0d4143a3ca3dccce40008e8" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-design.toml", + "sha256": "316dbdd008caef03b6e7860aa90710f4d22f1e1029defb339c4b4d22b30f4359" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-features.toml", + "sha256": "d01c970b414c3df9ed6fcbb6871b96c49ad776f8bb585286fc447e1e525b222b" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-persistence.toml", + "sha256": "f463e88ba5449df1369ac0cd69019ef50d29dc7cc7a9e92bb628f8152ee68557" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-quality.toml", + "sha256": "bd2bb2331371f49e6f96d20cfa81530de00be9cf753bcbf22c4a4cf0a561b405" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-release.toml", + "sha256": "eba180091f257e55f12e8ead55585907f52074eecafb1637cf1bbba4e8bffced" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-security.toml", + "sha256": "310a7feacb85a42087880a2b10cfd6e90cd061e363c630cf9f600b5cb0da9d7d" + }, + { + "path": "app/language/stitch.domain/entries/stitch-product-users.toml", + "sha256": "7eba3db5f0690ff9c50cc72ef76581e72e23a695761d56040a53825411f89155" + }, + { + "path": "app/language/stitch.domain/entries/stitch-service-model.toml", + "sha256": "4277ffc608483787cffbd79f05cfbd7ede7db687549ee0c5ce7b4dbe8bd422d9" + }, + { + "path": "app/language/stitch.domain/lexicon.toml", + "sha256": "6b9d7544b96a6c0bbeacb5dd9972377ffa4f9ef23dffc92eb191bd90e39cc98d" + }, + { + "path": "app/lean-toolchain", + "sha256": "8e3538e0ab5f81a3ee04927d8838c8c674e0e112838b4b3ce87ec218143276af" + }, + { + "path": "app/lexlean.lock", + "sha256": "49b1b7b79ca4f74e69f8bfb775e4a12de98c6bb13364288a61e413a6289fd21c" + }, + { + "path": "app/lexlean.toml", + "sha256": "db033709d967898d0bf4430ea2e9283f174a8532342e4e8e8d356ba2b5a9404f" + }, + { + "path": "app/prism.toml", + "sha256": "5445be94ddceff0efdf9492eab20e7746ba7b3533ae4853607c7b72a185b18c9" + }, + { + "path": "app/prismpm.toml", + "sha256": "9469bbd2a7dd5d844f0e2d0b83b931b4a988f24d21e03f5ee9433fcab1ebe02e" + }, + { + "path": "app/src/Foundation/Arch.lex.tex", + "sha256": "efb3f79f7f956463305800e76b5bfa197d0dc885ae5aca7d40436223cff3eda9" + }, + { + "path": "app/src/Foundation/Bytes.lex.tex", + "sha256": "ce16e5b439128db3231979381f4599d3ff0617f62c2bf00c348bba35393abcd6" + }, + { + "path": "app/src/Foundation/Experience/V1/Model.lex.tex", + "sha256": "fc7d2edf2c123de2232ed8166db425721696219e7454a36113eb41867e99b813" + }, + { + "path": "app/src/Foundation/Qual.lex.tex", + "sha256": "f1dbfafde6cb4d7262b12371699be38a9683fa7525a9519eb856d74f01b3ee81" + }, + { + "path": "app/src/Foundation/Sec.lex.tex", + "sha256": "a58632af4038e6e046aae1848f4c64d89fc497cfbbdb53be2a576358a1f977aa" + }, + { + "path": "app/src/Foundation/View/Text/V1/Model.lex.tex", + "sha256": "db124343ad8fe1295bc8eb305c7f59f83cf6ad76d46a5cabea500fe66f3ad5dc" + }, + { + "path": "app/src/Product/Architecture.lex.tex", + "sha256": "198c55dae057fff7e5530027fd2449f86260cc58056ba4fc00c7b99734ececdc" + }, + { + "path": "app/src/Product/Brand.lex.tex", + "sha256": "a06984fa4753d236c8b874a70bf0aca1bc064ad8944a5ce27ac84f1135559578" + }, + { + "path": "app/src/Product/Compliance.lex.tex", + "sha256": "ee1cf13e35d64e467075ef7bff835dca1d7d5370bde59e19f82a2daf487f40e6" + }, + { + "path": "app/src/Product/Design.lex.tex", + "sha256": "38da1916ac695cda70170df7d99734e59386e6626d67e08a7c2d795ac95b34cc" + }, + { + "path": "app/src/Product/Experience.lex.tex", + "sha256": "6f2625fdce3d3d51899cabc17ce3d57ec0a9381dd3bf3e6477da6ae3ccfb84bd" + }, + { + "path": "app/src/Product/Features.lex.tex", + "sha256": "d5b7bdf070d493f617f8ce48de3757ff6bcddc17e8c115ea52c0dc44197e5726" + }, + { + "path": "app/src/Product/Host.lex.tex", + "sha256": "3bb2a621868dc683e776c9b65c58cc60cc2b89e5d007d54c4c152bedd4878871" + }, + { + "path": "app/src/Product/Model.lex.tex", + "sha256": "3017e652d02156eca68bc00cbb3cdfb54cebcfe290a3b9463493d9326da399f8" + }, + { + "path": "app/src/Product/Persistence.lex.tex", + "sha256": "0f651a6022c345e155563c42137dc0541b3cf9e8c7953caccaa73c9a0a3755cd" + }, + { + "path": "app/src/Product/Quality.lex.tex", + "sha256": "568af2bafa27a50917dfffac0de44c9b83f05069c2ef8f961ff70071d0f07785" + }, + { + "path": "app/src/Product/Release.lex.tex", + "sha256": "7aaaf03ef70e259f7af42eb52e87f6828d0ae5ba249e94b59d510db45f4a92e9" + }, + { + "path": "app/src/Product/Security.lex.tex", + "sha256": "4eb9b799086128e191af7c5dbe44da2d4ffd95938e61591cc43fb47a95dfc0fc" + }, + { + "path": "app/src/Product/Users.lex.tex", + "sha256": "7baf71e758f17479e3a1459b7892fa4bcaacc07887f426f86ce05167c169c1d6" + }, + { + "path": "app/src/Production/ThreatModel.lex.tex", + "sha256": "649bd4a4531915fd1dc9449a37f4022380d79261907378e136257df50ac4c1bc" + }, + { + "path": "app/src/Stitch/Authority.lex.tex", + "sha256": "10afc7af1503f08fe7806dbab24d93f565f34370e3b7d18135f48297e64ee573" + }, + { + "path": "app/src/Stitch/Budget.lex.tex", + "sha256": "581ae188297e3e03e69869a3cfbcdae9554706e007cbeb238d97c8ad30229911" + }, + { + "path": "app/src/Stitch/ChannelFlow.lex.tex", + "sha256": "7f4356ddd38fc94b32a2d6af237ce7382c34bdc7db43c8e8d6ab94cd94fc3e63" + }, + { + "path": "app/src/Stitch/Compute.lex.tex", + "sha256": "ef0f1b8dcf15a8ff26a206b7bd8fa51736bb54ae14e7b6e71a4296deeb4528b7" + }, + { + "path": "app/src/Stitch/Custody.lex.tex", + "sha256": "e9084ba97058adfd3017e634215af1dee12d89c4ff0d409a4271f05387d8d663" + }, + { + "path": "app/src/Stitch/Effects.lex.tex", + "sha256": "7ccc2c30cca7df663541ceece0c85226f921160f56f4ec681703a8d5b589263b" + }, + { + "path": "app/src/Stitch/Encoding.lex.tex", + "sha256": "75b412ab0ed56dea3aa41cc77705fb6233991ea1c2e600a7cf509c3b84e5a95f" + }, + { + "path": "app/src/Stitch/Evidence.lex.tex", + "sha256": "39011e1cf70295427f716d328b1ab754242d3667f0e70a8a48dffa735465c79e" + }, + { + "path": "app/src/Stitch/Fragments.lex.tex", + "sha256": "5cd8d0602cbe501ae4ffc5c18dde17fc6e5766d930ac1d9277545d1ef8d88b83" + }, + { + "path": "app/src/Stitch/Identity.lex.tex", + "sha256": "c4c159234e1623b8f339e86cf47da55c89d197bf21fe334bd893f575ba053870" + }, + { + "path": "app/src/Stitch/Observation.lex.tex", + "sha256": "fe3205a68576d8c7d82f86b45b78f8b6c8b49a873f00c448cccb2eb459749ae8" + }, + { + "path": "app/src/Stitch/Pointer.lex.tex", + "sha256": "10239748c402cdadfc36b150a7a103dfe5124d81fa27bb276575810470c89c46" + }, + { + "path": "app/src/Stitch/PrismId.lex.tex", + "sha256": "1d3d73a831097b3cc6897b94e191d38b52902496b18951e2c188055e0897f935" + }, + { + "path": "app/src/Stitch/Recovery.lex.tex", + "sha256": "4a29e91526ffd1c5aa9fcfc8d990ca1b89d5129813742d9ae55e688eeb6a9121" + }, + { + "path": "app/src/Stitch/Relay.lex.tex", + "sha256": "26a3b5c7f8af3cb058800716a5b73111adbe0188436ae1ad87e1a0e6ce118a03" + }, + { + "path": "app/src/Stitch/Signaling.lex.tex", + "sha256": "97bdfb5160e41a4ed3ab30788f2e3a558836f622c237e4bd3496536212b330c9" + }, + { + "path": "app/src/Stitch/System.lex.tex", + "sha256": "b05a639514a2c56f40b8e960c6cf31023aec8b20d1c18c5ed68a0a936a9d7119" + }, + { + "path": "app/src/Stitch/VmAdministration.lex.tex", + "sha256": "4c27a3a3d1b3650aa78d8fe22b6f07a7335d7e9ec58969ad50f7ad9294f30f81" + }, + { + "path": "app/src/StitchApp.lex.tex", + "sha256": "ffd8a4b6b9072b27b06d67d61e1c11d085a6b82e84be4610f27f3805d87f675b" + } + ], + "not_covered": [ + "Native Prism/Holo and guest artifact build", + "Browser/provider/VM correctness and physical network trials", + "Licensing and release qualification", + "Handwritten host-code representation correspondence beyond named runtime tests" + ], + "attestation_path": "product/source-attestation.json", + "build_manifest_path": "product/source-build-manifest.json" +} diff --git a/scripts/author-source.sh b/scripts/author-source.sh new file mode 100644 index 0000000..3c382a3 --- /dev/null +++ b/scripts/author-source.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +# Actions-host orchestration only. The committed SDK owns all formal operations. +set -euo pipefail +cd "$(dirname "$0")/.." +for tool in docker node; do + command -v "$tool" >/dev/null 2>&1 || { echo "required authoring executable missing: $tool" >&2; exit 69; } +done +[ -z "${PRISM_CODE_DRY_RUN:-}" ] || { echo 'dry-run axiom output cannot qualify authoring' >&2; exit 2; } +# A fresh checkout cannot reuse an old generated output by directory ordering. +[ ! -e app/.lexlean ] && [ ! -e app/.prism ] || { echo 'authoring needs a fresh checkout without compiler output' >&2; exit 2; } +mkdir -p verification-output +sha256sum prismpm.lock standards.lock package-lock.json scripts/check-model-sdk.sh > verification-output/unchanged-inputs.sha256 +SDK_IMAGE=$(node -e 'const x=JSON.parse(require("fs").readFileSync("prismpm.lock"));if(!/^ghcr\.io\/uor-foundation\/[a-z0-9-]+@sha256:[0-9a-f]{64}$/.test(x.sdk_image))throw Error("unpinned SDK");console.log(x.sdk_image)') +node -e 'if(JSON.parse(require("fs").readFileSync("node_modules/prism-code/package.json")).version!=="0.7.2")throw Error("authoring requires pinned prism-code 0.7.2")' +run_sdk() { + docker run --rm --read-only --cap-drop ALL --security-opt no-new-privileges \ + --user "$(id -u):$(id -g)" --tmpfs /tmp:rw,exec,nosuid,size=3g \ + --volume "$PWD:$PWD" --workdir "$PWD" \ + --env HOME=/tmp/prismpm-home --env PRISMPM_EPHEMERAL_HOME=1 \ + "$SDK_IMAGE" "$@" +} +docker pull "$SDK_IMAGE" +run_sdk sh -c 'lexlean --version; lean --version; prismpm --version' > verification-output/compiler-identity.log +node scripts/check-facets.mjs --write +run_sdk sh scripts/check-model-sdk.sh --prepare +run_sdk sh -c 'cd app && lexlean fmt --check && lexlean lock --check' +# Fail before expensive proof if the actual formatter and source renderer differ. +node scripts/check-facets.mjs --check +# The supported Prism check validates official facet projections, not just Lean types. +run_sdk prismpm --project app check 2>&1 | tee verification-output/prismpm-check.log +# The unmodified verifier enforces every declared exact axiom policy itself. +# A policy mismatch (including LLV7005) fails here; no helper result can override it. +if run_sdk sh -c 'cd app && lexlean verify --all' > verification-output/lexlean-verify.stdout.log 2> verification-output/lexlean-verify.stderr.log; then + cat verification-output/lexlean-verify.stdout.log + node scripts/retain-authoring-evidence.mjs verification-output/lexlean-verify.stdout.log +else + status=$? + cat verification-output/lexlean-verify.stdout.log + cat verification-output/lexlean-verify.stderr.log >&2 + exit "$status" +fi +# Only host projections and byte inventories are written after source verification. +node scripts/check-model.mjs --write +node scripts/check-facets.mjs --check +node scripts/check-product.mjs --write +node scripts/check-source-evidence.mjs +sha256sum -c verification-output/unchanged-inputs.sha256 +printf '%s\n' 'Source authoring and proof retention only. Run the unchanged native Prism gate separately; PP5007 has not been cleared.' diff --git a/scripts/check-facets.mjs b/scripts/check-facets.mjs new file mode 100644 index 0000000..403b968 --- /dev/null +++ b/scripts/check-facets.mjs @@ -0,0 +1,406 @@ +#!/usr/bin/env node +/** Reproducible Stitch product facets. A source projection, never a verifier or certificate. */ +import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'node:fs'; +import { resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createHash } from 'node:crypto'; +import { literalRows, readProduct } from './check-product.mjs'; +import { validateFacetProjection } from './facet-projection.mjs'; +const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); +const hash = x => createHash('sha256').update(x).digest('hex'); +const sourceKappa = (path, bytes) => { + const h=createHash('sha256'); + for(const part of [Buffer.from('prism/source-file/1'),Buffer.from(path),Buffer.from(bytes)]){const n=Buffer.alloc(8);n.writeBigUInt64BE(BigInt(part.length));h.update(n);h.update(part);} + return h.digest('hex'); +}; +const q = x => JSON.stringify(x); +const cap = x => x[0].toUpperCase() + x.slice(1); +const raw = text => ({ raw: text }); +const val = x => x?.raw ?? (typeof x === 'string' ? q(x) : String(x)); +const list = (type, values) => values.reduceRight((rest, x) => `(cons ${val(x)} ${rest})`, `(nil ${type})`); +const record = (type, fields) => `(record ${type} {${Object.entries(fields).map(([k,v])=>`${k} := ${val(v)}`).join(', ')}})`; +const def = (name, type, body) => { + const flat=`definition{name: ${name}, parameters: [], result: ${type}, body: ${body}}`; + return flat.length<=100?flat+'\n':`definition{\n name: ${name},\n parameters: [],\n result: ${type},\n body: ${body}\n}\n`; +}; +const row = (name, type, fields) => def(name,type,record(type,fields)); +const call = name => raw(`(${name})`); +const ctor = name => raw(`(ctor ${name})`); +const structure = (name, fields) => { + const rows=Object.entries(fields).map(([name,type])=>`{name: ${name}, type: ${type}}`); + const array='['+rows.join(', ')+']'; + const flat=`structure{name: ${name}, type_parameters: [], parameters: [], fields: ${array}}`; + if(flat.length<=100)return flat+'\n'; + const fieldText=(' fields: '+array).length<=100?array:'[\n'+rows.map(r=>' '+r).join(',\n')+'\n ]'; + return `structure{\n name: ${name},\n type_parameters: [],\n parameters: [],\n fields: ${fieldText}\n}\n`; +}; +const theorem = (name, expression) => `theorem{\n name: ${name},\n parameters: [],\n statement: (${expression} = true),\n proof: decide{}\n}\n`; +const A='Foundation.Arch::', S='Foundation.Sec::', T='Production.ThreatModel::', Q='Foundation.Qual::', E='Foundation.Experience.V1.Model::'; +const F='Product.Features::', D='Product.Design::'; +const REF = 'https://github.com/afflom/UORust/blob/1d531dfe0120d1cbdac2dd599f6cde513118f0ce/'; +const EXPERIENCE = 'app/src/Product/Experience.lex.tex'; +const testsByJourney = { + mesh: ['tests/authenticated-signaling.test.js','tests/transport-generation.test.js','tests/browser/mesh.spec.mjs'], + objects: ['tests/custody.test.js','tests/placement-repair.test.js','tests/recovery.test.js','tests/pointer-recovery.test.js'], + compute: ['tests/execution-identity.test.js','tests/primitive-operations.test.js','tests/runtime-admission.test.js'], + vm: ['tests/vm-lifecycle.test.js','tests/vm-administration.test.js','tests/browser/vm.spec.mjs'], + pointers: ['tests/dns-publication.test.js','tests/browser-authority-lifecycle.test.js','tests/browser/authority.spec.mjs'], + resources: ['tests/runtime-admission.test.js','tests/operator-ui.test.js'] +}; +function fail(reason) { throw Error(`product facets: ${reason}`); } +export function validateFacetReferences(moduleTexts) { + const declarations=new Map(); + for(const [module,text]of moduleTexts)for(const m of text.matchAll(/(?:definition|structure|inductive|theorem)\{\s*name: (\w+)/g))declarations.set(module+'::'+m[1],true); + for(const [module,text]of moduleTexts)for(const m of text.matchAll(/"(Product\.[A-Za-z]+::[A-Za-z0-9_]+)"/g))if(!declarations.has(m[1]))fail(`dangling reference ${module} -> ${m[1]}`); + return validateFacetProjection(moduleTexts); +} +export function validateFacetLexicons(read,moduleTexts) { + // Application facet projection is all-or-nothing in the real SDK. Declared + // record types alone do not put their lexicon packages in the source closure. + const config=read('app/lexlean.toml'); + const packages=new Set([...moduleTexts.values()].flatMap(text=>[...text.matchAll(/\\useglossary\{(prism\.(?:arch|qual|sec))@1\.0\.0\}/g)].map(m=>m[1]))); + for(const packageName of ['prism.arch','prism.qual','prism.sec']){ + const expected=`[[lexicon_source]]\npackage = "${packageName}"\nkind = "path"\npath = "language/${packageName}"`; + if(!packages.has(packageName)||!config.includes(expected))fail(`missing application facet lexicon closure ${packageName}`); + } + const provenance=JSON.parse(read('product/facet-lexicon-provenance.json')); + if(provenance.format!=='stitch/facet-lexicon-provenance/1'||provenance.files.length!==14)fail('incomplete facet lexicon provenance'); + for(const entry of provenance.files)if(hash(read(entry.path))!==entry.sha256)fail(`modified official facet lexicon ${entry.path}`); + read('product/PRISMPM-LICENSE-MIT.txt'); + return true; +} +export function generateFacets(base=root) { + const outputs=new Map(), sources=new Map(), modules=[]; + function read(path) { + if(!/^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)*$/.test(path)||path.split('/').includes('..'))fail(`unsafe source ${path}`); + const bytes=readFileSync(resolve(base,path));sources.set(path,hash(bytes));return bytes.toString('utf8'); + } + const p=readProduct(base); + const experience=read(EXPERIENCE); + const actions=literalRows(experience,new Set(['Action'])).sort((a,b)=>a.code-b.code); + const journeys=literalRows(experience,new Set(['Journey'])); + if(!actions.length||new Set(actions.map(a=>a.id)).size!==actions.length)fail('empty or duplicate action catalog'); + const components=p.architecture.filter(a=>a.type===A+'Component'); + const edges=p.architecture.filter(a=>a.type===A+'Edge'); + const component=id=>{const c=components.find(c=>c.name===id);if(!c)fail(`unknown component ${id}`);return c;}; + const arch=id=>'Product.Architecture::'+component(id).declaration; + const document=read('index.html'); + const modulePaths=[]; + function emit(name,title,imports,body,paths,records) { + paths=[...new Set(paths)].sort();paths.forEach(read); + const sourceRows=paths.map((path,i)=>record('Source',{record:`Product.${name}`,path,firstLine:0,lastLine:0,sha256:sources.get(path)})); + const provenance=structure('Source',{record:'String',path:'String',firstLine:'Nat',lastLine:'Nat',sha256:'String'})+'\n'+def('sources','(List Source)',list('Source',sourceRows.map(raw))); + const glossaries=imports.flatMap(i=>i==='Foundation.Sec'?['prism.sec']:i==='Foundation.Qual'?['prism.qual']:[]); + const module='Product.'+name, path=`app/src/Product/${name}.lex.tex`; + const text=`\\begin{lexlean}{${module}}\n\\useglossary{lexlean.std.bool@1.2.0}\n\\useglossary{lexlean.std.nat@1.2.0}\n\\useglossary{stitch.domain@1.0.0}\n${glossaries.map(g=>`\\useglossary{${g}@1.0.0}\n`).join('')}${imports.map(i=>`\\importmodule{${i}}\n`).join('')}\\title{Stitch ${title}}\n\\begin{semanticmodule}\n${provenance}\n${body.join('\n')}\\end{semanticmodule}\n\\end{lexlean}\n`; + outputs.set(path,text);modulePaths.push(path);modules.push({module,path,records,sourcePaths:paths}); + const id='stitch-product-'+name.toLowerCase(); + outputs.set(`app/language/stitch.domain/entries/${id}.toml`,`spec = "lexlean/entry/1"\nid = "${id}"\ncategory = "label-word"\nsurface_arity = 0\nframe = "atom"\n\n[denotation]\nkind = "document"\nmodule = "${module}"\ncomponent = "sources"\n\n[[form]]\nid = "${id}"\nchannel = "text"\nsurface = ${q('Stitch '+title)}\ncanonical_source = true\nfeatures = ["sentence-case", "singular"]\n`); + } + // Every existing operator action becomes a typed official Feature. Calls and + // acceptance are declaration references, not unbound strings masquerading as IDs. + const features=[];let body=[]; + for(const a of actions) { + if(!journeys.some(j=>j.id===a.journey)||!testsByJourney[a.journey])fail(`unowned action ${a.id}`); + if(!document.includes(`id="${a.control}"`))fail(`missing action control ${a.control}`); + const suffix=a.declaration.slice('action'.length), declaration='feature'+suffix; + const acceptance=testsByJourney[a.journey];acceptance.forEach(read); + body.push(def('call'+suffix,'String',q(`Browser control #${a.control}: ${a.label}`))); + body.push(def('accept'+suffix,'String',q(`Evidence to run, not a pass claim: ${acceptance.join('; ')}. Exact action guard: Product.Experience::actionAllowed code ${a.code}.`))); + body.push(row(declaration,A+'Feature',{statement:a.label+'. '+a.help,calls:raw(list('String',[F+'call'+suffix])),acceptance:raw(list('String',[F+'accept'+suffix]))})); + features.push({id:a.id,declaration:F+declaration,control:a.control,journey:a.journey,label:a.label,acceptance,source:EXPERIENCE,sourceDeclaration:a.declaration}); + } + const supporting=[ + {id:'LearnProtocol',control:'encodeExample',journey:'reader',label:'Explore exact fragment recovery locally',statement:'Change the input, withhold a fragment or alter a byte using the real custody verifier; no mesh or persistence effects.',source:'site/explorer.js',acceptance:['tests/site-explorer.test.js','tests/browser/site.spec.mjs']}, + {id:'InspectFacetSources',control:'facetCatalogContent',journey:'reviewer',label:'Inspect source-derived product facets',statement:'Read declaration counts, source links and evidence boundaries without a verification badge.',source:'site/catalog.js',acceptance:['tests/site-explorer.test.js','tests/product-facets.test.js']}, + {id:'ReviewHostBoundaries',control:'docs/product-projection.md',journey:'reviewer',label:'Review whole-product host and release boundaries',statement:'Separate exact-source/native probe results from actual browser, network, VM and provider qualification.',source:'docs/product-projection.md',acceptance:['tests/source-evidence.test.js','tests/product-model.test.js']}, + {id:'ExtendProtocol',control:'docs/prism-model.md',journey:'integrator',label:'Extend source-owned protocol contracts',statement:'Locate versioned encoding dependencies, reserve-before-effect limits, replay identity and positive/negative evidence before extending adapters.',source:'docs/prism-model.md',acceptance:['tests/contracts.test.js','tests/execution-identity.test.js','tests/product-model.test.js']} + ]; + const authority=read('src/authority-ui.js'); + const authorityIds=[...(/const controls = \{([\s\S]*?)\};/.exec(authority)?.[1]??fail('missing authority controls')).matchAll(/(\w+Btn): (\d+)/g)]; + for(const [,control,code] of authorityIds){ + const text=new RegExp(`]*id="${control}"[^>]*>([\\s\\S]*?)<\\/button>`).exec(document)?.[1]?.replace(/<[^>]+>/g,'').trim()??fail(`missing authority control ${control}`); + supporting.push({id:cap(control.replace(/Btn$/,'')),control,journey:'authority',label:text,statement:`Explicit origin-local operation admitted by Stitch.Authority::controlAllowed code ${code}; no new global identity, implicit trust or resolution of unknown effects.`,source:'src/authority-ui.js',acceptance:['tests/authority-ui.test.js','tests/browser-authority-lifecycle.test.js']}); + } + for(const a of supporting){ + read(a.source);a.acceptance.forEach(read); + if(!a.control.startsWith('docs/')&&!document.includes(`id="${a.control}"`))fail(`missing reader control ${a.control}`); + body.push(def('call'+a.id,'String',q(a.control.startsWith('docs/')?a.control:`Browser surface #${a.control}: ${a.label}`))); + body.push(def('accept'+a.id,'String',q('Evidence to run, not a pass claim: '+a.acceptance.join('; ')))); + body.push(row('feature'+a.id,A+'Feature',{statement:a.label+'. '+a.statement,calls:raw(list('String',[F+'call'+a.id])),acceptance:raw(list('String',[F+'accept'+a.id]))})); + features.push({...a,declaration:F+'feature'+a.id,sourceDeclaration:'source-bound surface',operatorAction:false}); + } + const ordered={mesh:['join'],objects:['store','PlacementRepair','RecoveryExport','RecoveryImport','RecoveryDownload'],compute:['start','resume'],vm:['boot','execute','VmReconcile','VmStop','VmDestroy'],pointers:['SaveAuthority','pin','txt','admit','publish','LoadPublication','reconcile'],resources:['export','renew']}; + const journeyRows=[]; + for(const j of journeys) { + const ids=ordered[j.id];if(!ids)fail(`missing task order ${j.id}`); + const steps=ids.map(id=>{const f=features.find(f=>f.id.toLowerCase()===id.toLowerCase());if(!f)fail(`unknown journey task ${j.id}/${id}`);return f.declaration;}); + const declaration='journey'+cap(j.id);body.push(row(declaration,A+'Journey',{actor:'Product.Architecture::operator',steps:raw(list('String',steps))})); + journeyRows.push({id:j.id,declaration:F+declaration,title:j.title,summary:j.summary,steps,ordering:'Documented operator path; each step retains its own admission guard. Optional/reconciliation steps are not automatic.'}); + } + for(const [id,actor,title,ids]of [ + ['reader','reader','Understand the Stitch protocol',['LearnProtocol','InspectFacetSources']], + ['reviewer','reviewer','Audit evidence and assumptions',['InspectFacetSources','ReviewHostBoundaries']], + ['integrator','systemIntegrator','Extend the protocol safely',['LearnProtocol','ReviewHostBoundaries','ExtendProtocol']], + ['authority','operator','Care for saved identity and trust',['InspectAuthorityStorage','SaveTrustedAnchor','RestoreTrustedAnchor','ExportAuthorityJournal']] + ]){ + const steps=ids.map(id=>{const f=features.find(f=>f.id===id);if(!f)fail(`missing supporting feature ${id}`);return f.declaration;}); + const declaration='journey'+cap(id);body.push(row(declaration,A+'Journey',{actor:'Product.Architecture::'+actor,steps:raw(list('String',steps))})); + journeyRows.push({id,actor,declaration:F+declaration,title,summary:title+'. Each operation retains its source-owned consent and evidence boundary.',steps,ordering:'Explicit user-directed path; operations never run merely because the journey is declared.'}); + } + body.push(def('scope','String',q('Feature acceptance names executable evidence; only a successful exact-revision run establishes its result. Journeys describe ordered available tasks, not an instruction to repeat effects.'))); + emit('Features','features and journeys',['Foundation.Arch','Product.Architecture'],body,[EXPERIENCE,'index.html',...Object.values(testsByJourney).flat(),...supporting.flatMap(r=>[r.source,...r.acceptance])],features.length+journeyRows.length); + // Design views retain every actual component and edge. Sequence/state views + // explain the existing DNS write-ahead protocol, not an invented runtime. + body=[]; + const views=[['viewComponents','Five-layer browser component relationships','umlComponent'],['viewObjectProcess','Recoverable object process','opmObjectProcess'],['viewPublicationSequence','Scoped publication and read-only reconciliation','umlSequence'],['viewPublicationState','Unknown writes are never repeated','umlStateMachine']]; + for(const [id,title,kind] of views)body.push(row(id,A+'DesignView',{title,viewpoint:'Product.Architecture::productViewpoint',diagram:ctor(A+'DesignDiagram.'+kind)})); + for(const c of components)body.push(row('component'+cap(c.name),A+'UmlComponent',{view:D+'viewComponents',component:arch(c.name)})); + for(const e of edges)body.push(row('connector'+cap(e.declaration),A+'UmlConnector',{view:D+'viewComponents',edge:'Product.Architecture::'+e.declaration})); + const processes=[['AdmitObject','storage'],['CommitLocal','storage'],['RequestPlacement','transport'],['CheckReceipt','storage'],['Recover','storage'],['BeginWrite','discovery'],['Reconcile','discovery'],['Confirm','discovery'],['Refuse','discovery'],['RetainUnknown','discovery'],['AuthorizePointer','pointerAuthority'],['DispatchDnsWrite','runtimeHost'],['ObserveDnsRecord','runtimeHost']]; + for(const [name,owner]of processes)body.push(row('process'+name,A+'SystemProcess',{owner:arch(owner)})); + for(const id of ['identity','admission','storage','peers'])body.push(row('object'+cap(id),A+'OpmThing',{view:D+'viewObjectProcess',kind:ctor(A+'OpmThingKind.object'),subject:arch(id)})); + for(const [name]of processes.slice(0,5))body.push(row('opm'+name,A+'OpmThing',{view:D+'viewObjectProcess',kind:ctor(A+'OpmThingKind.process'),subject:D+'process'+name})); + const opmLinks=[['instrument','objectIdentity','opmAdmitObject'],['instrument','objectAdmission','opmAdmitObject'],['invocation','opmAdmitObject','opmCommitLocal'],['effect','objectStorage','opmCommitLocal'],['invocation','opmCommitLocal','opmRequestPlacement'],['instrument','objectPeers','opmCheckReceipt'],['invocation','opmCheckReceipt','opmRecover'],['effect','objectStorage','opmRecover']]; + opmLinks.forEach(([kind,source,target],i)=>body.push(row('opmLink'+i,A+'OpmLink',{view:D+'viewObjectProcess',kind:ctor(A+'OpmLinkKind.'+kind),source:source.startsWith('object')?arch(source.slice(6).replace(/^./,c=>c.toLowerCase())):D+'process'+source.slice(3),target:target.startsWith('object')?arch(target.slice(6).replace(/^./,c=>c.toLowerCase())):D+'process'+target.slice(3)}))); + ['browser','discovery','pointerAuthority','runtimeHost'].forEach((id,i)=>body.push(row('lifeline'+cap(id),A+'UmlLifeline',{view:D+'viewPublicationSequence',component:arch(id),order:i}))); + const messages=[['browser','discovery','BeginWrite','synchronous'],['discovery','pointerAuthority','AuthorizePointer','synchronous'],['discovery','runtimeHost','DispatchDnsWrite','asynchronous'],['runtimeHost','discovery','DispatchDnsWrite','reply'],['discovery','discovery','RetainUnknown','synchronous'],['browser','discovery','Reconcile','synchronous'],['discovery','runtimeHost','ObserveDnsRecord','asynchronous'],['runtimeHost','discovery','ObserveDnsRecord','reply'],['discovery','discovery','Confirm','synchronous']]; + messages.forEach(([source,target,process,kind],i)=>body.push(row('message'+i,A+'UmlMessage',{view:D+'viewPublicationSequence',kind:ctor(A+'UmlMessageKind.'+kind),order:i,source:arch(source),target:arch(target),process:D+'process'+process}))); + const effects=read('app/src/Stitch/Effects.lex.tex'); + const phaseText=/name: DnsPhase,[\s\S]*?constructors: \[([\s\S]*?)\n \]/.exec(effects)?.[1]??fail('missing DnsPhase'); + const states=[...phaseText.matchAll(/name: (\w+), fields: \[\]/g)].map(m=>m[1]); + for(const state of states){body.push(row('state'+state,A+'SystemState',{owner:arch('discovery')}));body.push(row('uml'+state,A+'UmlState',{view:D+'viewPublicationState',state:D+'state'+state,initial:state==='Idle'}));} + const transitions=[['Idle','Unknown','BeginWrite'],['Published','Unknown','BeginWrite'],['Refused','Unknown','BeginWrite'],['Unknown','Published','Confirm'],['Unknown','Published','Reconcile'],['Unknown','Refused','Refuse'],['Unknown','Unknown','RetainUnknown']]; + transitions.forEach(([source,target,trigger],i)=>{if(!states.includes(source)||!states.includes(target))fail('unknown DNS state');body.push(row('transition'+i,A+'UmlTransition',{view:D+'viewPublicationState',order:i,source:D+'state'+source,target:D+'state'+target,trigger:D+'process'+trigger}));}); + body.push(def('boundary','String',q('Design relationships are views of existing contracts. AdmitObject is storage-owned orchestration using identity and admission, not an admission-led storage write. DNS host calls and replies name host-owned processes; local retention and confirmation remain discovery-owned conditional decisions. Transition edges remain conditional on Stitch.Effects predicates and exact host observations. They neither execute effects nor prove the host implements every transition.'))); + const design={components:components.length,connectors:edges.length,views:views.map(([id,title,diagram])=>({id,title,diagram})),states,transitions}; + emit('Design','protocol design views',['Foundation.Arch','Product.Architecture'],body,['app/src/Product/Architecture.lex.tex','app/src/Product/Model.lex.tex','app/src/Stitch/Effects.lex.tex','docs/prism-model.md','docs/lifecycle-effects.md','src/layer3-storage/index.js','src/layer1-uor/pointer.js','src/layer2-schedulers/policy.js'],components.length+edges.length+views.length+states.length+transitions.length+messages.length+opmLinks.length+processes.length); + // Security assesses attack opportunity and consequence qualitatively. These + // categories are design assessments, never frequencies or measured scores. + const threatRows=[ + ['AuthoritySpoofing','pointerAuthority','spoofing','high','critical','An arbitrary valid self-signature is mistaken for an independently pinned writer.','Exact independently accepted key/name/head; strict successor CAS and revocation gates.','tests/browser-authority-lifecycle.test.js','docs/browser-authority.md'], + ['CheckpointForgery','compute','tampering','high','major','A hashed but impossible state is accepted as computation.','Replay exact program/input/execution identity before accepting or resuming.','tests/execution-identity.test.js','docs/uor-primitives.md'], + ['Disclosure','publicRelay','informationDisclosure','high','major','A mesh topic or relay is mistaken for private storage.','Separate public signaling and payload-relay consent; explicit disclosure and no privacy claim.','tests/relay-framing.test.js','docs/relay-framing.md'], + ['EffectReplay','discovery','repudiation','medium','major','An unknown DNS write is repeated after restart or key rotation.','Strict write-ahead intent and exact read-only reconciliation; unknown journal retention.','tests/dns-publication.test.js','docs/lifecycle-effects.md'], + ['FragmentTampering','storage','tampering','high','major','A holder supplies modified, duplicate-index or wrong-manifest bytes.','Full domain-separated commitments and exact compatible indexed recovery.','tests/custody.test.js','docs/prism-model.md'], + ['GuestPrivilege','vm','elevationOfPrivilege','medium','critical','Guest output is mistaken for trusted execution or broad host authority.','Separate VM effects, bounded mounts and explicit lifecycle/command reconciliation.','tests/vm-administration.test.js','docs/vm-administration.md'], + ['OriginCompromise','browser','elevationOfPrivilege','medium','critical','Malicious same-origin code can use retained key handles and read local data.','Source/asset inventory and origin boundary; nonextractability is not protection from active same-origin code.','tests/source-evidence.test.js','docs/browser-authority.md'], + ['ResourceExhaustion','admission','denialOfService','high','major','Untrusted messages, replay or unknown effects exhaust application allowances.','Reserve each independent resource before effects; unknown outcomes stay charged.','tests/runtime-admission.test.js','docs/prism-model.md'], + ['SignalingSpoofing','transport','spoofing','high','major','A relay replays or substitutes SDP/ICE and stale session callbacks.','Signed exact signaling, session/generation fencing and bounded channel flow.','tests/authenticated-signaling.test.js','docs/authenticated-signaling.md'], + ['StorageLoss','storage','denialOfService','medium','major','Tab loss or eviction removes the only object fragments or recent trust anchor.','Explicit recovery export and origin-storage evidence; no guarantee after total information loss.','tests/recovery.test.js','docs/recovery.md'], + ['VendorSubstitution','vm','tampering','medium','critical','Loaded emulator, BIOS or guest differs from reviewed inventory.','Retained corresponding-source materials and exact local asset digests; live load-time remote integrity remains an assumption.','tests/guest-qualification.test.js','docs/vendor-provenance.md'], + ['PrismActionReplay','prismId','spoofing','high','major','A captured signed action is replayed at the same host or presented to another host.','Every action names its audience and carries a nonce; the host refuses a different audience, a seen nonce, or a time outside its window.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['replayedActionRefused','wrongAudienceActionRefused','staleActionRefused']], + ['PrismCanonicalDivergence','prismId','tampering','medium','major','Browser, native, mobile and embedded runtimes canonicalize differently, so kappa labels or signatures disagree and one runtime accepts what another refuses.','uor-addr canonical form with explicit refusals (non-NFC, non-integer, ill-formed), published vectors and an independent Python implementation.','tests/prism-id.test.js','docs/prism-id-threat-model.md',[]], + ['PrismDelegateOverreach','prismId','elevationOfPrivilege','medium','major','A delegate device (often embedded and physically exposed) acts outside its scope, reads private content, or administers the prism.','Scope checked on every action; a delegate never receives the private boundary and cannot bind or revoke.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['delegateOutsideScopeRefused','delegateNeverReceivesPrivateBoundary','delegateCannotBind']], + ['PrismGenesisConfusion','prismId','spoofing','medium','critical','A forged log presents a different genesis, so a new device or host adopts the wrong prism.','prism id is the kappa of exactly one self-signed genesis; the prism id travels out of band in the link offer and every record names it.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['foreignPrismBindRefused']], + ['PrismKeyClaimForgery','prismId','spoofing','medium','major','A device claims hardware-held keys it does not have to obtain permissions a host reserves for such devices.','The protection field is a claim only; admitDevice accepts a hardware-requiring device only when a host-pinned verifier attests hardware protection of exactly that device signing key.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['unattestedDeviceRefusedWhenRequired','attestationForOtherKeyRefused']], + ['PrismLinkHijack','prismId','spoofing','high','critical','Someone who sees, photographs or relays the link QR code answers first and binds their own device to the prism.','One-time secret, expiry, single use, and a six-digit code bound to the joining device that the person confirms on both screens.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['unconfirmedLinkRefused','usedOfferRefused','wrongSecretRefused','expiredOfferRefused']], + ['PrismLinkability','prismId','informationDisclosure','medium','major','Hosts or relays correlate one person across services because the same prism id and device keys appear everywhere.','Each host sees only its own persona: a separate prism with per-device persona keys; the main prism log travels sealed between members and is never given to a host.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['nonMemberSeesOnlyPublished','singleIdentityBoundaryPrivate']], + ['PrismLogFlooding','prismId','denialOfService','high','major','A peer or relay sends oversized sync messages or very large logs to exhaust memory and signature checks.','Byte and record bounds are checked before parsing and signature work; unknown records never become authority.','tests/prism-id.test.js','docs/prism-id-threat-model.md',[]], + ['PrismLogTampering','prismId','tampering','high','major','A relay or peer alters, reorders or injects prism log records.','Each record is signed and addressed by the kappa of its envelope; merge is order-independent set union; invalid or foreign records are ignored.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['invalidBindSignatureRefused','unlinkedSignerCannotBind']], + ['PrismMutualRevocation','prismId','denialOfService','medium','major','A thief holding one member device revokes every other device, or replaces the recovery device.','Recovery revocations take precedence: a device recovery revoked has no revocations that count, members cannot revoke or replace the recovery device, and recovery revokes every other device ever linked.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['revokedByRecoveryCannotRevoke','memberCannotRevokeRecovery','memberCannotReplaceRecovery']], + ['PrismOriginScript','prismId','elevationOfPrivilege','medium','critical','Script running in the prism origin (XSS, compromised dependency or static host) uses device key handles and reads the boundary keyring.','Device keys are non-extractable; a hardened device keeps only non-extractable derived boundary keys and cannot link members or set up recovery, so script can copy no key out; actions a host marks need a user-verified WebAuthn assertion over exactly that action body, which script cannot make without the person.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['hardenedDeviceCannotShare','unverifiedApprovalRefused','approvalOfOtherActionRefused','forgedApprovalRefused']], + ['PrismRekeyWithholding','prismId','denialOfService','medium','minor','A rotation never reaches an offline member, so it cannot seal new content.','A device without the current key refuses to seal instead of sealing to the old key; a publish under the previous key delivers the rotation.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['staleBoundaryKeyRefused']], + ['PrismRepudiation','prismId','repudiation','low','minor','A person denies that one of their devices took an action.','Every action and administrative record is signed by a device bound in the prism log; software keys reachable by origin script remain a residual.','tests/prism-id.test.js','docs/prism-id-threat-model.md',[]], + ['PrismRogueBind','prismId','elevationOfPrivilege','high','critical','A non-member, a delegate, or a revoked device signs a bind to add a device under its control.','A bind counts only from a linked, unrevoked member with a valid signature for this prism; revocation wins over a concurrent bind.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['unlinkedSignerCannotBind','delegateCannotBind','invalidBindSignatureRefused']], + ['PrismStolenDevice','prismId','informationDisclosure','medium','critical','A lost or stolen member device keeps reading new private content and following sync.','Revocation rotates the private boundary key, wraps it only to remaining members and moves the sync topic; stale keys are refused.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['revokedDeviceCannotSign','revokedDeviceActionRefused','staleBoundaryKeyRefused']], + ['PrismSyncObservation','prismId','informationDisclosure','high','major','Bus relays and federation nodes read sync content or infer it from message sizes.','Sync topic is an HMAC under a derived boundary key; every message is AES-GCM sealed, bound to the prism id and padded to a power-of-two bucket; constant-cadence sync sends one message of one size per interval, real or cover; network addresses remain observable.','tests/prism-id.test.js','docs/prism-id-threat-model.md',[]] +, + ['PrismGuardianCollusion','prismId','elevationOfPrivilege','low','critical','Guardians pool their shares to take over the prism.','Shares meet only at the threshold; guardians are other prisms or devices the person chose; a successful recovery is visible to every remaining device as revocations.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['belowThresholdRefused','zeroThresholdRefused']], + ['PrismGuardianDeception','prismId','spoofing','medium','critical','An impostor asks guardians to release shares to the impostor device.','A guardian releases a share only re-wrapped to the requesting device after confirming the person out of band and comparing a code bound to that device; one deceived guardian is below the threshold.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['belowThresholdRefused']], + ['PrismPersonaHijack','prismId','elevationOfPrivilege','medium','major','A revoked member keeps acting at a host through its persona key, or uses persona recovery keys it once saw.','Revoking a device revokes its persona keys at every host on the next sync; persona recovery keys are wrapped to the main recovery device and kept by no member.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['revokedDeviceActionRefused','revokedDeviceCannotSign']], + ['PrismQuantumForgery','prismId','spoofing','low','critical','A future quantum adversary forges P-256 signatures to bind a device or sign actions.','Every record and action from a device with an ML-DSA-65 key also carries an ML-DSA signature; verifiers with ML-DSA refuse a missing or invalid one, and hosts can refuse verifiers without it.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['postQuantumSignatureStripRefused','classicalSignatureAlwaysRequired']], + ['PrismQuantumHarvest','prismId','informationDisclosure','medium','critical','Wraps recorded today are decrypted later by a quantum adversary.','Every wrap to a device that advertises ML-KEM-768 is hybrid ECDH plus ML-KEM; a classical wrap to such a device is refused; content keys are AES-256.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['postQuantumDowngradeRefused']], + ['PrismRecoveryLoss','prismId','denialOfService','medium','critical','Every member device is lost, so the prism is lost.','Threshold recovery: the recovery key exists only as shares sealed to guardians; with no surviving copy of the log, recovery rebuilds it from sealed sync the substrate retained by following the rotations wrapped to the recovery device; it binds a new device, revokes the rest, carries personas and rotates itself.','tests/prism-id.test.js','docs/prism-id-threat-model.md',['belowThresholdRefused','memberCannotRevokeRecovery']] + ].sort((a,b)=>a[0]b[0]?1:0); + const assetIds=[...new Set(threatRows.map(r=>r[1]))].sort(); + const prismIdSource=read('app/src/Stitch/PrismId.lex.tex'); + const security=threatRows.map(([id,asset,category,likelihood,impact,threat,control,test,source,proofs=[]],index)=>({id,asset,category,likelihood,impact,threat,control,evidence:[test,source],proofs:proofs.map(name=>{if(!prismIdSource.includes(` name: ${name},\n`))fail(`missing proof ${name}`);return `Stitch.PrismId::${name}`;}),index,assessment:'Conservative qualitative design assessment. High: directly supplied adversarial input; medium: environmental/host privilege or failure required. Impact describes possible consequence, not probability.'})); + body=[def('assessmentPolicy','String',q('Likelihood and impact are explicit conservative qualitative engineering assessments, not observed probabilities, numeric risk scores or certification. Named gates are evidence procedures, not assertions that a run passed. Residual host/crypto/storage assumptions remain open.'))]; + assetIds.forEach((id,i)=>{body.push(row('asset'+cap(id),S+'Asset',{index:i,componentIndex:component(id).index}));body.push(row('modeledAsset'+cap(id),T+'ModeledAsset',{asset:'Product.Security::asset'+cap(id),name:id,text:component(id).text}));}); + security.forEach(r=>{ + for(const path of r.evidence)read(path); + body.push(row('threat'+r.id,S+'Threat',{index:r.index})); + body.push(row('risk'+r.id,S+'Risk',{index:r.index,assetIndex:assetIds.indexOf(r.asset),threatIndex:r.index,likelihood:ctor(S+'Likelihood.'+r.likelihood),impact:ctor(S+'Impact.'+r.impact)})); + body.push(row('control'+r.id,S+'ApplicationSecurityControl',{index:r.index,riskIndex:r.index})); + body.push(row('activity'+r.id,S+'SecurityActivity',{index:r.index,controlIndex:r.index})); + body.push(row('modeledThreat'+r.id,T+'ModeledThreat',{threat:'Product.Security::threat'+r.id,name:r.id,text:r.threat,category:ctor(T+'Stride.'+r.category)})); + const evidence=[...r.evidence.map((path,i)=>raw(record(T+'Evidence',{kind:ctor(T+'EvidenceKind.'+(i?'review':'gate')),reference:path}))),...r.proofs.map(name=>raw(record(T+'Evidence',{kind:ctor(T+'EvidenceKind.proof'),reference:name})))]; + body.push(row('modeledControl'+r.id,T+'ModeledControl',{control:'Product.Security::control'+r.id,name:r.id,text:r.control,evidence:raw(list(T+'Evidence',evidence))})); + body.push(row('mapping'+r.id,T+'ThreatMapping',{threat:'Product.Security::threat'+r.id,controls:raw(list('String',['Product.Security::control'+r.id]))})); + }); + body.push(row('controlSet',T+'ControlSet',{title:'Stitch scoped adversarial boundaries',text:'Traceable prevention, refusal and recovery procedures; residual assumptions are retained in Product.Model.',version:JSON.parse(read('package.json')).version,lastModified:'2026-11-13T00:00:00Z'})); + emit('Security','security and threat model',['Foundation.Sec','Production.ThreatModel','Product.Architecture'],body,['app/src/Product/Model.lex.tex','app/src/Product/Architecture.lex.tex','package.json',...security.flatMap(r=>r.evidence)],security.length*7+assetIds.length*2+1); + // Measurable limits come from the implementation; zero-defect obligations are + // requirements, not observations. Unmeasured browser/field qualities stay open. + const replay=read('src/layer4-compute/replay.js'); + const constant=name=>{const m=new RegExp(`export const ${name} = (\\d+);`).exec(replay);if(!m)fail(`missing source bound ${name}`);return Number(m[1]);}; + const quality=[ + {id:'ActionCoverage',characteristic:'FunctionalSuitability',sub:'FunctionalCompleteness',threshold:actions.length,unit:'modeled actions',method:'Count Product.Experience Action definitions, require one official Feature per action.',source:EXPERIENCE,evidence:'tests/product-facets.test.js',kind:'derived'}, + {id:'ComponentCoverage',characteristic:'Maintainability',sub:'Modularity',threshold:components.length,unit:'components',method:'Every actual architecture component is represented in the design view.',source:'app/src/Product/Architecture.lex.tex',evidence:'tests/product-facets.test.js',kind:'derived'}, + {id:'ProgramInstructions',characteristic:'PerformanceEfficiency',sub:'Capacity',threshold:constant('MAX_PROGRAM_STEPS'),unit:'instructions',method:'Configured acceptance ceiling, not observed capacity or performance.',source:'src/layer4-compute/replay.js',evidence:'tests/primitive-operations.test.js',kind:'configured'}, + {id:'ProgramWork',characteristic:'PerformanceEfficiency',sub:'Capacity',threshold:constant('MAX_PROGRAM_WORK'),unit:'abstract work units',method:'Model-derived work charged before replay; does not meter VM/browser/TLS overhead.',source:'src/layer4-compute/replay.js',evidence:'tests/runtime-admission.test.js',kind:'configured'}, + {id:'TermWidth',characteristic:'PerformanceEfficiency',sub:'Capacity',threshold:constant('MAX_TERM_BITS'),unit:'bits',method:'Explicit parsing/memory envelope, not an upstream ring semantic limit.',source:'src/layer4-compute/replay.js',evidence:'tests/primitive-operations.test.js',kind:'configured'}, + {id:'ForgedCheckpoints',characteristic:'Security',sub:'Integrity',threshold:0,unit:'accepted impossible checkpoints',method:'Zero-defect requirement exercised by adversarial replay tests.',source:'docs/prism-model.md',evidence:'tests/execution-identity.test.js',kind:'requirement'}, + {id:'UnknownWriteReplay',characteristic:'Reliability',sub:'Recoverability',threshold:0,unit:'blind retries of unknown DNS writes',method:'Unknown publication permits read-only reconciliation, never another mutation.',source:'docs/browser-authority.md',evidence:'tests/dns-publication.test.js',kind:'requirement'}, + {id:'AuthorityRollback',characteristic:'Security',sub:'Authenticity',threshold:0,unit:'accepted stale or foreign trust transitions',method:'Exact saved head comparison and independent writer/digest acceptance.',source:'docs/browser-authority.md',evidence:'tests/browser-authority-lifecycle.test.js',kind:'requirement'}, + {id:'SilentEvidencePromotion',characteristic:'InteractionCapability',sub:'SelfDescriptiveness',threshold:0,unit:'unknown host outcomes displayed as verified',method:'Persistent evidence labels distinguish digest, replay, unknown effects and unqualified hosts.',source:EXPERIENCE,evidence:'tests/product-experience.test.js',kind:'requirement'}, + {id:'SourceDrift',characteristic:'Maintainability',sub:'Testability',threshold:0,unit:'unregenerated model or facet outputs',method:'Regeneration must reproduce committed output bytes.',source:'scripts/check-facets.mjs',evidence:'tests/product-facets.test.js',kind:'requirement'} + ].sort((a,b)=>a.id.localeCompare(b.id,'en')); + const characteristics=[...new Set(quality.map(x=>x.characteristic))].sort(),subs=[...new Set(quality.map(x=>x.sub))].sort();body=[]; + characteristics.forEach((name,index)=>body.push(row('characteristic'+name,Q+'ProductQualityCharacteristic',{index}))); + subs.forEach((name,index)=>body.push(row('subcharacteristic'+name,Q+'QualitySubcharacteristic',{index,characteristicIndex:characteristics.indexOf(quality.find(x=>x.sub===name).characteristic)}))); + body.push(structure('MeasureContract',{requirement:'String',unit:'String',method:'String',source:'String',evidence:'String',kind:'String',observed:'Bool'})); + quality.forEach((r,index)=>{body.push(row('requirement'+r.id,Q+'QualityRequirement',{index,subcharacteristicIndex:subs.indexOf(r.sub)}));body.push(row('measure'+r.id,Q+'QualityMeasure',{index,requirementIndex:index,threshold:r.threshold}));body.push(row('contract'+r.id,'MeasureContract',{requirement:'Product.Quality::requirement'+r.id,unit:r.unit,method:r.method,source:r.source,evidence:r.evidence,kind:r.kind,observed:false}));}); + body.push(def('openQualities','(List String)',list('String',['Physical NAT topology coverage and independent failure domains','Eviction/device-loss durability','Accessibility across supported assistive technologies','User comprehension, task completion time and satisfaction','Whole-host refinement and native artifact acceptance on the exact release revision']))); + emit('Quality','quality requirements and open measurements',['Foundation.Qual'],body,[...quality.flatMap(r=>[r.source,r.evidence])],quality.length*3+characteristics.length+subs.length); + // Existing Stitch identity is the source of the experience layer: no borrowed + // characters, palette, account issuer or brand promise. + const css=/\s*:root\s*\{([^}]+)\}/.exec(document)?.[1]??fail('missing Stitch token source'); + const tokens=[...css.matchAll(/--([a-z-]+):\s*([^;]+);/g)].map(m=>({name:m[1],value:m[2].trim(),type:m[2].trim().startsWith('#')?'color':'fontFamily',source:'index.html'})); + const readerCss=read('site/site.css'); + const readerRoot=/:root\s*\{([^}]+)\}/.exec(readerCss)?.[1]??fail('missing reader token source'); + tokens.push(...[...readerRoot.matchAll(/--([a-z-]+):\s*([^;]+);/g)].map(m=>({name:m[1],value:m[2].trim(),type:m[2].trim().startsWith('#')?'color':'fontFamily',source:'site/site.css'}))); + if(new Set(tokens.map(t=>t.name)).size!==tokens.length)fail('duplicate design token'); + if(!['bg','panel','fg','muted','font'].every(n=>tokens.some(t=>t.name===n)))fail('incomplete Stitch palette'); + const rgb=hex=>[1,3,5].map(i=>parseInt(hex.slice(i,i+2),16)/255); + const lum=hex=>rgb(hex).map(c=>c<=0.04045?c/12.92:((c+0.055)/1.055)**2.4).reduce((v,c,i)=>v+c*[0.2126,0.7152,0.0722][i],0); + const contrasts=[['fg','bg'],['fg','panel'],['muted','panel'],['accent','bg'],['site-muted','bg']].map(([fg,bg])=>{ + const a=lum(tokens.find(t=>t.name===fg).value),b=lum(tokens.find(t=>t.name===bg).value); + return {foreground:fg,background:bg,observedMilli:Math.floor((Math.max(a,b)+0.05)/(Math.min(a,b)+0.05)*1000),requiredMilli:4500,scope:'Declared opaque text colors only; not whole-page WCAG conformance.'}; + }); + const promise=JSON.parse(read('package.json')).description; + const brand={name:'Stitch',promise,tokens,contrasts,scope:'Stitch own dark technical surface, monospace operator workbench and source-owned reader accent palette. No inherited Prism-DevRel or UORust character or theme.'}; + body=[row('authority',E+'Authority',{framework:'Wheeler brand identity; W3C Design Tokens; WCAG 2.2 SC 1.4.3 for the listed opaque text pairs only',repository:'https://github.com/Syntra-Labs/stitch',commit:'the exact revision of the cited sources'})]; + const brandSources=['index.html','package.json','site/site.css']; + body.push(def('brandSources',`(List ${E}Source)`,list(E+'Source',brandSources.map(path=>raw(record(E+'Source',{record:'Product.Brand',path,firstLine:0,lastLine:0,kappa:sourceKappa(path,read(path))})))))); + body.push(def('elements',`(List ${E}BrandElement)`,list(E+'BrandElement',[ + raw(record(E+'BrandElement',{kind:ctor(E+'BrandElementKind.productName'),text:'Stitch',source:1})), + raw(record(E+'BrandElement',{kind:ctor(E+'BrandElementKind.productPromise'),text:promise,source:1})), + raw(record(E+'BrandElement',{kind:ctor(E+'BrandElementKind.typography'),text:tokens.find(t=>t.name==='font').value,source:0})), + raw(record(E+'BrandElement',{kind:ctor(E+'BrandElementKind.palette'),text:tokens.filter(t=>t.type==='color').map(t=>`${t.name} ${t.value}`).join('; '),source:0})) + ]))); + body.push(def('tokens',`(List ${E}DesignToken)`,list(E+'DesignToken',tokens.map(t=>raw(record(E+'DesignToken',{name:t.name,type:ctor(E+'TokenType.'+t.type),value:t.value,hex:t.type==='color'?t.value:'',source:brandSources.indexOf(t.source)})))))); + body.push(def('contrasts',`(List ${E}ContrastPair)`,list(E+'ContrastPair',contrasts.map(c=>raw(record(E+'ContrastPair',{foreground:tokens.findIndex(t=>t.name===c.foreground),background:tokens.findIndex(t=>t.name===c.background),backgroundAlphaMilli:1000,criterion:ctor(E+'ContrastCriterion.text'),observedMilli:c.observedMilli,requiredMilli:c.requiredMilli,source:0})))))); + body.push(def('contrastScope','String',q('These are arithmetic observations over the listed declared opaque text pairs. Focus, disabled states, overlays, browser rendering, user agents and assistive technologies need independent checks. A missing or failing pair cannot establish whole-page accessibility.'))); + emit('Brand','brand and design system',['Foundation.Experience.V1.Model'],body,brandSources,4+tokens.length+contrasts.length); + // Context of use connects real stakeholder declarations to meaningful paths. + // Test inventory and task counts are not usability observations. + const stakeholders=p.architecture.filter(x=>x.type===A+'Stakeholder').sort((a,b)=>a.index-b.index); + body=[row('authority',E+'Authority',{framework:'ISO 9241-11 context of use and ISO 9241-210 human-centred design',repository:'https://github.com/Syntra-Labs/stitch',commit:'the exact revision of the cited sources'})]; + body.push(def('groups',`(List ${E}UserGroup)`,list(E+'UserGroup',stakeholders.map(s=>raw(record(E+'UserGroup',{stakeholder:call('Product.Architecture::'+s.declaration),characteristics:s.text})))))); + const goals=journeyRows.map(j=>({user:stakeholders.find(s=>s.declaration===(j.actor??'operator'))?.index??fail(`unknown journey actor ${j.actor}`),journey:j.declaration,outcome:j.summary,id:j.id,steps:j.steps})); + body.push(def('goals',`(List ${E}Goal)`,list(E+'Goal',goals.map(g=>raw(record(E+'Goal',{user:g.user,journey:call(g.journey),outcome:g.outcome})))))); + const tasks=goals.flatMap((g,i)=>g.steps.map((feature,order)=>({goal:i,order,feature}))); + body.push(def('tasks',`(List ${E}Task)`,list(E+'Task',tasks.map(t=>raw(record(E+'Task',{goal:t.goal,order:t.order,feature:call(t.feature)})))))); + body.push(def('environments',`(List ${E}Environment)`,list(E+'Environment',['browser','runtimeHost','peers','staticHost'].map(id=>raw(record(E+'Environment',{kind:ctor(E+'EnvironmentKind.technical'),component:call(arch(id))})))))); + const measures=goals.flatMap((_,goal)=>['effectiveness','efficiency','satisfaction'].map(outcome=>({goal,outcome,observed:null,method:'open: no user study on this exact product revision; acceptance tests and task counts are not usability observations'}))); + body.push(def('measures',`(List ${E}UsabilityMeasure)`,list(E+'UsabilityMeasure',measures.map(m=>raw(record(E+'UsabilityMeasure',{goal:m.goal,outcome:ctor(E+'UsabilityOutcome.'+m.outcome),observed:raw('(ctor Option.none [Nat])'),method:m.method})))))); + body.push(def('contextNotes','(List String)',list('String',[ + 'Reader: explain object identity, fragment reconstruction, custody conditions and pure replay before mesh participation; no user comprehension result is asserted.', + 'Reviewer: inspect source-bound facet catalog, exact verification artifacts and residual assumptions; a source inventory is not a proof result.', + 'System integrator: locate five-layer contracts, action guards, host effects and extension boundaries without inferring durable storage or consensus.' + ]))); + const users={groups:stakeholders.map(s=>({id:s.declaration,characteristics:s.text})),goals,tasks,measures}; + body.push(`definition{\n name: goalsHaveUsers,\n parameters: [items : (List ${E}Goal), users : Nat],\n result: Bool,\n body: (match items\n | List.nil => true\n | List.cons head rest => (((project head user) true\n | List.cons head rest => (((project head goal) false | List.cons head rest => true)\n}\n`); + body.push(`definition{\n name: tasksHaveAcceptance,\n parameters: [items : (List ${E}Task)],\n result: Bool,\n body: (match items\n | List.nil => true\n | List.cons head rest => ((nonemptyAcceptance (project (project head feature) acceptance)) && (tasksHaveAcceptance rest))),\n recursive_argument: items\n}\n`); + body.push(theorem('everyGoalNamesAUser',`(goalsHaveUsers (goals) ${stakeholders.length})`)); + body.push(theorem('everyTaskNamesAGoal',`(tasksHaveGoals (tasks) ${goals.length})`)); + body.push(theorem('everyTaskNamesAcceptanceEvidence','(tasksHaveAcceptance (tasks))')); + emit('Users','context of use and usability',['Foundation.Arch','Foundation.Experience.V1.Model','Product.Architecture','Product.Features'],body,['app/src/Product/Architecture.lex.tex',EXPERIENCE,'docs/operator-experience.md'],stakeholders.length+goals.length+tasks.length+measures.length+4); + // Persistence inventory exposes what automation can restore without creating + // trust, dropping unknown writes, or pretending volatile bytes are durable. + const persistence=[ + {id:'SavedSigner',storage:'Origin IndexedDB nonextractable CryptoKey',restore:'Startup restores only a valid active existing record.',automatic:true,trust:'Missing, malformed or revoked records never authorize automatic replacement.',failure:'Origin eviction or device loss can destroy the only key.',source:'src/layer1-uor/browser-authority.js',evidence:'tests/browser-authority.test.js'}, + {id:'TrustedHead',storage:'Origin IndexedDB exact name/key/digest with history',restore:'Admitted successors persist by exact CAS before the live head changes; live restore is explicit.',automatic:false,trust:'Independent exact key and recent digest acceptance is not derived from a self-signature.',failure:'Storage failure preserves the previous live head; total loss requires independent recent evidence.',source:'src/layer1-uor/browser-authority.js',evidence:'tests/pointer-recovery.test.js'}, + {id:'UnknownPublication',storage:'Origin IndexedDB strict write-ahead intent',restore:'Load the exact scoped candidate and perform read-only reconciliation.',automatic:false,trust:'No timer takeover, blind retry or deletion of unresolved intent.',failure:'An absent provider read does not prove the old mutation never occurred.',source:'src/layer1-uor/browser-authority.js',evidence:'tests/dns-publication.test.js'}, + {id:'ObjectCustody',storage:'Session RAM plus conditionally reachable peer fragments',restore:'Automatically verify received bytes; repair only within admitted budgets and checked receipts.',automatic:true,trust:'Different peer IDs do not prove failure-domain independence or future retention.',failure:'All-byte loss cannot be repaired; local storage persistence does not make object cache durable.',source:'src/layer3-storage/custody.js',evidence:'tests/placement-repair.test.js'}, + {id:'PureCheckpoint',storage:'Session state or explicitly exported recovery bundle',restore:'Every received checkpoint is replayed against its exact program/input/execution identity.',automatic:true,trust:'Replay does not grant exclusive execution or prove arbitrary guest effects.',failure:'Older execution identities are refused without explicit revalidation.',source:'src/layer4-compute/replay.js',evidence:'tests/execution-identity.test.js'}, + {id:'RecoveryVault',storage:'Session-only checked vault and user-saved external file',restore:'Verify complete bundle atomically; export strips accepted-trust status.',automatic:false,trust:'Imported keys and anchors are supplied evidence, not trusted authority.',failure:'External export is not a durability certificate; stale/conflicting imports refuse.',source:'src/recovery.js',evidence:'tests/recovery.test.js'}, + {id:'BudgetLedger',storage:'Session-local epochs plus explicit history export',restore:'Unknown effects remain charged; renewal is a deliberate new allowance.',automatic:false,trust:'No automatic refund or epoch rollover.',failure:'Browser reload is not durable preservation of the budget ledger.',source:'src/layer2-schedulers/policy.js',evidence:'tests/runtime-admission.test.js'}, + {id:'VmCommand',storage:'Retained host command handles and observed lifecycle',restore:'Observe the selected old command result without dispatching it again.',automatic:false,trust:'A timeout is an unknown outcome, not cancellation or rollback.',failure:'Stop/destroy are pending until host confirmation; external effects are not reversible.',source:'src/layer4-compute/vm-administration.js',evidence:'tests/vm-administration.test.js'} + ]; + body=[structure('Mechanism',{id:'String',storage:'String',restore:'String',automatic:'Bool',trust:'String',failure:'String',source:'String',evidence:'String'})]; + persistence.forEach(r=>body.push(row('mechanism'+r.id,'Mechanism',r))); + body.push(def('mechanisms','(List Mechanism)',list('Mechanism',persistence.map(r=>call('mechanism'+r.id))))); + body.push(`definition{\n name: restoreExistingSignerAllowed,\n parameters: [present : Bool, valid : Bool, revoked : Bool, storageAvailable : Bool],\n result: Bool,\n body: (present && (valid && ((not revoked) && storageAvailable)))\n}\n`); + body.push(`theorem{\n name: absentSignerIsNeverRestored,\n parameters: [],\n statement: (forall (valid : Bool), (forall (revoked : Bool), (forall (available : Bool), ((restoreExistingSignerAllowed false valid revoked available) = false)))),\n proof: decide{}\n}\n`); + body.push(`theorem{\n name: revokedSignerIsNeverRestored,\n parameters: [],\n statement: (forall (present : Bool), (forall (valid : Bool), (forall (available : Bool), ((restoreExistingSignerAllowed present valid true available) = false)))),\n proof: decide{}\n}\n`); + body.push(theorem('unknownPublicationRetainsReadOnlyBoundary','(not (Stitch.Effects::dnsMayWritePhase (ctor Stitch.Effects::DnsPhase.Unknown)))')); + body.push(theorem('unknownPublicationOffersReconciliation','(Stitch.Effects::dnsMayReconcile (ctor Stitch.Effects::DnsPhase.Unknown))')); + body.push(def('identitySeparation','String',q('Object commitments, peer transport keys, saved Ed25519 name authority and human account identity are distinct. No new account issuer, passkey registry, cross-device trust synchronization or private-key backup is implemented by these facets.'))); + emit('Persistence','identity persistence and safe automation',['Stitch.Effects'],body,[...persistence.flatMap(r=>[r.source,r.evidence]),'docs/browser-authority.md','docs/recovery.md'],persistence.length); + const release={version:JSON.parse(read('package.json')).version,deployments:p.deployments.map(d=>({id:d.id,entry:d.entry,requiredCapabilities:d.requiredCapabilities})),assets:p.assets.map(a=>({path:a.path,source:a.source??'',licenseStatus:a.licenseStatus,redistributionCleared:a.redistributionCleared})),gate:'.github/workflows/prism.yml',boundary:'Static publication, source verification, native artifact acceptance and browser qualification are distinct. This inventory reports no current pass result.'}; + body=[structure('Artifact',{path:'String',licenseStatus:'String',materialsRecorded:'Bool'}),structure('Deployment',{id:'String',entry:'String',capabilities:'(List String)'}),def('version','String',q(release.version))]; + release.assets.forEach((a,i)=>body.push(row('artifact'+String(i).padStart(3,'0'),'Artifact',{path:a.path,licenseStatus:a.licenseStatus,materialsRecorded:a.redistributionCleared}))); + release.deployments.forEach(d=>body.push(row('deployment'+cap(d.id),'Deployment',{id:d.id,entry:d.entry,capabilities:raw(list('String',d.requiredCapabilities))}))); + body.push(def('gate','String',q(release.gate)));body.push(def('releaseBoundary','String',q(release.boundary))); + body.push(def('releaseRequirements','(List String)',list('String',[ + 'Regenerate source bindings, every product facet and the exact product artifact inventory before qualification.', + 'Run exact pinned LexLean source/lock checks, Lean and leanchecker with observed axiom policy; retain original verifier records.', + 'Run full pinned PrismPM native artifact and acceptance-vector gates; source-only acceptance does not replace them.', + 'Run runtime, independent custody vectors, Rust conformance and actual Chromium workflows on the submitted revision.', + 'Publish the complete same-origin UI and dependency set with source/license materials; do not replace the product with its pure probe.', + 'Rollback uses a complete prior asset set and retains unknown-effect journals. Browser/provider/NAT assumptions and unsupported platforms remain explicit.' + ]))); + emit('Release','release and deployment contract',[],body,['package.json','app/src/Product/Model.lex.tex','.github/workflows/prism.yml','vendor/distribution.json','docs/product-projection.md','docs/vendor-provenance.md'],release.assets.length+release.deployments.length); + const compliance=[ + ['Architecture','ISO/IEC/IEEE 42010','Represent every component, flow, stakeholder and concern with traceable viewpoints.','app/src/Product/Architecture.lex.tex','scripts/check-product.mjs'], + ['Design','ISO/PAS 19450 and UML 2.5.1','Provide OPM object/process and UML component, sequence and state-machine views; views remain conditional on real domain predicates.','app/src/Product/Design.lex.tex','scripts/check-facets.mjs'], + ['Features','Prism official feature and journey facets','Every existing action has a declared call and named acceptance evidence; each journey names declared features.','app/src/Product/Features.lex.tex','tests/product-facets.test.js'], + ['ThreatModel','ISO 27034, ISO 27005 and STRIDE','Give every threat a traceable control/evidence path while retaining qualitative assessment and residual host assumptions.','app/src/Product/Security.lex.tex','tests/product-facets.test.js'], + ['Quality','ISO/IEC 25010:2023','Distinguish source-derived counts, configured limits, zero-defect obligations and unmeasured observations.','app/src/Product/Quality.lex.tex','tests/product-facets.test.js'], + ['CanonicalBytes','RFC 8785','Canonical JSON and framed commitments are checked at byte boundaries.','docs/canonical-json.md','tests/canonical-json.test.js'], + ['Dns','RFC 1035, RFC 8484 and provider contracts','DNS wire decoding and full multipart pointer publication retain exact scope and unknown-effect reconciliation.','docs/dns-client.md','tests/dns-wire.test.js'], + ['IdentityPersistence','Origin storage and WebCrypto contracts','Restore only existing active saved identity; do not infer trust from supplied data or recover keys after total loss.','docs/browser-authority.md','tests/browser-authority-lifecycle.test.js'], + ['ContextOfUse','ISO 9241-11 and ISO 9241-210','Connect stakeholders to goals, tasks and environments; unmeasured effectiveness, efficiency and satisfaction remain open.','app/src/Product/Users.lex.tex','tests/product-facets.test.js'], + ['Brand','Wheeler; W3C Design Tokens; scoped WCAG 2.2 measurements','Preserve Stitch identity and source its design tokens. Listed contrast measurements are not whole-page accessibility conformance.','app/src/Product/Brand.lex.tex','tests/product-facets.test.js'], + ['Distribution','Dependency source and license obligations','Keep exact asset identity and accompanying materials, separately from security/qualification evidence.','docs/vendor-provenance.md','tests/guest-qualification.test.js'], + ['Release','Pinned SDK and exact-revision acceptance','Source, native artifact, runtime, hosted browser and field qualification are distinct gates.','docs/product-projection.md','.github/workflows/prism.yml'] + ].map(([id,standard,obligation,source,evidence])=>({id,standard,obligation,source,evidence,status:'Documented obligation and named evidence procedure; not an external compliance certification.'})); + body=[structure('Obligation',{id:'String',standard:'String',obligation:'String',source:'String',evidence:'String',status:'String'})]; + compliance.forEach(r=>body.push(row('obligation'+r.id,'Obligation',r))); + body.push(def('obligations','(List Obligation)',list('Obligation',compliance.map(r=>call('obligation'+r.id))))); + body.push(def('scope','String',q('Standards organize and test the product model; these declarations do not assert organizational, legal, security or whole-browser certification. Evidence is qualified only by its exact observed run and stated scope.'))); + emit('Compliance','standards and evidence obligations',[],body,[...compliance.flatMap(r=>[r.source,r.evidence]).filter(p=>!outputs.has(p))],compliance.length); + // Every generated module is inventoried by actual declaration counts, and its + // sources are complete files. Zero/zero deliberately does not claim a span. + for(const m of modules) { + const text=outputs.get(m.path); + m.records=(text.match(/\bbody: \(record /g)||[]).length; + m.declarations=(text.match(/^(?:definition|structure|inductive|theorem)\{/gm)||[]).length; + m.sha256=hash(text); + } + const moduleTexts=new Map(modules.map(m=>[m.module,outputs.get(m.path)])); + moduleTexts.set('Product.Architecture',read('app/src/Product/Architecture.lex.tex')); + moduleTexts.set('Product.Experience',experience); + moduleTexts.set('Foundation.Arch',read('app/src/Foundation/Arch.lex.tex')); + validateFacetLexicons(read,moduleTexts); + validateFacetReferences(moduleTexts); + for(const s of stakeholders)if(!goals.some(g=>g.user===s.index))fail(`stakeholder has no typed goal ${s.declaration}`); + const provenance=JSON.parse(read('product/facet-type-provenance.json')); + for(const item of provenance.types)if(hash(read(item.path))!==item.derivedSha256)fail(`modified reference type ${item.path}`); + read('product/UORUST-LICENSE-MIT.txt');read('scripts/check-facets.mjs');read('scripts/facet-projection.mjs'); + const catalog={format:'stitch/product-facets/1',assurance:'Source-derived product inventory and obligations, not a verification receipt or whole-product certificate.',sourceConvention:'Source firstLine=0,lastLine=0 means SHA-256 of the complete UTF-8 file bytes, not a precise source span.',references:[REF+'scripts/self-model/facets.py','https://github.com/afflom/prism-devrel/blob/7b6c54bb6e34f3b970f70d50127ab520367b84ac/scripts/experience/experience.py'],sources:[...sources].sort(([a],[b])=>a.localeCompare(b,'en')).map(([path,sha256])=>({path,sha256})),modules,operatorActionCount:actions.length,features,journeys:journeyRows,design,security,quality,brand,users,persistence,release,compliance}; + outputs.set('product/facets.json',JSON.stringify(catalog,null,2)+'\n'); + const summaries={Features:'Every live operator action and its guarded journey, linked to executable evidence.',Design:'The five-layer component graph, object process, publication sequence and unknown-write state machine.',Security:'Assets, STRIDE threats, qualitative risk assessments and traceable controls without false pass claims.',Quality:'Source-derived coverage, configured resource limits, zero-defect requirements and open observations.',Brand:'Stitch own palette, typography and scoped text-contrast measurements.',Users:'Real user groups, goals, tasks and environments; usability studies remain open.',Persistence:'What restores automatically, what remains volatile, and which trust decisions and effect outcomes require explicit handling.',Release:'Complete dependency/deployment inventory and separate source, native, runtime and browser qualification.',Compliance:'Named standards obligations, evidence procedures and explicit certification boundaries.'}; + outputs.set('site/facets.json',JSON.stringify({format:'stitch/site-facets/1',assurance:catalog.assurance,facets:modules.map(m=>({name:m.module,source:m.path,summary:summaries[m.module.split('.').at(-1)],count:m.declarations,evidenceStatus:'Source-derived inventory; exact-revision SDK and browser qualification required'}))},null,2)+'\n'); + return {outputs,catalog}; +} +export function checkFacets(base=root) { + const {outputs,catalog}=generateFacets(base); + for(const [path,expected]of outputs){if(!existsSync(resolve(base,path)))fail(`missing output ${path}`);if(readFileSync(resolve(base,path),'utf8')!==expected)fail(`stale output ${path}; run node scripts/check-facets.mjs --write`);} + return catalog; +} +export function writeFacets(base=root) { + const {outputs,catalog}=generateFacets(base); + for(const [path,text]of outputs){mkdirSync(dirname(resolve(base,path)),{recursive:true});writeFileSync(resolve(base,path),text);} + return catalog; +} +if(process.argv[1]&&resolve(process.argv[1])===fileURLToPath(import.meta.url)){ + const args=process.argv.slice(2);if(args.length>1||args.length&&!['--check','--write'].includes(args[0]))fail('usage: node scripts/check-facets.mjs [--check|--write]'); + const c=args[0]==='--write'?writeFacets():checkFacets(); + console.log(`Stitch facets ${args[0]==='--write'?'written':'fresh'}: ${c.modules.length} modules, ${c.features.length} features (${c.operatorActionCount} operator actions), ${c.security.length} threats. No verifier result asserted.`); +} diff --git a/scripts/check-model-sdk.sh b/scripts/check-model-sdk.sh new file mode 100755 index 0000000..58e89c3 --- /dev/null +++ b/scripts/check-model-sdk.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Run only inside the immutable SDK selected by prismpm.lock. +# --prepare is an authoring writer, never a release gate. It writes the source +# lock and canonical formatting. Axiom policies still require prism-code axioms. +set -eu +cd "$(dirname "$0")/.." +mode=${1:---check} +case "$mode" in --check|--prepare) ;; *) echo 'usage: scripts/check-model-sdk.sh [--check|--prepare]' >&2; exit 64;; esac +for tool in lexlean prismpm; do + command -v "$tool" >/dev/null 2>&1 || { echo "required pinned SDK executable missing: $tool" >&2; exit 69; } +done +[ -f /opt/prismpm/share/standards.lock ] || { echo 'not running in the PrismPM SDK' >&2; exit 69; } +cmp standards.lock /opt/prismpm/share/standards.lock || { echo 'SDK standards lock differs from repository lock' >&2; exit 2; } +prismpm lock check +if [ "$mode" = --prepare ]; then + (cd app && lexlean lock && lexlean fmt --all && lexlean lock && lexlean check) + echo 'Authoring output only. Audit exact axioms with prism-code@0.7.2 axioms --write --project app; review source and lock changes; regenerate JS bindings; then run --check.' + exit 0 +fi +node scripts/check-model.mjs --check +(cd app && lexlean fmt --check && lexlean lock --check) +# The pinned template uses this single owner for source checking, Lean/kernel +# replay, exact axiom audit, generated native code, holo and acceptance vectors. +# A preceding lexlean verify would repeat its proof gate. +prismpm --project app verify diff --git a/scripts/check-model-tests.mjs b/scripts/check-model-tests.mjs new file mode 100644 index 0000000..89ca225 --- /dev/null +++ b/scripts/check-model-tests.mjs @@ -0,0 +1,291 @@ +/** Implementation conformance and planted-defect checks, not a Lean substitute. */ +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { cpSync, mkdtempSync, readFileSync, writeFileSync, rmSync } from 'node:fs'; +import { spawnSync } from 'node:child_process'; +import { tmpdir } from 'node:os'; +import { resolve, dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { model, budgetReserveAllowed, budgetSettlementAllowed, pointerSuccessorAllowed, custodyCommitAllowed, checkpointLinkAllowed, modelSourceDigest } from '../src/layer1-uor/generated-model.js'; +const root=resolve(dirname(fileURLToPath(import.meta.url)),'..'); +const call=(name,...args)=>model['Stitch.'+name](...args); +const digest=Object.fromEntries(Array.from({length:8},(_,i)=>['w'+i,BigInt(i)])); +const initialReceipt=index=>({requestRoot:digest,manifestRoot:digest,fragmentRoot:digest,holderId:index,index,observedAt:0,leaseUntil:100,identityAuthenticated:true}); +const placement={manifestRoot:digest,revision:0,holder0:0,holder1:1,holder2:2,active0:true,active1:true,active2:true,receipt0:initialReceipt(0),receipt1:initialReceipt(1),receipt2:initialReceipt(2)}; +test('source binding metadata is explicit and rejects inexact Nat or Boolean inputs',()=>{ + assert.match(modelSourceDigest,/^sha256:[0-9a-f]{64}$/); + for(const value of [-1,1.5,NaN,Infinity,Number.MAX_SAFE_INTEGER+1,'1'])assert.throws(()=>budgetReserveAllowed(value,0,0,1,0,0,1),TypeError); + assert.throws(()=>budgetSettlementAllowed(1,1,1,1),TypeError); + assert.equal(budgetReserveAllowed(2n**64n-1n,0n,1n,2n**64n-1n,0n,0n,1n),false); +}); +test('every selected recovery pair agrees on the complete finite-stream corpus',()=>{ + const end={tag:'End',fields:[]}; + for(let length=0;length<=5;length++)for(let value=0;value<4**length;value++){ + let blocks=end,v=value; + for(let i=0;i>=2;} + for(const tag of ['Systematic','LeftParity','RightParity']){ + const selection={tag,fields:[]}; + assert.deepEqual(call('Fragments.decodePair',call('Fragments.encodeForPair',blocks,selection),selection),blocks); + } + } +}); +test('source budgets preserve charge and recovery transitions preserve valid custody',()=>{ + for(let spent=0;spent<=4;spent++)for(let reserved=0;reserved<=4;reserved++)for(let ceiling=0;ceiling<=5;ceiling++)for(let actual=0;actual<=6;actual++)for(const known of [true,false]){ + const afterSpent=call('Budget.settleSpent',spent,reserved,ceiling,actual,known),afterReserved=call('Budget.settleReserved',reserved,ceiling,actual,known); + assert.ok(afterSpent+afterReserved<=BigInt(spent+reserved)); + if(!known)assert.equal(afterReserved,BigInt(reserved)); + } + for(let active=0;active<8;active++){ + const p={...placement,active0:Boolean(active&1),active1:Boolean(active&2),active2:Boolean(active&4)}; + if(!call('Custody.recoverable',p))continue; + for(let index=0;index<=3;index++)for(let target=0;target<=3;target++)for(const committed of [true,false])assert.equal(call('Custody.recoverable',call('Custody.replaceIndex',p,index,target,committed)),true); + assert.equal(call('Custody.recoverable',call('Custody.retireFirst',p)),true); + } + assert.equal(call('Custody.physicalBytes',[{index:0,holder:0,byteLength:7,retained:true,superseded:true,externalRelay:false,manifestRoot:digest,fragmentRoot:digest,receipt:initialReceipt(0)},{index:1,holder:1,byteLength:9,retained:true,superseded:false,externalRelay:true,manifestRoot:digest,fragmentRoot:digest,receipt:initialReceipt(1)}]),16n); +}); +test('full-byte equality and every external-observation admission flag fail closed',()=>{ + const base={objectRoot:digest,representationRoot:digest,recoveredBytes:Uint8Array.of(0,1,255),expectedBytes:Uint8Array.of(0,1,255),decoderBound:true,dependenciesPresent:true}; + assert.equal(call('Encoding.exactRecovery',base),true); + assert.equal(call('Encoding.exactRecovery',{...base,expectedBytes:Uint8Array.of(0,1,254)}),false); + assert.equal(call('Encoding.exactRecovery',{...base,dependenciesPresent:false}),false); + assert.equal(custodyCommitAllowed(...Array(8).fill(true)),true); + for(let i=0;i<8;i++){const flags=Array(8).fill(true);flags[i]=false;assert.equal(custodyCommitAllowed(...flags),false);} + for(let i=0;i<3;i++){const flags=[true,true,true];flags[i]=false;assert.equal(pointerSuccessorAllowed(4,5,...flags,0,10,1),false);} + assert.equal(checkpointLinkAllowed(true,true,true,true,true,true,1,1,2),false); +}); + +test('the complete source checkpoint verifier replays values rather than trusting a replay flag',()=>{ + const job={jobRoot:digest,inputRoot:digest,initialValue:255,program:{programRoot:digest,modelRoot:digest,bits:8,instructions:[{opcode:4,argument:1},{opcode:2,argument:0}]}}; + const checkpoint={jobRoot:digest,programRoot:digest,inputRoot:digest,modelRoot:digest,step:2,priorRoot:digest,stateRoot:digest,checkpointRoot:digest,value:1}; + assert.equal(call('Compute.checkpointMatchesJob',job,checkpoint),true); + assert.equal(call('Compute.checkpointMatchesJob',job,{...checkpoint,value:2}),false); + assert.equal(call('Compute.checkpointMatchesJob',job,{...checkpoint,step:3}),false); + assert.equal(call('Compute.jobAllowed',job,2),true); + assert.equal(call('Compute.jobAllowed',job,1),false); +}); + +const rootAt=n=>Object.fromEntries(Array.from({length:8},(_,i)=>['w'+i,BigInt(n+i)])); +const resources=(transferBytes=0,storageBytes=0,computeWork=0,refreshRequests=0)=>({transferBytes,storageBytes,computeWork,refreshRequests}); +function migrationFixture(){ + const receipt={requestRoot:rootAt(10),manifestRoot:digest,fragmentRoot:rootAt(20),holderId:3,index:0,observedAt:10,leaseUntil:50,identityAuthenticated:true}; + const transfer={requestRoot:receipt.requestRoot,manifestRoot:receipt.manifestRoot,fragmentRoot:receipt.fragmentRoot,sourceHolder:0,targetHolder:3,index:0,placementRevision:0,phase:{tag:'Requested',fields:[]},receipt}; + const fragment={manifestRoot:digest,encodingRoot:rootAt(30),index:0,payloadRoot:receipt.fragmentRoot,payload:Uint8Array.of(1,2),byteLength:2}; + const custodyPlacement={...placement,receipt0:{...initialReceipt(0),fragmentRoot:rootAt(20)},receipt1:{...initialReceipt(1),fragmentRoot:rootAt(21)},receipt2:{...initialReceipt(2),fragmentRoot:rootAt(22)}}; + const state={objects:[],encodings:[],placement:custodyPlacement,peers:[],pointers:[],jobs:[],checkpoints:[],ledger:{budget:{epoch:0,start:0,end:100,last:0,limit:resources(100,100,100,100),spent:resources(),reserved:resources()},reservations:[]},evidence:[],transfers:[]}; + const integrity={fragmentRoot:receipt.fragmentRoot,encodingRoot:fragment.encodingRoot,index:fragment.index,payload:fragment.payload,digest:{expected:receipt.fragmentRoot,observed:receipt.fragmentRoot,domainMatches:true,canonicalSerializationMatches:true}}; + return {state,transfer,receipt,fragment,integrity,cost:resources(2,2,0,1)}; +} +test('generic action reservation and settlement preserve product validity and the nested ledger semantics',()=>{ + const fixture=migrationFixture(),unknown={actionId:rootAt(60),epoch:0,actual:resources(),outcome:{tag:'Unknown',fields:[]}}; + const state=call('System.settleAction',fixture.state,unknown,0); + for(const kind of ['Place','Repair','Refresh','Checkpoint','Reencode','PublishPointer'])for(let flags=0;flags<8;flags++)for(const now of [0,10,99,100])for(const cost of [resources(),resources(2,3,4,1),resources(101)]){ + const action={actionId:rootAt(60),kind:{tag:kind,fields:[]},cost,preconditionsChecked:Boolean(flags&1),dependenciesPresent:Boolean(flags&2),authorizationChecked:Boolean(flags&4)}; + const admitted=call('Custody.recoverableAt',state.placement,now)&&call('Budget.reserveLedgerAllowed',state.ledger,action.actionId,cost,now)&&action.preconditionsChecked&&action.dependenciesPresent&&action.authorizationChecked; + const expected={...state,ledger:admitted?call('Budget.reserveLedger',state.ledger,action.actionId,cost,now):state.ledger}; + const requested=call('System.requestAction',state,action,now); + assert.deepEqual(requested,expected); + assert.equal(call('System.valid',requested),true); + if(!admitted)continue; + for(const settlementTime of [0,10,99,100])for(const outcome of ['Known','Unknown'])for(const actual of [resources(),cost,resources(102)]){ + const observation={actionId:action.actionId,epoch:0,actual,outcome:{tag:outcome,fields:[]}}; + const allowed=call('Custody.recoverableAt',requested.placement,settlementTime)&&call('Budget.settleLedgerAllowed',requested.ledger,observation,settlementTime); + const expectedSettlement={...requested,ledger:allowed?call('Budget.settleLedger',requested.ledger,observation,settlementTime):requested.ledger}; + const settled=call('System.settleAction',requested,observation,settlementTime); + assert.deepEqual(settled,expectedSettlement); + assert.equal(call('System.valid',settled),true); + assert.deepEqual(settled.placement,state.placement); + } + } +}); +test('typed migration reserves before effects and consumes an exact requested transfer only once',()=>{ + const {state,transfer,receipt,fragment,integrity,cost}=migrationFixture(); + assert.equal(call('System.completeMigrationAllowed',state,transfer,receipt,fragment,integrity,20),false); + assert.equal(call('System.completeMigrationAllowed',{...state,transfers:[transfer]},transfer,receipt,fragment,integrity,20),false); + assert.deepEqual(call('System.applyMigration',state,transfer,receipt,fragment,integrity,20),call('System.requestMigration',state,transfer,resources(101),10)); + const requested=call('System.requestMigration',state,transfer,cost,10); + assert.equal(call('System.valid',requested),true); + assert.deepEqual(requested.placement,call('Custody.replaceIndex',state.placement,3,0,false)); + assert.deepEqual(requested.ledger.budget.reserved,resources(2n,2n,0n,1n)); + assert.equal(requested.transfers.length,1); + assert.equal(call('System.requestMigrationAllowed',requested,transfer,cost,10),false); + const prematurelySettled=call('System.settleAction',requested,{actionId:transfer.requestRoot,epoch:0,actual:resources(),outcome:{tag:'Known',fields:[]}},11); + assert.equal(call('System.completeMigrationAllowed',prematurelySettled,transfer,receipt,fragment,integrity,20),false); + const completed=call('System.applyMigration',requested,transfer,receipt,fragment,integrity,20); + assert.equal(completed.placement.holder0,3n); + assert.equal(completed.placement.revision,1n); + assert.equal(completed.transfers[0].phase.tag,'Committed'); + assert.equal(call('System.valid',completed),true); + assert.deepEqual(completed.ledger.budget.reserved,requested.ledger.budget.reserved); + assert.deepEqual(completed.ledger.budget.spent,requested.ledger.budget.spent); + assert.equal(completed.ledger.budget.last,20n); + assert.deepEqual(completed.evidence,requested.evidence); + assert.equal(call('System.completeMigrationAllowed',completed,transfer,receipt,fragment,integrity,21),false); + assert.deepEqual(call('System.applyMigration',completed,transfer,receipt,fragment,integrity,21),completed); + assert.equal(call('System.requestMigrationAllowed',completed,transfer,cost,22),false); + const next={...transfer,requestRoot:rootAt(90),sourceHolder:3,targetHolder:4,placementRevision:1}; + assert.equal(call('System.requestMigrationAllowed',completed,next,cost,19),false); + assert.equal(call('System.requestMigrationAllowed',completed,next,cost,21),true); + const observation={actionId:transfer.requestRoot,epoch:0,actual:resources(1,1,0,1),outcome:{tag:'Known',fields:[]}}; + const settled=call('System.settleAction',completed,observation,21); + assert.equal(call('Budget.ledgerValid',settled.ledger),true); + assert.equal(call('System.valid',settled),true); + assert.deepEqual(settled.ledger.budget.reserved,resources(0n,0n,0n,0n)); + assert.deepEqual(settled.ledger.budget.spent,resources(1n,1n,0n,1n)); + assert.equal(call('System.settleActionAllowed',settled,observation,22),false); + assert.equal(call('System.requestMigrationAllowed',settled,transfer,cost,22),false); + assert.equal(call('System.settleActionAllowed',completed,{...observation,outcome:{tag:'Unknown',fields:[]}},21),false); + assert.deepEqual(call('System.settleAction',completed,{...observation,outcome:{tag:'Unknown',fields:[]}},21),completed); + +}); +test('typed migration refuses mismatched requests, receipts, fragments, expired leases and stale placement revisions',()=>{ + const {state,transfer,receipt,fragment,integrity,cost}=migrationFixture(); + const requested=call('System.requestMigration',state,transfer,cost,10); + for(const field of ['requestRoot','manifestRoot','fragmentRoot']){ + assert.equal(call('System.completeMigrationAllowed',requested,{...transfer,[field]:rootAt(99)},receipt,fragment,integrity,20),false,field); + assert.equal(call('System.completeMigrationAllowed',requested,transfer,{...receipt,[field]:rootAt(99)},fragment,integrity,20),false,field); + } + for(const [field,value] of [['sourceHolder',9],['targetHolder',9],['index',1],['placementRevision',1]])assert.equal(call('System.completeMigrationAllowed',requested,{...transfer,[field]:value},receipt,fragment,integrity,20),false,field); + for(const [field,value] of [['holderId',9],['index',1],['observedAt',21],['leaseUntil',20],['identityAuthenticated',false]])assert.equal(call('System.completeMigrationAllowed',requested,transfer,{...receipt,[field]:value},fragment,integrity,20),false,field); + for(const [field,value] of [['manifestRoot',rootAt(99)],['payloadRoot',rootAt(99)],['index',1]])assert.equal(call('System.completeMigrationAllowed',requested,transfer,receipt,{...fragment,[field]:value},integrity,20),false,field); + assert.equal(call('System.completeMigrationAllowed',requested,transfer,{...receipt,observedAt:0},fragment,integrity,9),false); + assert.equal(call('System.completeMigrationAllowed',requested,transfer,receipt,fragment,integrity,50),false); + assert.equal(call('System.completeMigrationAllowed',{...requested,placement:{...requested.placement,receipt0:{...requested.placement.receipt0,fragmentRoot:rootAt(99)}}},transfer,receipt,fragment,integrity,20),false); + for(const bad of [ + {...integrity,fragmentRoot:rootAt(99)}, {...integrity,encodingRoot:rootAt(99)}, {...integrity,index:1}, {...integrity,payload:Uint8Array.of(9,9)}, + {...integrity,digest:{...integrity.digest,observed:rootAt(99)}}, {...integrity,digest:{...integrity.digest,domainMatches:false}}, {...integrity,digest:{...integrity.digest,canonicalSerializationMatches:false}} + ])assert.equal(call('System.completeMigrationAllowed',requested,transfer,receipt,fragment,bad,20),false); + const stale={...requested,placement:{...requested.placement,revision:2}}; + assert.equal(call('System.completeMigrationAllowed',stale,transfer,receipt,fragment,integrity,20),false); + for(const phase of ['Acknowledged','Committed','Failed','Uncertain']){ + assert.equal(call('System.requestMigrationAllowed',state,{...transfer,phase:{tag:phase,fields:[]}},cost,10),false); + assert.equal(call('System.completeMigrationAllowed',requested,{...transfer,phase:{tag:phase,fields:[]}},receipt,fragment,integrity,20),false); + } + assert.equal(call('System.requestMigrationAllowed',state,{...transfer,targetHolder:1},cost,10),false); + assert.equal(call('System.requestMigrationAllowed',state,{...transfer,sourceHolder:8},cost,10),false); + assert.equal(call('System.requestMigrationAllowed',state,{...transfer,placementRevision:1},cost,10),false); + assert.equal(call('System.requestMigrationAllowed',state,transfer,resources(101),10),false); + for(const field of ['requestRoot','manifestRoot','fragmentRoot'])assert.equal(call('System.requestMigrationAllowed',state,{...transfer,[field]:{...rootAt(0),w0:2n**32n}},cost,10),false); +}); +test('typed migration preserves every recoverable active mask and rejects unknown or uncertain outcomes',()=>{ + for(let active=0;active<8;active++)for(let index=0;index<3;index++){ + const f=migrationFixture(),p={...f.state.placement,active0:Boolean(active&1),active1:Boolean(active&2),active2:Boolean(active&4)}; + if(!call('Custody.recoverable',p))continue; + const fragmentRoot=rootAt(20+index); + const state={...f.state,placement:p},transfer={...f.transfer,index,sourceHolder:index,fragmentRoot},receipt={...f.receipt,index,fragmentRoot},fragment={...f.fragment,index,payloadRoot:fragmentRoot},integrity={...f.integrity,index,fragmentRoot,digest:{...f.integrity.digest,expected:fragmentRoot,observed:fragmentRoot}}; + const requested=call('System.requestMigration',state,transfer,f.cost,10); + const after=call('System.applyMigration',requested,transfer,receipt,fragment,integrity,20); + assert.equal(call('System.valid',after),true); + if(p['active'+index])assert.equal(after.placement['holder'+index],3n); + else assert.equal(requested.transfers.length,0); + const uncertain=call('Custody.failTransfer',transfer,true); + assert.equal(uncertain.phase.tag,'Uncertain'); + assert.equal(call('Custody.migrationAllowed',p,uncertain,20),false); + } +}); + +test('observations require fresh observer-relative authenticated sequences, and timeout never becomes reachability',()=>{ + const current={observer:1,peer:2,failureDomain:3,observedAt:1,expires:10,sequence:0,reachability:{tag:'Unknown',fields:[]},authenticated:true}; + const candidate={...current,observedAt:10,expires:20,sequence:1,reachability:{tag:'Reachable',fields:[]}}; + assert.equal(call('Observation.acceptObservation',current,candidate,15),true); + for(const [field,value] of [['observer',9],['peer',9],['sequence',0],['observedAt',16],['expires',15],['authenticated',false]])assert.equal(call('Observation.acceptObservation',current,{...candidate,[field]:value},15),false,field); + assert.equal(call('Observation.acceptObservation',{...current,observedAt:12},candidate,15),false); + for(const tag of ['Unknown','Reachable','TimedOut','Conflicting']){ + const observation={...candidate,reachability:{tag,fields:[]}}; + assert.equal(call('Observation.reachableObservation',observation,1,15),tag==='Reachable'); + assert.equal(call('Observation.reachableObservation',observation,9,15),false); + assert.equal(call('Observation.reachableObservation',observation,1,20),false); + } + assert.equal(call('Observation.reachableObservation',{...candidate,authenticated:false},1,15),false); + const kept=call('Observation.updateObservation',current,current,15); + assert.deepEqual(call('Observation.updateObservation',current,{...candidate,expires:15},15),kept); +}); +test('per-copy leases expire at the boundary and expired/superseded retained bytes still count physically',()=>{ + const p={...placement,receipt0:{...initialReceipt(0),leaseUntil:20},receipt1:{...initialReceipt(1),leaseUntil:30},receipt2:{...initialReceipt(2),leaseUntil:40}}; + assert.equal(call('Custody.liveCount',p,19),3n); + assert.equal(call('Custody.liveCount',p,20),2n); + assert.equal(call('Custody.recoverableAt',p,29),true); + assert.equal(call('Custody.recoverableAt',p,30),false); + assert.equal(call('Custody.recoverable',p),true); + const inactiveDuplicate={...placement,active2:false,holder2:0,receipt2:{...initialReceipt(2),holderId:0}}; + assert.equal(call('Custody.recoverableAt',inactiveDuplicate,20),true); + const collocated={...placement,holder1:0,holder2:0,receipt1:{...initialReceipt(1),holderId:0},receipt2:{...initialReceipt(2),holderId:0}}; + assert.equal(call('Custody.recoverableAt',collocated,20),false); + for(const [field,value] of [['manifestRoot',rootAt(99)],['index',2],['holderId',9],['observedAt',21],['identityAuthenticated',false]]){ + const bad={...placement,active2:false,receipt1:{...initialReceipt(1),[field]:value}}; + assert.equal(call('Custody.recoverableAt',bad,20),false,field); + } + const copy={index:0,holder:0,byteLength:7,retained:true,superseded:false,externalRelay:false,manifestRoot:digest,fragmentRoot:digest,receipt:{...initialReceipt(0),leaseUntil:20}}; + assert.equal(call('Custody.physicalCopyLive',copy,19),true); + assert.equal(call('Custody.physicalCopyLive',copy,20),false); + assert.equal(call('Custody.physicalCopyLive',{...copy,superseded:true},19),false); + assert.equal(call('Custody.physicalBytes',[copy,{...copy,superseded:true}]),14n); + const f=migrationFixture(),state={...f.state,placement:{...f.state.placement,active2:false}}; + const requested=call('System.requestMigration',state,f.transfer,f.cost,10); + const completed=call('System.applyMigration',requested,f.transfer,f.receipt,f.fragment,f.integrity,20); + assert.equal(completed.placement.receipt0.leaseUntil,50n); + assert.equal(completed.placement.receipt0.holderId,3n); + assert.equal(call('System.validAt',completed,49),true); + assert.equal(call('System.validAt',completed,50),false); + assert.equal(call('System.requestMigrationAllowed',{...state,placement:p},f.transfer,f.cost,30),false); +}); +function evidenceFixture(){ + const assumptions=Object.fromEntries(['digestCollisionResistance','signatureUnforgeability','authorizedKeyBinding','receiptAuthentication','storageRetentionForLease','independentFailureDomains','monotonicElapsedClock','releasedRuntimeMatchesModel'].map(name=>[name,true])); + const dependencies=[{root:rootAt(70),kind:{tag:'Decoder',fields:[]},byteLength:4,present:true,integrityChecked:true},{root:rootAt(80),kind:{tag:'Basis',fields:[]},byteLength:7,present:true,integrityChecked:true}]; + const bindings={claim:{tag:'Reconstruction',fields:[]},kind:{tag:'KernelChecked',fields:[]},modelRoot:rootAt(1),artifactRoot:rootAt(2),subjectRoot:rootAt(3),assumptionsRoot:rootAt(4),dependencyRoot:rootAt(5),assumptions,dependencies}; + const hostEffects=[{tag:'ReadClock',fields:[]},{tag:'HashBytes',fields:[]}]; + const evidence={...bindings,hostEffects,observedAt:10,validUntil:100,horizon:60,failureBound:1}; + const requested={...bindings,hostEffects:[{tag:'HashBytes',fields:[]}],horizon:20,failures:1}; + return {evidence,requested}; +} +test('typed evidence reuse binds exact claim, evidence kind, identities, named assumptions and dependency snapshots',()=>{ + const {evidence,requested}=evidenceFixture(); + assert.equal(call('Evidence.scopeReusable',evidence,requested,20),true); + for(const name of ['modelRoot','artifactRoot','subjectRoot','assumptionsRoot','dependencyRoot']){ + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,[name]:rootAt(99)},20),false,name); + assert.equal(call('Evidence.scopeReusable',{...evidence,[name]:{...rootAt(0),w0:2n**32n}},requested,20),false,name); + } + for(const tag of ['Integrity','Authorization','PureExecution','Availability','Durability','Confidentiality'])assert.equal(call('Evidence.scopeReusable',evidence,{...requested,claim:{tag,fields:[]}},20),false); + for(const tag of ['Specified','KernelChecked','ImplementationTested','IndependentlyReplayed','FieldMeasured','Refuted','Untested']){ + const kind={tag,fields:[]}; + assert.equal(call('Evidence.scopeReusable',{...evidence,kind},{...requested,kind},20),['KernelChecked','ImplementationTested','IndependentlyReplayed','FieldMeasured'].includes(tag)); + if(tag!=='KernelChecked')assert.equal(call('Evidence.scopeReusable',evidence,{...requested,kind},20),false); + } + for(const name of Object.keys(evidence.assumptions))assert.equal(call('Evidence.scopeReusable',evidence,{...requested,assumptions:{...requested.assumptions,[name]:false}},20),false,name); + for(const [field,value] of [['root',rootAt(99)],['kind',{tag:'Residual',fields:[]}],['byteLength',5],['present',false],['integrityChecked',false]]){ + const dependencies=[{...requested.dependencies[0],[field]:value},requested.dependencies[1]]; + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,dependencies},20),false,field); + } + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,dependencies:[]},20),false); + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,dependencies:[...requested.dependencies].reverse()},20),false); +}); +test('evidence horizons cannot roll forward and host effects cannot expand during reuse',()=>{ + const {evidence,requested}=evidenceFixture(); + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,horizon:50},20),true); + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,horizon:51},20),false); + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,horizon:20},51),false); + assert.equal(call('Evidence.scopeReusable',evidence,requested,9),false); + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,horizon:0},100),false); + assert.equal(call('Evidence.scopeReusable',{...evidence,validUntil:30},requested,20),false); + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,failures:2},20),false); + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,hostEffects:[]},20),true); + assert.equal(call('Evidence.scopeReusable',evidence,{...requested,hostEffects:[{tag:'SendFragment',fields:[]}]},20),false); + assert.equal(call('Evidence.scopeReusable',{...evidence,hostEffects:[]},requested,20),false); + for(const tag of ['ReadClock','SendFragment','PersistFragment','ReadDNS','WriteDNS','ReceivePeer','RunVM','FetchDependency','VerifySignature','HashBytes'])assert.equal(call('Evidence.pureEffectAllowed',{tag,fields:[]}),false); +}); + +function defect(mutator,pattern,mode='--write'){ + const dir=mkdtempSync(join(tmpdir(),'stitch-model-defect-')); + try{ + for(const path of ['scripts/check-model.mjs','app/src','app/language','src/layer1-uor/generated-model.js','src/layer4-compute/replay.js','src/layer1-uor/index.js','src/layer1-uor/contracts.js','src/layer1-uor/custody.js'])cpSync(resolve(root,path),resolve(dir,path),{recursive:true}); + const file=resolve(dir,'app/src/Stitch/Budget.lex.tex');const original=readFileSync(file,'utf8');writeFileSync(file,mutator(original)); + const result=spawnSync(process.execPath,['scripts/check-model.mjs',mode],{cwd:dir,encoding:'utf8'}); + assert.notEqual(result.status,0);assert.match(result.stderr,pattern); + }finally{rmSync(dir,{recursive:true,force:true});} +} +test('planted unsupported syntax, unbound variables, primitive arity and stale outputs are rejected',()=>{ + defect(s=>s.replace('(prim subtract reserved ceiling : Nat)','(prim unknown reserved ceiling : Nat)'),/unsupported primitive/); + defect(s=>s.replace('(prim subtract reserved ceiling : Nat)','(prim subtract reserved ceiling 1 : Nat)'),/unsupported primitive/); + defect(s=>s.replace('(reserved + cost)','(missing + cost)'),/unbound variable/); + defect(s=>s.replace('(reserveAllowed spent reserved cost limit now last end)','(missing spent reserved cost limit now last end)'),/unknown function\/arity/); + defect(s=>s.replace('(reserved + cost)','(reserved + (cost + 1))'),/stale source bindings/,'--check'); +}); diff --git a/scripts/check-model.mjs b/scripts/check-model.mjs new file mode 100644 index 0000000..a201223 --- /dev/null +++ b/scripts/check-model.mjs @@ -0,0 +1,301 @@ +#!/usr/bin/env node +/** + * Reproduce the handwritten host's small pure bindings from the LexLean source. + * This is a strict subset translator, NOT LexLean, Lean, PrismPM, a proof checker, + * or a replacement for the pinned SDK gate. Unsupported syntax is an error. + */ +import { readFileSync, writeFileSync, readdirSync, mkdirSync } from 'node:fs'; +import { createHash } from 'node:crypto'; +import { dirname, resolve, relative } from 'node:path'; +import { fileURLToPath } from 'node:url'; +const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); +const output = resolve(root, 'src/layer1-uor/generated-model.js'); +const sourceRoot = resolve(root, 'app/src/Stitch'); +// Product.Experience intentionally uses this same declared subset for browser journeys. +const selectedSources = [...readdirSync(sourceRoot).filter(x=>x.endsWith('.lex.tex')).sort().map(x=>resolve(sourceRoot,x)), resolve(root,'app/src/Product/Experience.lex.tex')]; +const modes = new Set(process.argv.slice(2)); +if ([...modes].some(x => !['--write', '--check', '--inventory'].includes(x)) || modes.has('--write') && modes.has('--check')) throw Error('usage: node scripts/check-model.mjs [--write|--check] [--inventory]'); +const hash = value => createHash('sha256').update(value).digest('hex'); +function lex(text) { + const tokens = []; let i = 0; + while (i < text.length) { + const rest = text.slice(i); let m; + if ((m = /^\s+/.exec(rest))) { i += m[0].length; continue; } + if ((m = /^"(?:[^"\\]|\\["\\/bfnrt]|\\u[0-9a-fA-F]{4})*"/.exec(rest))) { tokens.push(m[0]); i += m[0].length; continue; } + if ((m = /^(?:<->|::|:=|<=\?|<\?|=\?|&&|\|\||->|<=|\/\\|[(){}\[\],:+|=<>;]|[0-9]+|[A-Za-z_][A-Za-z0-9_'.-]*)/.exec(rest))) { tokens.push(m[0]); i += m[0].length; continue; } + throw Error(`unsupported token at ${i}: ${JSON.stringify(rest.slice(0, 40))}`); + } + return tokens; +} +function split(tokens, sep) { + const out = []; let start = 0; const stack = []; + const close = {')':'(',']':'[','}':'{'}; + for (let i = 0; i < tokens.length; i++) { + const t = tokens[i]; + if (['(', '[', '{'].includes(t)) stack.push(t); + else if (Object.hasOwn(close,t)) { if (stack.pop() !== close[t]) throw Error('unbalanced source delimiters'); } + else if (t === sep && !stack.length) { out.push(tokens.slice(start,i)); start=i+1; } + } + if (stack.length) throw Error('unbalanced source delimiters'); + out.push(tokens.slice(start)); return out; +} +function fields(tokens) { + if (tokens[0] !== '{' || tokens.at(-1) !== '}') throw Error('expected declaration record'); + const result = Object.create(null); + for (const part of split(tokens.slice(1,-1), ',')) { + if (part.length < 3 || part[1] !== ':' || Object.hasOwn(result,part[0])) throw Error(`bad/duplicate field ${part.join(' ')}`); + result[part[0]] = part.slice(2); + } + return result; +} +function list(tokens) { if (tokens[0] !== '[' || tokens.at(-1) !== ']') throw Error('expected array'); return tokens.length === 2 ? [] : split(tokens.slice(1,-1),','); } +function single(tokens) { if (tokens?.length !== 1) throw Error(`expected atom: ${tokens?.join(' ')}`); return tokens[0]; } +function member(tokens) { if (tokens.length === 1) return tokens[0]; if (tokens.length === 3 && tokens[1] === '::') return `${tokens[0]}::${tokens[2]}`; throw Error('invalid member'); } +function type(tokens) { + if (tokens[0] === '(' && tokens.at(-1) === ')') { const inner=tokens.slice(1,-1); if (['List','Option'].includes(inner[0])) return { kind:inner[0],element:type(inner.slice(1)) }; throw Error(`unsupported type ${tokens.join(' ')}`); } + return {kind:member(tokens)}; +} +function parameters(tokens) { + return list(tokens).map(xs => { if (xs[1]!==':') throw Error('invalid parameter'); return {name:xs[0],type:type(xs.slice(2))}; }); +} +class TermParser { + constructor(tokens) { this.tokens=tokens; this.i=0; } + peek() { return this.tokens[this.i]; } + take(want) { const got=this.tokens[this.i++]; if (want!==undefined && got!==want) throw Error(`expected ${want}; found ${got} at ${this.i-1}`); return got; } + name() { const a=this.take(); return this.peek()==='::' ? (this.take(), a+'::'+this.take()) : a; } + term() { + const t=this.take(); + if (/^\d+$/.test(t)) return {k:'nat',value:t}; + if (t==='true'||t==='false') return {k:'bool',value:t==='true'}; + if (t?.startsWith('"')) return {k:'string',value:JSON.parse(t)}; + if (t==='(') { + const first=this.peek(); let out; + if (first==='if') { this.take(); const cond=this.term(); this.take('then'); const yes=this.term(); this.take('else'); const no=this.term(); out={k:'if',cond,yes,no}; } + else if (first==='let') { this.take(); const name=this.take(); this.take(':'); const ty=[]; while(this.peek()!==':=') ty.push(this.take()); this.take(':='); const value=this.term(); this.take(';'); const body=this.term(); out={k:'let',name,type:type(ty),value,body}; } + else if (first==='project') { this.take(); out={k:'project',value:this.term(),field:this.take()}; } + else if (first==='record') { + this.take(); const name=this.name(); this.take('{'); const values=Object.create(null); + while(this.peek()!=='}') { const key=this.take(); this.take(':='); if(Object.hasOwn(values,key)) throw Error('duplicate record assignment'); values[key]=this.term(); if(this.peek()!=='}') this.take(','); } + this.take('}'); out={k:'record',name,values}; + } + else if (first==='prim') { this.take(); const operation=this.take(),args=[]; while(this.peek()!==':') args.push(this.term()); this.take(':'); const ty=[]; let depth=0; while(this.peek()!==')'||depth) { const t=this.take(); if(t==='(')depth++; if(t===')')depth--; ty.push(t); if(this.i>this.tokens.length)throw Error('unclosed primitive'); } out={k:'prim',operation,args,type:type(ty)}; } + else if (first==='match') { + this.take(); const value=this.term(),branches=[]; + while(this.peek()==='|') { this.take(); const constructor=this.name(),binders=[]; while(this.peek()!=='=>') { if(this.peek()==='='&&this.tokens[this.i+1]==='>')break; binders.push(this.take()); if(this.i>this.tokens.length)throw Error('bad match'); } + if(this.peek()==='=>')this.take();else {this.take('=');this.take('>');} branches.push({constructor,binders,body:this.term()}); } + out={k:'match',value,branches}; + } + else if (first==='ctor') { this.take(); const name=this.name(),args=[]; while(this.peek()!==')')args.push(this.term()); out={k:'ctor',name,args}; } + else if (first==='cons') { this.take(); out={k:'cons',head:this.term(),tail:this.term()}; } + else if (first==='nil') { this.take(); const ty=[]; while(this.peek()!==')')ty.push(this.take()); out={k:'nil',type:type(ty)}; } + else if (first==='not') { this.take(); out={k:'not',value:this.term()}; } + else { + const left=this.term(); + if (['+','=?','<=?','tokens.length)throw Error('unclosed declaration'); }while(depth); + let f; try { f=fields(tokens.slice(start,i)); } catch(e) { throw Error(module+' '+tokens.slice(start,start+6).join(' ')+': '+e.message); } const name=single(f.name),id=`${module}.${name}`; + const allowed={definition:['name','parameters','result','body','axioms','recursive_argument','executable','production'],theorem:['name','parameters','statement','proof','axioms'],structure:['name','type_parameters','parameters','fields'],inductive:['name','type_parameters','parameters','constructors']}[kind]; + for(const key of Object.keys(f))if(!allowed.includes(key))throw Error(`${id}: unsupported declaration field ${key}`); + if(kind==='definition') { if(defs[id])throw Error('duplicate definition'); defs[id]={module,name,params:parameters(f.parameters),result:type(f.result),body:new TermParser(f.body).finish()}; } + if(kind==='structure')types[id]={kind,fields:list(f.fields).map(x=>{const ff=fields(x);return{name:single(ff.name),type:type(ff.type)};})}; + if(kind==='inductive')types[id]={kind,constructors:list(f.constructors).map(x=>{const ff=fields(x);return{name:single(ff.name),fields:list(ff.fields).map(type)};})}; + if(kind==='theorem') { if(!f.proof||!f.statement)throw Error('theorem without proof');theorems.push({id,proof:single(f.proof.slice(0,1)),source:relative(root,sourcePath),status:'source-obligation-not-kernel-checked'}); } + } + sources.push({path:relative(root,sourcePath),sha256:hash(text)}); +} +function qualify(module,name) { return name.includes('::') ? name.replace('::','.') : `${module}.${name}`; } +const primitiveArity={subtract:2,multiply:2,quotient:3,remainder:3,equal:2}; +const prims=new Set(Object.keys(primitiveArity)); +function visit(ast,mod,locals) { + if(!ast||typeof ast!=='object')throw Error('invalid AST'); + switch(ast.k) { + case 'nat':case 'bool':case 'string':case 'nil':return; + case 'var':if(!locals.has(ast.name))throw Error(`${mod}: unbound variable ${ast.name}`);return; + case 'call': {const id=qualify(mod,ast.name); if(!defs[id]||defs[id].params.length!==ast.args.length)throw Error(`${mod}: unknown function/arity ${ast.name}`);ast.args.forEach(x=>visit(x,mod,locals));return;} + case 'prim':if(!prims.has(ast.operation)||primitiveArity[ast.operation]!==ast.args.length||!(ast.operation==='equal'?ast.type.kind==='Bool':ast.type.kind==='Nat'))throw Error(`unsupported primitive ${ast.operation}`);ast.args.forEach(x=>visit(x,mod,locals));return; + case 'record': {const shape=types[qualify(mod,ast.name)];if(!shape||shape.kind!=='structure'||shape.fields.map(x=>x.name).sort().join(',')!==Object.keys(ast.values).sort().join(','))throw Error('unknown record or wrong record fields');Object.values(ast.values).forEach(x=>visit(x,mod,locals));return;} + case 'project':case 'not':visit(ast.value,mod,locals);return; + case 'binary':visit(ast.left,mod,locals);visit(ast.right,mod,locals);return; + case 'if':visit(ast.cond,mod,locals);visit(ast.yes,mod,locals);visit(ast.no,mod,locals);return; + case 'let':visit(ast.value,mod,locals);visit(ast.body,mod,new Set([...locals,ast.name]));return; + case 'ctor': {const i=ast.name.lastIndexOf('.'),owner=qualify(mod,ast.name.slice(0,i)),name=ast.name.slice(i+1);const constructor=types[owner]?.constructors?.find(x=>x.name===name);if(!constructor||constructor.fields.length!==ast.args.length)throw Error('unknown constructor or wrong constructor arity');ast.args.forEach(x=>visit(x,mod,locals));return;} + case 'cons':visit(ast.head,mod,locals);visit(ast.tail,mod,locals);return; + case 'match':visit(ast.value,mod,locals);ast.branches.forEach(b=>visit(b.body,mod,new Set([...locals,...b.binders])));return; + default:throw Error(`unsupported AST ${ast.k}`); + } +} +for(const d of Object.values(defs))visit(d.body,d.module,new Set(d.params.map(x=>x.name))); +const aliases={budgetReserveAllowed:'Stitch.Budget.reserveAllowed',budgetSettlementAllowed:'Stitch.Budget.settlementAllowed',pointerSuccessorAllowed:'Stitch.Pointer.successorAllowed',checkpointLinkAllowed:'Stitch.Compute.checkpointLinkAllowed',custodyCommitAllowed:'Stitch.Custody.commitAllowed',custodyRetireAllowed:'Stitch.Custody.retireAllowed',custodyPairAllowed:'Stitch.Fragments.pairAllowed'}; +for(const [name,id] of Object.entries(aliases))if(!defs[id])throw Error(`missing public binding ${name}`); +const bindingSources = []; +function gather(dir) { for (const e of readdirSync(dir,{withFileTypes:true}).sort((a,b)=>a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) { const p=resolve(dir,e.name); if(e.isDirectory())gather(p); else bindingSources.push({path:relative(root,p),sha256:hash(readFileSync(p))}); } } +gather(resolve(root,'app/src')); gather(resolve(root,'app/language')); +const sourceDigest='sha256:'+hash(bindingSources.map(x=>x.path+'\0'+x.sha256+'\n').join('')); +// Execution compatibility is narrower than exact project-source provenance. +// Canonical reachable LexLean declarations exclude proofs and layout. The +// interpreter and complete transitive JS adapter modules remain byte-bound: +// compatibility is conservative for handwritten adapter edits, never guessed. +const interpreter = `const qualify = (module, name) => name.includes('::') ? name.replace('::','.') : module+'.'+name; +function natural(value) { + if(typeof value==='bigint'&&value>=0n)return value; + if(typeof value==='number'&&Number.isSafeInteger(value)&&value>=0)return BigInt(value); + throw new TypeError('model Nat must be a non-negative BigInt or safe integer'); +} +function coerce(value,type,module) { + if(type.kind==='Nat')return natural(value); + if(type.kind==='Bool') {if(typeof value!=='boolean')throw new TypeError('model Bool required');return value;} + if(type.kind==='Bytes') {if(!(value instanceof Uint8Array))throw new TypeError('model Bytes required');return value.slice();} + if(type.kind==='String') {if(typeof value!=='string')throw new TypeError('model String required');return value;} + if(type.kind==='List') {if(!Array.isArray(value))throw new TypeError('model List required');return value.map(x=>coerce(x,type.element,module));} + const id=qualify(module,type.kind),shape=types[id]; + if(!shape)throw new TypeError('unknown model type '+id); + if(shape.kind==='structure') {if(!value||typeof value!=='object'||Object.keys(value).sort().join(',')!==shape.fields.map(x=>x.name).sort().join(','))throw new TypeError('exact model record fields required for '+id);return Object.fromEntries(shape.fields.map(f=>[f.name,coerce(value[f.name],f.type,id.slice(0,id.lastIndexOf('.')))]));} + const constructor=shape.constructors.find(x=>x.name===value?.tag); + if(!constructor||!Array.isArray(value.fields)||value.fields.length!==constructor.fields.length)throw new TypeError('model constructor required for '+id); + return {tag:value.tag,fields:value.fields.map((v,i)=>coerce(v,constructor.fields[i],id.slice(0,id.lastIndexOf('.'))))}; +} +const tailCall = Symbol("source-tail-call"); +function evaluate(ast,env,module,tail=false) { + switch(ast.k) { + case 'nat':return BigInt(ast.value); + case 'bool':case 'string':return ast.value; + case 'var':if(!Object.hasOwn(env,ast.name))throw Error('unbound model variable');return env[ast.name]; + case 'if':return evaluate(evaluate(ast.cond,env,module)?ast.yes:ast.no,env,module,tail); + case 'not':return !evaluate(ast.value,env,module); + case 'project':return evaluate(ast.value,env,module)[ast.field]; + case 'let':return evaluate(ast.body,{...env,[ast.name]:evaluate(ast.value,env,module)},module,tail); + case 'record':return Object.fromEntries(Object.entries(ast.values).map(([k,v])=>[k,evaluate(v,env,module)])); + case 'call': {const id=qualify(module,ast.name),args=ast.args.map(x=>evaluate(x,env,module));return tail?{[tailCall]:true,id,args}:invoke(id,args);} + case 'nil':return []; + case 'cons':return [evaluate(ast.head,env,module),...evaluate(ast.tail,env,module)]; + case 'ctor':return {tag:ast.name.split('.').at(-1),fields:ast.args.map(x=>evaluate(x,env,module))}; + case 'match': { + const value=evaluate(ast.value,env,module);let tag,fields; + if(Array.isArray(value)){tag=value.length?'cons':'nil';fields=value.length?[value[0],value.slice(1)]:[];}else if(typeof value==='bigint'){tag=value===0n?'zero':'succ';fields=value===0n?[]:[value-1n];}else if(typeof value==='boolean'){tag=value?'true':'false';fields=[];}else {tag=value.tag;fields=value.fields;} + const b=ast.branches.find(x=>x.constructor.split('.').at(-1)===tag); + if(!b||b.binders.length!==fields.length)throw Error('nonexhaustive model match');return evaluate(b.body,{...env,...Object.fromEntries(b.binders.map((n,i)=>[n,fields[i]]))},module,tail); + } + case 'binary': { + const left=evaluate(ast.left,env,module); + if(ast.op==='&&')return left&&evaluate(ast.right,env,module); + if(ast.op==='||')return left||evaluate(ast.right,env,module); + const right=evaluate(ast.right,env,module); + switch(ast.op){case '+':return left+right;case '=?':return left===right;case '<=?':return left<=right;case 'evaluate(x,env,module)); + switch(ast.operation){case 'subtract':return a[0]>=a[1]?a[0]-a[1]:0n;case 'multiply':return a[0]*a[1];case 'quotient':return a[1]===0n?a[2]:a[0]/a[1];case 'remainder':return a[1]===0n?a[2]:a[0]%a[1];case 'equal':return a[0].length===a[1].length&&a[0].every((x,i)=>x===a[1][i]);default:throw Error('unsupported model primitive');} + } + default:throw Error('unsupported model node '+ast.k); + } +} +function invoke(id,args) {for(;;){const d=definitions[id];if(!d||d.params.length!==args.length)throw Error('unknown model function/arity '+id);const result=evaluate(d.body,Object.fromEntries(d.params.map((p,i)=>[p.name,args[i]])),d.module,true);if(!result?.[tailCall])return result;id=result.id;args=result.args;}} +export const model=Object.freeze(Object.fromEntries(Object.entries(definitions).map(([id,d])=>[id,(...args)=>{if(args.length!==d.params.length)throw new TypeError('model arity '+id);return invoke(id,args.map((v,i)=>coerce(v,d.params[i].type,d.module)));}]))); +`; +function canonical(value) { + if (Array.isArray(value)) return value.map(canonical); + if (value && typeof value === 'object') return Object.fromEntries(Object.keys(value).sort().map(key => [key, canonical(value[key])])); + return value; +} +const adapterSources = [], adapterTexts = new Map(); +function gatherAdapter(path) { + const full = resolve(root, path), normalized = relative(root, full); + if (!normalized.startsWith('src/') || !normalized.endsWith('.js')) throw Error('unsupported execution adapter dependency '+path); + if (full === output || adapterTexts.has(normalized)) return; + const text = readFileSync(full, 'utf8'); + adapterTexts.set(normalized, text); + adapterSources.push({ path: normalized, sha256: hash(text) }); + if (/\bimport\s*\(/.test(text)) throw Error('dynamic execution adapter import is not supported'); + for (const match of text.matchAll(/\b(?:import|export)\s+[^;]*?\bfrom\s+['"]([^'"]+)['"]/g)) { + if (!match[1].startsWith('.')) throw Error('external execution adapter import is not supported'); + gatherAdapter(relative(root, resolve(dirname(full), match[1]))); + } +} +gatherAdapter('src/layer4-compute/replay.js'); +adapterSources.sort((a,b)=>a.path < b.path ? -1 : a.path > b.path ? 1 : 0); +const replayAdapter = adapterTexts.get('src/layer4-compute/replay.js'); +const executionRoots = new Set(); +const directCalls = [...replayAdapter.matchAll(/\bmodel\[['"]([^'"]+)['"]\]/g)]; +if ([...replayAdapter.matchAll(/\bmodel\s*\[/g)].length !== directCalls.length) throw Error('dynamic execution model access is not supported'); +for (const match of directCalls) executionRoots.add(match[1]); +for (const match of replayAdapter.matchAll(/import\s*\{([^}]+)\}\s*from\s*['"][^'"]*generated-model\.js['"]/g)) { + for (const name of match[1].split(',').map(x=>x.trim())) { + if (Object.hasOwn(aliases,name)) executionRoots.add(aliases[name]); + else if (!['model','modelSourceDigest','modelExecutionDigest'].includes(name)) throw Error('unsupported execution model import '+name); + } +} +if (!executionRoots.size) throw Error('missing execution model roots'); +const executionDefinitions = {}, executionTypes = {}; +function includeType(type, module) { + if (type.element) includeType(type.element,module); + if (['Nat','Bool','Bytes','String','List','Option'].includes(type.kind)) return; + const id=qualify(module,type.kind), shape=types[id]; + if (!shape) throw Error('unknown execution type '+id); + if (executionTypes[id]) return; + executionTypes[id]=shape; + const owner=id.slice(0,id.lastIndexOf('.')); + if (shape.fields) shape.fields.forEach(field=>includeType(field.type,owner)); + if (shape.constructors) shape.constructors.forEach(c=>c.fields.forEach(field=>includeType(field,owner))); +} +function includeDefinition(id) { + if (executionDefinitions[id]) return; + const definition=defs[id]; + if (!definition) throw Error('unknown execution definition '+id); + executionDefinitions[id]=definition; + definition.params.forEach(p=>includeType(p.type,definition.module)); + includeType(definition.result,definition.module); + function walk(node) { + if (!node || typeof node!=='object') return; + if (node.k==='call') includeDefinition(qualify(definition.module,node.name)); + if (node.type) includeType(node.type,definition.module); + if (node.k==='record') includeType({kind:node.name},definition.module); + if (node.k==='ctor') includeType({kind:node.name.slice(0,node.name.lastIndexOf('.'))},definition.module); + Object.values(node).forEach(value=>Array.isArray(value)?value.forEach(walk):walk(value)); + } + walk(definition.body); +} +[...executionRoots].sort().forEach(includeDefinition); +const executionIdentity = canonical({ schema:'stitch/execution-semantics/1', + roots:[...executionRoots].sort(), definitions:executionDefinitions, types:executionTypes, + interpreterSha256:hash(interpreter), adapterSources }); +const executionDigest='sha256:'+hash('stitch/execution-semantics/v1\0'+JSON.stringify(executionIdentity)); +const inventory={schema:'stitch/source-bindings/1',verification:'source-derived, not kernel-checked',sourceDigest,executionDigest,executionIdentity,generatorSha256:hash(readFileSync(fileURLToPath(import.meta.url))),bindingSources,sources,theorems,definitions:Object.keys(defs).sort(),aliases}; +const generated=`/** GENERATED by scripts/check-model.mjs. DO NOT EDIT. + * Exact BigInt evaluation of a declared subset of the project LexLean source. + * This is NOT a Prism compiler, proof certificate, or whole-runtime certification. + */ +const definitions = ${JSON.stringify(defs,null,2)}; +const types = ${JSON.stringify(types,null,2)}; +export const modelSourceDigest = ${JSON.stringify(sourceDigest)}; +export const modelExecutionDigest = ${JSON.stringify(executionDigest)}; +export const MODEL_SOURCE = Object.freeze(${JSON.stringify(inventory,null,2)}); +${interpreter} +${Object.entries(aliases).map(([name,id])=>`export const ${name} = model[${JSON.stringify(id)}];`).join('\n')} +`; +if(modes.has('--write')) {mkdirSync(dirname(output),{recursive:true});writeFileSync(output,generated);} +else if(readFileSync(output,'utf8')!==generated)throw Error('stale source bindings: run node scripts/check-model.mjs --write, then review'); +if(modes.has('--inventory'))console.log(JSON.stringify(inventory,null,2)); +else console.log(`model bindings: ${sources.length} selected domain/experience modules, ${Object.keys(defs).length} definitions, ${theorems.length} unverified theorem obligations; ${modes.has('--write')?'written':'fresh'}`); diff --git a/scripts/check-product.mjs b/scripts/check-product.mjs new file mode 100644 index 0000000..d7721f4 --- /dev/null +++ b/scripts/check-product.mjs @@ -0,0 +1,167 @@ +#!/usr/bin/env node +/** Project-owned contract register. NOT a Prism compiler, schema, receipt or certificate. */ +import { readFileSync, writeFileSync, readdirSync, lstatSync } from 'node:fs'; +import { resolve, dirname, relative } from 'node:path'; +import { createHash } from 'node:crypto'; +import { fileURLToPath } from 'node:url'; +const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); +const hash = bytes => createHash('sha256').update(bytes).digest('hex'); +const rowTypes = new Set(['Component','Assumption','CapabilityContract','Dependency','Deployment','Asset']); +const fail = message => { throw Error(`product register: ${message}`); }; +function lex(source) { + const out = []; let rest=source; + while(rest.length) { + const m=/^(?:\s+|"(?:[^"\\]|\\["\\/bfnrt]|\\u[0-9a-fA-F]{4})*"|:=|::|[(){}:,]|[0-9]+|[A-Za-z_][A-Za-z0-9_.]*)/.exec(rest); + if(!m)fail('unsupported literal source'); + rest=rest.slice(m[0].length); if(!/^\s/.test(m[0]))out.push(m[0]); + } + return out; +} +class Literal { + constructor(tokens){this.tokens=tokens;this.i=0;} + take(want){const x=this.tokens[this.i++];if(want!==undefined&&x!==want)fail(`expected ${want}, got ${x}`);return x;} + name(){const n=this.take();return this.tokens[this.i]==='::'?(this.take(),n+'::'+this.take()):n;} + value(){ + const token=this.take(); + if(token?.startsWith('"'))return JSON.parse(token); + if(token==='true'||token==='false')return token==='true'; + if(/^\d+$/.test(token??''))return Number(token); + if(token!=='(')fail(`unsupported literal ${token}`); + const kind=this.take();let value; + if(kind==='nil'){this.name();value=[];} + else if(kind==='cons'){const head=this.value(),tail=this.value();if(!Array.isArray(tail))fail('non-list tail');value=[head,...tail];} + else if(kind==='ctor'){value={constructor:this.name()};} + else if(kind==='record'){ + const type=this.name(),fields={};this.take('{'); + while(this.tokens[this.i]!=='}'){ + const name=this.take();this.take(':=');if(Object.hasOwn(fields,name))fail('duplicate field');fields[name]=this.value(); + if(this.tokens[this.i]!=='}')this.take(','); + } + this.take('}');value={type,fields}; + } else fail(`unsupported literal form ${kind}`); + this.take(')');return value; + } +} +export function literalRows(source, types=rowTypes) { + const regex=/definition\{\s*name: ([A-Za-z_][A-Za-z0-9_]*),\s*parameters: \[\],\s*result: ([A-Za-z_.:]+),\s*body: /g; + const rows=[];let m; + while((m=regex.exec(source))){ + if(!types.has(m[2]))continue; + const start=regex.lastIndex;let depth=0,quoted=false,escaped=false,end=start; + for(;end{ + const path=resolve(directory,name),stat=lstatSync(path); + if(stat.isSymbolicLink())fail(`resource symlink ${path}`); + if(stat.isDirectory())return walk(path); + if(!stat.isFile())fail(`not a regular resource ${path}`); + return [path]; + }); +} +function bytes(path,base=root){ + if(!/^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)*$/.test(path)||path.split('/').some(x=>x==='.'||x==='..'))fail(`unsafe path ${path}`); + if(!lstatSync(base).isDirectory())fail('base is not a nonsymlink directory'); + const parts=path.split('/'); + for(let i=1;i{const ids=rows.map(x=>x[key]);if(ids.some(x=>typeof x!=='string'||!x)||new Set(ids).size!==ids.length)fail(`duplicate or empty ${label}`);return new Set(ids);}; +export function readProduct(base=root){ + const source=readFileSync(resolve(base,'app/src/Product/Model.lex.tex'),'utf8'); + const rows=literalRows(source),typed=type=>rows.filter(r=>r.type===type); + const architecture=literalRows(readFileSync(resolve(base,'app/src/Product/Architecture.lex.tex'),'utf8'),new Set(['Foundation.Arch::Component','Foundation.Arch::Edge','Foundation.Arch::Stakeholder','Foundation.Arch::Concern','Foundation.Arch::Viewpoint','Foundation.Arch::View'])); + const hostSource=readFileSync(resolve(base,'app/src/Product/Host.lex.tex'),'utf8'); + const capabilityBlock=/name: Capability,[\s\S]*?constructors: \[([\s\S]*?)\n \]\s*\}/.exec(hostSource)?.[1]??fail('missing Host.Capability'); + return {components:typed('Component'),assumptions:typed('Assumption'),capabilities:typed('CapabilityContract'),dependencies:typed('Dependency'),deployments:typed('Deployment'),assets:typed('Asset'),architecture,hostCapabilities:[...capabilityBlock.matchAll(/name: (\w+), fields: \[\]/g)].map(m=>m[1])}; +} +export function validateProduct(p,base=root){ + const components=unique(p.components,'id','component'),assumptions=unique(p.assumptions,'id','assumption'),caps=unique(p.capabilities,'id','capability'),assets=unique(p.assets,'path','asset'); + unique(p.dependencies,'id','dependency');unique(p.deployments,'id','deployment'); + const host=new Set(p.hostCapabilities); + if(host.size!==p.capabilities.length||new Set(p.capabilities.map(c=>c.capability)).size!==host.size)fail('host capability coverage'); + const modelModules=new Set(walk(resolve(base,'app/src')).filter(x=>x.endsWith('.lex.tex')).map(x=>/^\\begin\{lexlean\}\{([^}]+)\}/.exec(readFileSync(x,'utf8'))?.[1])); + for(const c of p.components){ + for(const path of c.implementation){if(!assets.has(path))fail(`unregistered component asset ${path}`);bytes(path,base);} + for(const model of c.models)if(!modelModules.has(model))fail(`unknown model ${model}`); + } + for(const c of p.capabilities){ + if(!components.has(c.owner))fail(`unknown capability owner ${c.owner}`); + if(!host.has(c.capability))fail(`unknown host capability ${c.capability}`); + for(const a of c.assumptions)if(!assumptions.has(a))fail(`unknown assumption ${a}`); + if(!c.preconditions.length||!c.failures.length||!c.proofScope)fail(`incomplete capability ${c.id}`); + bytes(c.source,base); + } + for(const d of p.dependencies)if(!components.has(d.consumer))fail(`unknown dependency consumer ${d.consumer}`); + for(const d of p.deployments){bytes(d.entry,base);for(const cap of d.requiredCapabilities)if(!caps.has(cap))fail(`unknown deployment capability ${cap}`);} + for(const asset of p.assets)bytes(asset.path,base); + const runtime=['index.html',...walk(resolve(base,'src')).filter(x=>x.endsWith('.js')).map(x=>relative(base,x)),...walk(resolve(base,'v86')).map(x=>relative(base,x)),...walk(resolve(base,'images')).map(x=>relative(base,x)),...walk(resolve(base,'site')).map(x=>relative(base,x))]; + for(const path of runtime)if(!assets.has(path))fail(`unmodeled browser artifact ${path}`); + const arch=p.architecture.filter(x=>x.type==='Foundation.Arch::Component'); + if(arch.length!==components.size||new Set(arch.map(x=>x.name)).size!==components.size||arch.some(x=>!components.has(x.name)))fail('architecture component coverage'); + for(const type of new Set(p.architecture.map(x=>x.type))){ + const rows=p.architecture.filter(x=>x.type===type).sort((a,b)=>a.declaration.localeCompare(b.declaration,'en')); + rows.forEach((row,i)=>{if(row.index!==i)fail(`noncanonical architecture index ${row.declaration}`);}); + } + for(const e of p.architecture.filter(x=>x.type==='Foundation.Arch::Edge'))if(!arch.some(x=>x.index===e.fromIndex)||!arch.some(x=>x.index===e.toIndex))fail('dangling architecture edge'); + const native=p.capabilities.find(x=>x.capability==='NativeRouting');if(!native||native.enabledByDefault||!native.proofScope.startsWith('Unsupported'))fail('native routing overclaim'); + const relay=p.capabilities.find(x=>x.capability==='PublicRelay');if(!relay||relay.enabledByDefault||!relay.assumptions.includes('disclosureConsent'))fail('relay consent boundary'); + const distribution=JSON.parse(bytes('vendor/distribution.json',base)); + for(const asset of p.assets.filter(a=>a.redistributionCleared && /^(v86|images)\//.test(a.path))){ + const evidence=distribution.assets[asset.path]; + if(!evidence || hash(bytes(asset.path,base))!==evidence.sha256)fail(`distribution identity mismatch ${asset.path}`); + if(!evidence.materials?.length)fail(`missing distribution materials ${asset.path}`); + for(const material of evidence.materials)if(hash(bytes(material.path,base))!==material.sha256)fail(`distribution material mismatch ${material.path}`); + } + return true; +} +/** Project resources are byte inventory, never fabricated proof evidence. */ +export function resourceInventory(base=root){ + const directories=['product','docs','scripts','tests','.github/workflows']; + const required=['product/facets.json','product/facet-type-provenance.json','site/facets.json']; + const discovered=[...walk(resolve(base,'app/src')).filter(x=>x.endsWith('.lex.tex')), + ...walk(resolve(base,'app/language')), + ...directories.flatMap(path=>walk(resolve(base,path)))].map(path=>relative(base,path)); + const sourcePaths=[...new Set([...required,...discovered, + 'app/lexlean.lock','app/lexlean.toml','app/prismpm.toml','app/prism.toml', + 'app/lakefile.toml','app/lake-manifest.json','app/lean-toolchain', + 'README.md','.gitignore','CONTRACT.json','Cargo.toml','Cargo.lock', + 'package.json','package-lock.json','prismpm.lock','standards.lock','vendor/distribution.json' + ])].filter(path=>path!=='product/contracts.json').sort(); + return sourcePaths.map(path=>({path,sha256:hash(bytes(path,base))})); +} +export function validateFacetBindings(base=root){ + const catalog=JSON.parse(bytes('product/facets.json',base)); + if(catalog.format!=='stitch/product-facets/1'||!Array.isArray(catalog.sources)||!catalog.sources.length||!Array.isArray(catalog.modules)||!catalog.modules.length)fail('missing complete facet catalog'); + unique(catalog.sources,'path','facet source');unique(catalog.modules,'module','facet module'); + for(const source of catalog.sources)if(hash(bytes(source.path,base))!==source.sha256)fail(`stale facet source ${source.path}`); + for(const entry of catalog.modules){ + if(!/^Product\.[A-Za-z0-9_.]+$/.test(entry.module)||entry.path!==`app/src/${entry.module.replaceAll('.','/')}.lex.tex`)fail('facet module path differs'); + if(hash(bytes(entry.path,base))!==entry.sha256)fail(`stale facet module ${entry.path}`); + if(!bytes(entry.path,base).toString('utf8').startsWith(`\\begin{lexlean}{${entry.module}}`))fail(`facet module identity differs ${entry.path}`); + } + return catalog; +} +export function productRegister(base=root){ + const p=readProduct(base);validateProduct(p,base);validateFacetBindings(base); + const sources=resourceInventory(base); + const artifacts=p.assets.map(a=>{const data=bytes(a.path,base);return {...a,bytes:data.length,sha256:hash(data)};}).sort((a,b)=>a.path.localeCompare(b.path,'en')); + return {format:'Stitch project-owned product contract register',version:1,assurance:'Source contracts and local byte inventory, not a Prism receipt or whole-browser proof',reference:{repository:'https://github.com/UOR-Foundation/PrismPM',revision:'fe5b8b73a94134c316329a8d1b09ebc97b555c5f',specSections:['2','11'],scope:'Product-contract convention reference; expanded types have separate exact provenance',facetTypeProvenance:'product/facet-type-provenance.json',foundationArch:'Type-only declarations and pinned UORust design-view extensions; source identities and derivation scope are recorded in facet-type-provenance.json; no proof admission implied',sdk:'Existing prismpm.lock; no dependency or profile upgrade'},releaseBlockers:artifacts.filter(a=>!a.redistributionCleared).map(a=>({path:a.path,reason:a.licenseStatus})),...p,assets:artifacts,sources,sourceDigest:'sha256:'+hash(JSON.stringify(sources))}; +} +export function run(args=process.argv.slice(2)){ + if(args.length>1||args.length===1&&!['--write','--check'].includes(args[0]))fail('usage: node scripts/check-product.mjs [--write|--check]'); + const output=resolve(root,'product/contracts.json'),expected=JSON.stringify(productRegister(),null,2)+'\n'; + if(args[0]==='--write'){writeFileSync(output,expected);process.stdout.write('Wrote project-owned product register; no verification claim.\n');} + else {if(readFileSync(output,'utf8')!==expected)fail('stale product/contracts.json; run node scripts/check-product.mjs --write');process.stdout.write('Product graph, architecture, source binding and local artifact inventory match.\n');} +} +if(process.argv[1]&&resolve(process.argv[1])===fileURLToPath(import.meta.url))run(); diff --git a/scripts/check-source-evidence.mjs b/scripts/check-source-evidence.mjs new file mode 100644 index 0000000..70ca36b --- /dev/null +++ b/scripts/check-source-evidence.mjs @@ -0,0 +1,143 @@ +#!/usr/bin/env node +/** Check retained proof inputs, not the proof or the native acceptance gate. */ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { lstatSync, readFileSync, readdirSync } from 'node:fs'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const hash = bytes => createHash('sha256').update(bytes).digest('hex'); +const projectRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..'); + +/** Discover current compiler inputs, including additions outside an old summary. */ +export function discoverSourceInputs(root, manifest) { + // LexLean discovers .lex.tex modules; a lexicon reads lexicon.toml and entries/. + assert.ok(lstatSync(resolve(root, 'app')).isDirectory(), 'app is not a nonsymlink directory'); + const inputs = ['app/lake-manifest.json', 'app/lakefile.toml', 'app/lean-toolchain', 'app/lexlean.lock', 'app/lexlean.toml', 'app/prism.toml', 'app/prismpm.toml']; + function walk(path, includes = () => true) { + assert.ok(lstatSync(resolve(root, path)).isDirectory(), `input root is not a nonsymlink directory: ${path}`); + for (const name of readdirSync(resolve(root, path)).sort()) { + const child = `${path}/${name}`, stat = lstatSync(resolve(root, child)); + assert.ok(!stat.isSymbolicLink(), `source input is a symlink: ${child}`); + if (stat.isDirectory()) walk(child, includes); + else if (includes(child)) { assert.ok(stat.isFile(), `source input is not a file: ${child}`); inputs.push(child); } + } + } + walk('app/src', path => path.endsWith('.lex.tex')); + for (const input of manifest.inputs.filter(input => input.kind === 'lexicon' && input.path !== 'embedded')) { + assert.ok(/^language\/[A-Za-z0-9_./-]+$/.test(input.path) && input.path.split('/').every(part => part && part !== '.' && part !== '..'), 'invalid lexicon input path'); + // Reject a symlink in any lexicon directory component, not just its files. + const parts = `app/${input.path}`.split('/'); + for (let i = 1; i <= parts.length; i++) { + assert.ok(lstatSync(resolve(root, ...parts.slice(0, i))).isDirectory(), 'lexicon root is not a nonsymlink directory'); + } + inputs.push(`app/${input.path}/lexicon.toml`); + if (lstatSync(resolve(root, `app/${input.path}/entries`), { throwIfNoEntry: false })) walk(`app/${input.path}/entries`); + } + return inputs.sort().map(path => { + assert.ok(lstatSync(resolve(root, path)).isFile(), `input is not a nonsymlink file: ${path}`); + return { path, sha256: hash(readFileSync(resolve(root, path))) }; + }); +} + +/** Validate supplied records before retention, or check the retained files. */ +export function validateSourceEvidence(root, summary, attestationBytes, manifestBytes) { + const read = path => readFileSync(resolve(root, path)); + const json = path => JSON.parse(read(path)); + const attestation = JSON.parse(attestationBytes), manifest = JSON.parse(manifestBytes); + assert.equal(summary.version, 1, 'unsupported source summary'); + assert.equal(attestation.spec, 'lexlean/attestation/2', 'unsupported attestation'); + assert.equal(manifest.spec, 'lexlean/build-manifest/1', 'unsupported build manifest'); + assert.equal(summary.attestation_path, 'product/source-attestation.json'); + assert.equal(summary.build_manifest_path, 'product/source-build-manifest.json'); + assert.equal(hash(attestationBytes), summary.attestation_sha256, 'attestation bytes differ'); + assert.deepEqual({ byte_length: manifestBytes.length, sha256: hash(manifestBytes) }, attestation.build_manifest, 'build manifest bytes differ'); + assert.equal(summary.status, 'verified', 'source summary is not verified'); + assert.equal(attestation.status, 'verified', 'attestation is not verified'); + for (const key of ['attestation_id', 'source_id', 'semantic_id', 'build_id']) { + assert.match(summary[key], /^[0-9a-f]{64}$/, `invalid ${key}`); + assert.equal(summary[key], attestation[key], `${key} differs`); + if (key !== 'attestation_id') assert.equal(summary[key], manifest[key], `${key} differs from manifest`); + } + + const current = discoverSourceInputs(root, manifest); + assert.deepEqual(summary.sources, current, 'retained source evidence is stale or incomplete'); + const inputPaths = new Set(current.map(input => input.path)); + const sourceInputs = manifest.inputs.filter(input => input.kind === 'source'); + const modules = current.filter(input => input.path.startsWith('app/src/') && input.path.endsWith('.lex.tex')).map(input => input.path); + assert.deepEqual(sourceInputs.map(input => `app/${input.path}`).sort(), modules, 'manifest source closure differs'); + assert.deepEqual(manifest.modules.map(module => `app/${module.source_path}`).sort(), modules, 'manifest module closure differs'); + for (const input of manifest.inputs.filter(input => ['source', 'lock', 'project-config'].includes(input.kind))) { + assert.ok(inputPaths.has(`app/${input.path}`), `undeclared manifest input: ${input.path}`); + const bytes = read(`app/${input.path}`); + assert.equal(hash(bytes), input.sha256, `manifest input differs: ${input.path}`); + assert.equal(bytes.length, input.byte_length, `manifest length differs: ${input.path}`); + } + // LexLean tree-digest v1: domain + NUL, then bytewise-sorted framed paths + // and file bytes. Do not trust a freshly generated summary to bind old proof + // to a changed lexicon: the manifest itself must bind its current tree. + for (const input of manifest.inputs.filter(input => input.kind === 'lexicon' && input.path !== 'embedded')) { + const prefix = `app/${input.path}/`; + const files = current.map(input => input.path).filter(path => path.startsWith(prefix)) + .sort((a, b) => Buffer.compare(Buffer.from(a), Buffer.from(b))); + const digest = createHash('sha256').update('lexlean-tree-v1\0'); + let byteLength = 0; + for (const path of files) { + const name = Buffer.from(path.slice(prefix.length)), bytes = read(path); + const pathLength = Buffer.alloc(4), size = Buffer.alloc(8); + pathLength.writeUInt32BE(name.length); + size.writeBigUInt64BE(BigInt(bytes.length)); + digest.update(pathLength).update(name).update(size).update(bytes); + byteLength += bytes.length; + } + assert.equal(digest.digest('hex'), input.sha256, `manifest lexicon differs: ${input.path}`); + assert.equal(byteLength, input.byte_length, `manifest lexicon length differs: ${input.path}`); + } + assert.deepEqual(manifest.inputs.filter(input => input.kind === 'lock').map(input => input.path), ['lexlean.lock'], 'manifest lock closure differs'); + assert.deepEqual(manifest.inputs.filter(input => input.kind === 'project-config').map(input => input.path), ['lexlean.toml'], 'manifest config closure differs'); + assert.ok(manifest.inputs.every(input => ['source', 'lock', 'project-config', 'lexicon'].includes(input.kind)), 'unsupported manifest input kind'); + for (const input of attestation.lake_workspace) { + assert.ok(inputPaths.has(`app/${input.path}`), `undeclared workspace input: ${input.path}`); + assert.equal(hash(read(`app/${input.path}`)), input.sha256, `workspace input differs: ${input.path}`); + } + assert.deepEqual(attestation.lake_workspace.map(input => input.path).sort(), ['lake-manifest.json', 'lakefile.toml', 'lean-toolchain'], 'workspace input closure differs'); + assert.ok(modules.length > 0 && attestation.declarations.length > 0 && attestation.processes.length > 0, 'empty proof evidence'); + assert.equal(summary.module_count, modules.length); + assert.equal(summary.declaration_audits, attestation.declarations.length); + assert.equal(summary.successful_processes, attestation.processes.length); + for (const declaration of attestation.declarations) assert.equal(declaration.result, 'ok', `failed declaration: ${declaration.name}`); + const counts = {}; + for (const process of attestation.processes) { + assert.equal(process.exit_code, 0, `failed process: ${process.module}`); + assert.ok(['lean', 'leanchecker'].includes(process.tool), 'unexpected proof process'); + assert.equal(hash(process.stdout), process.stdout_sha256, 'stdout digest differs'); + assert.equal(hash(process.stderr), process.stderr_sha256, 'stderr digest differs'); + assert.equal(process.executable_sha256, attestation.toolchain[process.tool].executable_sha256, 'process tool identity differs'); + counts[process.tool] = (counts[process.tool] ?? 0) + 1; + } + assert.deepEqual(summary.processes_by_tool, counts); + assert.ok(counts.lean > 0 && counts.leanchecker > 0, 'both proof tools are required'); + + const lock = json('prismpm.lock'); + const architecture = { x86_64: 'amd64', aarch64: 'arm64' }[attestation.host.arch]; + assert.ok(architecture && attestation.host.os === 'linux', 'unsupported evidence host'); + const platform = lock.platforms.find(platform => platform.platform === `linux/${architecture}`); + assert.ok(platform, 'evidence platform absent from pinned SDK'); + for (const [id, identity] of [['lexlean', attestation.lexlean], ['lean', attestation.toolchain.lean], ['leanchecker', attestation.toolchain.leanchecker]]) { + assert.equal(platform.inventory.find(item => item.id === id)?.digest, `sha256:${identity.executable_sha256}`, `proof tool differs from pinned SDK: ${id}`); + } + assert.equal(manifest.compiler.semantics_id, attestation.lexlean.compiler_semantics); + assert.equal(manifest.compiler.version, attestation.lexlean.version); + return summary; +} + +export function checkSourceEvidence(root = projectRoot) { + const read = path => readFileSync(resolve(root, path)); + return validateSourceEvidence(root, JSON.parse(read('product/source-verification.json')), + read('product/source-attestation.json'), read('product/source-build-manifest.json')); +} + +if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + const summary = checkSourceEvidence(); + console.log(`Retained source evidence matches ${summary.module_count} modules and pinned proof tools. Native Prism acceptance remains separate.`); +} diff --git a/scripts/compute-budget-model-tests.mjs b/scripts/compute-budget-model-tests.mjs new file mode 100644 index 0000000..828bdec --- /dev/null +++ b/scripts/compute-budget-model-tests.mjs @@ -0,0 +1,262 @@ +/** Source-subset conformance tests, not cryptographic validation or kernel proofs. + * Digest fixtures are typed host observations; no claim is made that these tokens + * are real hashes of the records. Canonical wire hashing stays a host obligation. + */ +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { model } from '../src/layer1-uor/generated-model.js'; +const call = (name, ...args) => model['Stitch.' + name](...args); +const root = n => Object.fromEntries(Array.from({ length: 8 }, (_, i) => ['w' + i, BigInt(n + i)])); +const changeRoot = r => ({ ...r, w7: r.w7 + 1n }); +const digest = expected => ({ expected: structuredClone(expected), observed: structuredClone(expected), domainMatches: true, canonicalSerializationMatches: true }); +const observed = (input, expected) => ({ input: structuredClone(input), digest: digest(expected) }); +const resources = (transferBytes = 0n, storageBytes = 0n, computeWork = 0n, refreshRequests = 0n) => ({ transferBytes: BigInt(transferBytes), storageBytes: BigInt(storageBytes), computeWork: BigInt(computeWork), refreshRequests: BigInt(refreshRequests) }); +const zero = resources(); +const clone = x => structuredClone(x); +const supported = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17]; +function independentStep(op, x, y, bits) { + const m = 1n << BigInt(bits), mask = m - 1n; + const value = [() => -x, () => ~x, () => x + 1n, () => x - 1n, + () => x + y, () => x - y, () => x * y, () => x ^ y, + () => x & y, () => x | y, () => BigInt(x <= y), () => BigInt(x < y), + () => BigInt(x >= y), () => BigInt(x > y), null, + () => y === 0n ? 0n : x / y, () => y === 0n ? 0n : x % y, () => { let result = 1n; for (const bit of y.toString(2)) { result = result * result & mask; if (bit === '1') result = result * x & mask; } return result; }][op](); + return value & mask; +} +function replay(job, step) { + let value = job.initialValue; + for (const instruction of job.program.instructions.slice(0, Number(step))) value = independentStep(Number(instruction.opcode), value, instruction.argument, job.program.bits); + return value; +} +function jobCommitments(job) { + return { + program: observed({ version: 1n, modelRoot: job.program.modelRoot, bits: job.program.bits, instructions: clone(job.program.instructions) }, job.program.programRoot), + input: observed({ version: 1n, bits: job.program.bits, value: job.initialValue }, job.inputRoot), + job: observed({ version: 1n, programRoot: job.program.programRoot, inputRoot: job.inputRoot, modelRoot: job.program.modelRoot, initialValue: job.initialValue }, job.jobRoot) + }; +} +function checkpointCommitments(job, checkpoint) { + const { jobRoot, programRoot, inputRoot, modelRoot, step, priorRoot, stateRoot, value } = checkpoint; + return { + state: observed({ version: 1n, jobRoot, programRoot, inputRoot, modelRoot, bits: job.program.bits, step, value }, stateRoot), + checkpoint: observed({ version: 1n, jobRoot, programRoot, inputRoot, modelRoot, step, priorRoot, stateRoot, value }, checkpoint.checkpointRoot) + }; +} +function fixture() { + const job = { jobRoot: root(10), program: { programRoot: root(20), modelRoot: root(30), bits: 8n, instructions: [{ opcode: 4n, argument: 1n }, { opcode: 7n, argument: 3n }, { opcode: 2n, argument: 0n }] }, inputRoot: root(40), initialValue: 255n }; + const checkpoint = (step, previous, identity) => ({ jobRoot: job.jobRoot, programRoot: job.program.programRoot, inputRoot: job.inputRoot, modelRoot: job.program.modelRoot, step, priorRoot: previous, stateRoot: root(identity), checkpointRoot: root(identity + 10), value: replay(job, step) }); + const current = checkpoint(0n, root(50), 60), candidate = checkpoint(2n, current.checkpointRoot, 80); + return { job, current, candidate, jc: jobCommitments(job), cc: checkpointCommitments(job, current), nc: checkpointCommitments(job, candidate), expectedModelRoot: job.program.modelRoot }; +} +const accepted = f => call('Compute.committedCheckpointAllowed', f.job, f.candidate, f.jc, f.nc, 3n, f.expectedModelRoot); +const advance = f => call('Compute.advanceCheckpoint', f.job, f.current, f.candidate, f.jc, f.cc, f.nc, 3n, f.expectedModelRoot); + +test('full semantic admission rejects noncanonical operands, unsupported programs and out-of-ring inputs', () => { + const { job } = fixture(); + assert.equal(call('Compute.jobAllowed', job, 3), true); + assert.equal(call('Compute.jobAllowed', job, 2), false); + assert.equal(call('Compute.jobAllowed', { ...job, initialValue: 256n }, 3), false); + for (const bits of [0, 7, 24, 256]) assert.equal(call('Compute.jobAllowed', { ...job, program: { ...job.program, bits } }, 3), false); + for (const opcode of [14, 18, 99]) assert.equal(call('Compute.programAllowed', { ...job.program, instructions: [{ opcode, argument: 0 }] }, 3), false); + for (const opcode of supported) { + const good = { opcode, argument: opcode < 4 ? 0 : 255 }; + assert.equal(call('Compute.programAllowed', { ...job.program, instructions: [good] }, 1), true); + assert.equal(call('Compute.programAllowed', { ...job.program, instructions: [{ ...good, argument: opcode < 4 ? 1 : 256 }] }, 1), false); + } + for (const field of ['programRoot', 'modelRoot']) assert.equal(call('Compute.programAllowed', { ...job.program, [field]: { ...root(0), w3: 1n << 32n } }, 3), false); +}); + +test('all supported operations agree with an independent ring interpreter at every supported width', () => { + for (const bits of [8, 16, 32, 64, 128]) { + const m = 1n << BigInt(bits), values = [0n, 1n, m / 2n, m - 1n]; + for (const opcode of supported) for (const value of values) for (const argument of values) { + const instruction = { opcode, argument: opcode < 4 ? 0n : argument }; + assert.equal(call('Compute.ringStep', instruction, value, m), independentStep(opcode, value, instruction.argument, bits)); + } + } +}); + +test('every exact typed commitment input and digest observation field is bound', () => { + const base = fixture(); + assert.equal(accepted(base), true); + for (const container of ['jc', 'nc']) for (const name of Object.keys(base[container])) { + const input = base[container][name].input; + for (const field of Object.keys(input)) { + const f = clone(base), value = f[container][name].input[field]; + f[container][name].input[field] = typeof value === 'bigint' ? value + 1n : Array.isArray(value) + ? [...value, { opcode: 2n, argument: 0n }] : changeRoot(value); + assert.equal(accepted(f), false, `${container}.${name}.input.${field}`); + } + for (const side of ['expected', 'observed']) for (let word = 0; word < 8; word++) { + const f = clone(base); + f[container][name].digest[side]['w' + word] += 1n; + assert.equal(accepted(f), false, `${container}.${name}.digest.${side}.w${word}`); + } + for (const flag of ['domainMatches', 'canonicalSerializationMatches']) { + const f = clone(base); f[container][name].digest[flag] = false; + assert.equal(accepted(f), false, `${container}.${name}.${flag}`); + } + const f = clone(base), alien = root(900); + f[container][name].digest.expected = alien; + f[container][name].digest.observed = alien; + assert.equal(accepted(f), false, `${container}.${name}: mutually matching hashes cannot replace the expected root`); + } + const wrongModel = clone(base); wrongModel.expectedModelRoot = root(999); + assert.equal(accepted(wrongModel), false); + for (const field of ['bits', 'instructions']) { + const f = clone(base); + f.job.program[field] = field === 'bits' ? 16n : [{ opcode: 2n, argument: 0n }]; + assert.equal(accepted(f), false, `changed program ${field} under unchanged observed commitment`); + } + const changedInput = clone(base); changedInput.job.initialValue = 254n; + assert.equal(accepted(changedInput), false); +}); + +test('a self-consistent host commitment to a forged state still fails semantic replay', () => { + const f = fixture(); + f.candidate.value = 7n; + f.candidate.stateRoot = root(300); + f.candidate.checkpointRoot = root(320); + f.nc = checkpointCommitments(f.job, f.candidate); + assert.equal(call('Compute.stateCommitted', f.job, f.candidate, f.nc.state), true); + assert.equal(call('Compute.checkpointCommitted', f.candidate, f.nc.checkpoint), true); + assert.equal(accepted(f), false); + assert.deepEqual(advance(f), f.current); + const unsupported = fixture(); + unsupported.job.program.instructions[0].opcode = 14n; + unsupported.jc = jobCommitments(unsupported.job); + assert.equal(accepted(unsupported), false); +}); + +test('committed checkpoint transitions require both admitted endpoints and the exact retained predecessor', () => { + const f = fixture(); + assert.deepEqual(advance(f), f.candidate); + for (const mutation of [ + x => { x.candidate.priorRoot = root(999); x.nc = checkpointCommitments(x.job, x.candidate); }, + x => { x.candidate.step = x.current.step; x.candidate.value = x.current.value; x.nc = checkpointCommitments(x.job, x.candidate); }, + x => { x.candidate.step = 4n; x.nc = checkpointCommitments(x.job, x.candidate); }, + x => { x.current.value = 2n; x.cc = checkpointCommitments(x.job, x.current); }, + x => { x.cc.checkpoint.input.value += 1n; } + ]) { + const bad = clone(f); mutation(bad); + assert.deepEqual(advance(bad), bad.current); + } + for (let cut = 0; cut <= 3; cut++) { + const prefix = f.job.program.instructions.slice(0, cut), suffix = f.job.program.instructions.slice(cut), modulus = 256n; + assert.equal(call('Compute.execute', [...prefix, ...suffix], f.job.initialValue, modulus), call('Compute.execute', suffix, call('Compute.execute', prefix, f.job.initialValue, modulus), modulus)); + } +}); + +function ledger(limit = resources(20, 20, 20, 20), epoch = 7n) { + return { budget: { epoch, start: 0n, end: 100n, last: 0n, limit, spent: zero, reserved: zero }, reservations: [] }; +} +const settlement = (actionId, actual, epoch = 7n, tag = 'Known') => ({ actionId, epoch, actual, outcome: { tag, fields: [] } }); +const charge = l => Object.fromEntries(Object.keys(zero).map(k => [k, l.budget.spent[k] + l.budget.reserved[k]])); + +test('ledger reservation IDs are immutable, epoch-bound and charged in independent resource dimensions', () => { + const empty = ledger(), id = root(1), cost = resources(8, 5, 3, 1); + assert.equal(call('Budget.ledgerValid', empty), true); + const a = call('Budget.reserveLedger', empty, id, cost, 10); + assert.equal(call('Budget.ledgerValid', a), true); + assert.deepEqual(a.budget.reserved, cost); + assert.equal(a.reservations.length, 1); + assert.equal(a.reservations[0].epoch, empty.budget.epoch); + assert.deepEqual(call('Budget.reserveLedger', a, id, resources(1), 11), a); + for (const now of [9, 100]) assert.deepEqual(call('Budget.reserveLedger', a, root(2), cost, now), a); + for (const dimension of Object.keys(zero)) { + const tooMuch = { ...zero, [dimension]: 21n }; + assert.deepEqual(call('Budget.reserveLedger', a, root(2), tooMuch, 11), a); + } + assert.deepEqual(call('Budget.reserveLedger', a, { ...id, w0: 1n << 32n }, cost, 11), a); +}); + +test('settlement consumes only its recorded ceiling, retains tombstones and cannot be replayed', () => { + const idA = root(10), idB = root(20), aCost = resources(8, 5, 3, 2), bCost = resources(4, 9, 1, 1); + const a = call('Budget.reserveLedger', ledger(), idA, aCost, 10); + const both = call('Budget.reserveLedger', a, idB, bCost, 11); + const actual = resources(6, 2, 1, 0), obs = settlement(idA, actual); + const after = call('Budget.settleLedger', both, obs, 12); + assert.equal(call('Budget.ledgerValid', after), true); + assert.deepEqual(after.budget.spent, actual); + assert.deepEqual(after.budget.reserved, bCost); + assert.equal(after.reservations.length, 2); + assert.equal(after.reservations.find(x => call('Identity.sameDigest', x.actionId, idA)).settled, true); + assert.deepEqual(call('Budget.settleLedger', after, obs, 13), after); + assert.deepEqual(call('Budget.reserveLedger', after, idA, aCost, 13), after); + for (const observation of [ + settlement(idA, zero, 6n), settlement(idA, zero, 8n), settlement(root(999), zero), + settlement(idA, zero, 7n, 'Unknown'), settlement(idA, resources(9)), + settlement(idA, resources(0, 6)), settlement(idA, resources(0, 0, 4)), settlement(idA, resources(0, 0, 0, 3)) + ]) assert.deepEqual(call('Budget.settleLedger', both, observation, 12), both); + for (const now of [10, 100]) assert.deepEqual(call('Budget.settleLedger', both, obs, now), both); + const final = call('Budget.settleLedger', after, settlement(idB, bCost), 14); + assert.equal(call('Budget.ledgerValid', final), true); + assert.deepEqual(final.budget.reserved, zero); + assert.deepEqual(final.budget.spent, resources(10, 11, 2, 1)); +}); + +test('unattributed pooled reserves and forged reservation histories fail closed', () => { + const original = call('Budget.reserveLedger', ledger(), root(1), resources(5, 4, 3, 2), 10); + const invalid = []; + let x = clone(original); x.budget.reserved.transferBytes += 1n; invalid.push(x); + x = clone(original); x.budget.spent.computeWork += 1n; invalid.push(x); + x = clone(original); x.reservations = []; invalid.push(x); + x = clone(original); x.reservations.push(clone(x.reservations[0])); invalid.push(x); + x = clone(original); x.reservations[0].epoch += 1n; invalid.push(x); + x = clone(original); x.reservations[0].actual = resources(1); invalid.push(x); + x = clone(original); x.reservations[0].actionId.w0 = 1n << 32n; invalid.push(x); + x = clone(original); x.reservations[0].settled = true; x.reservations[0].actual = resources(6); x.budget.reserved = zero; x.budget.spent = resources(6); invalid.push(x); + for (const bad of invalid) { + assert.equal(call('Budget.ledgerValid', bad), false); + assert.deepEqual(call('Budget.reserveLedger', bad, root(2), resources(1), 11), bad); + assert.deepEqual(call('Budget.settleLedger', bad, settlement(root(1), zero), 11), bad); + } + const newEpoch = ledger(undefined, 8n); + const reused = call('Budget.reserveLedger', newEpoch, root(1), resources(5), 10); + assert.deepEqual(call('Budget.settleLedger', reused, settlement(root(1), resources(1), 7n), 11), reused); +}); + +test('finite ledger traces preserve limits and settlement never increases any charge dimension', () => { + for (let ceiling = 0; ceiling <= 4; ceiling++) for (let actual = 0; actual <= 5; actual++) for (const tag of ['Known', 'Unknown']) { + const before = call('Budget.reserveLedger', ledger(resources(4, 4, 4, 4)), root(1), resources(ceiling, ceiling, ceiling, ceiling), 1); + const obs = settlement(root(1), resources(actual, actual, actual, actual), 7n, tag); + const after = call('Budget.settleLedger', before, obs, 2); + assert.equal(call('Budget.ledgerValid', after), true); + for (const k of Object.keys(zero)) assert.ok(charge(after)[k] <= charge(before)[k]); + if (tag === 'Unknown' || actual > ceiling) assert.deepEqual(after, before); + else assert.deepEqual(after.budget.spent, resources(actual, actual, actual, actual)); + } + for (let a = 0; a <= 3; a++) for (let b = 0; b <= 3; b++) { + const initial = ledger(resources(3, 3, 3, 3)); + const one = call('Budget.reserveLedger', initial, root(1), resources(a, a, a, a), 1); + const two = call('Budget.reserveLedger', one, root(2), resources(b, b, b, b), 2); + assert.equal(call('Budget.ledgerValid', two), true); + for (const k of Object.keys(zero)) assert.ok(charge(two)[k] <= 3n); + assert.equal(two.reservations.length, a + b <= 3 ? 2 : 1); + } +}); + +test('structural settlement equals an independent first-match update on the complete short journal corpus', () => { + const same = (a, b) => Object.keys(a).every(k => a[k] === b[k]); + const reference = (records, observation) => { + let consumed = false; + return records.map(record => { + if (consumed || !same(record.actionId, observation.actionId)) return clone(record); + consumed = true; + return { ...clone(record), actual: clone(observation.actual), settled: true }; + }); + }; + // Include duplicates and already settled entries: this checks the internal + // traversal's exact first-match semantics, independently of ledger admission. + for (let length = 0; length <= 4; length++) for (let pattern = 0; pattern < 3 ** length; pattern++) for (let settled = 0; settled < 2 ** length; settled++) { + let digits = pattern; + const records = Array.from({ length }, (_, i) => { + const actionId = root(digits % 3); digits = Math.floor(digits / 3); + return { actionId, epoch: 7n, ceiling: resources(8, 6, 4, 2), actual: resources(i, i, i, i), settled: Boolean(settled & (1 << i)) }; + }); + for (let selected = 0; selected < 4; selected++) { + const observation = settlement(root(selected), resources(3, 2, 1, 0)); + assert.deepEqual(call('Budget.recordSettlement', records, observation), reference(records, observation)); + } + } +}); diff --git a/scripts/facet-projection.mjs b/scripts/facet-projection.mjs new file mode 100644 index 0000000..9c187d9 --- /dev/null +++ b/scripts/facet-projection.mjs @@ -0,0 +1,128 @@ +/** Source preflight for the official facet links, not a Prism check or certificate. + * Rules: PrismPM f657782e5f0936f73b983f2f21758b63620dfffc, + * crates/prismpm/src/{features.rs,design/check.rs,holo/facets.rs,holo/facet_validate.rs}. + * The real pinned `prismpm --project app check` remains mandatory. + */ +import { literalRows } from './check-product.mjs'; + +const A='Foundation.Arch::', S='Foundation.Sec::', Q='Foundation.Qual::'; +const types=new Set([ + ...['Component','Edge','Stakeholder','Concern','Viewpoint','View','Feature','Journey','SystemProcess','SystemState','DesignView','OpmThing','OpmLink','UmlComponent','UmlConnector','UmlLifeline','UmlMessage','UmlState','UmlTransition'].map(x=>A+x), + ...['Asset','Threat','Risk','ApplicationSecurityControl','SecurityActivity','VerificationMeasurement'].map(x=>S+x), + ...['ProductQualityCharacteristic','QualitySubcharacteristic','QualityRequirement','QualityMeasure'].map(x=>Q+x) +]); +const fail=message=>{throw Error(`product facets: ${message}`);}; +const kind=row=>row.constructor.split('.').at(-1); + +export function validateFacetProjection(moduleTexts) { + const declarations=new Set(); + const all=[]; + for(const [module,text]of moduleTexts){ + for(const match of text.matchAll(/definition\{\s*name: (\w+)/g))declarations.add(module+'::'+match[1]); + all.push(...literalRows(text,types).map(row=>({...row,id:module+'::'+row.declaration}))); + } + const rows=type=>all.filter(row=>row.type===type); + const byType=type=>new Map(rows(type).map(row=>[row.id,row])); + const requireRef=(map,id,label)=>map.get(id)??fail(`unresolved ${label}: ${id}`); + const indexed=type=>{ + const result=rows(type).sort((a,b)=>a.idb.id?1:0); + result.forEach((row,index)=>{if(row.index!==index)fail(`noncanonical facet index ${row.id}: expected ${index}`);}); + return result; + }; + const at=(items,index,label)=>items[index]??fail(`unresolved ${label} index ${index}`); + const components=indexed(A+'Component'), edges=indexed(A+'Edge'); + const stakeholders=indexed(A+'Stakeholder'),concerns=indexed(A+'Concern'),viewpoints=indexed(A+'Viewpoint'); + const componentMap=byType(A+'Component'),edgeMap=byType(A+'Edge'),stakeholderMap=byType(A+'Stakeholder'); + const modelKinds=[...moduleTexts.values()].flatMap(text=>{ + const body=/name: ModelKind,[\s\S]*?constructors: \[([\s\S]*?)\n \]/.exec(text)?.[1]??''; + return [...body.matchAll(/name: (\w+), fields: \[\]/g)].map(m=>m[1]); + }); + for(const edge of edges){at(components,edge.fromIndex,'edge source');at(components,edge.toIndex,'edge target');} + for(const row of viewpoints){at(stakeholders,row.stakeholderIndex,'viewpoint stakeholder');at(concerns,row.concernIndex,'viewpoint concern');at(modelKinds,row.modelKindIndex,'viewpoint model kind');} + for(const row of indexed(A+'View')){at(viewpoints,row.viewpointIndex,'view viewpoint');at(modelKinds,row.modelKindIndex,'view model kind');} + const assets=indexed(S+'Asset'),threats=indexed(S+'Threat'),risks=indexed(S+'Risk'),controls=indexed(S+'ApplicationSecurityControl'); + for(const row of assets)at(components,row.componentIndex,'asset component'); + for(const row of risks){at(assets,row.assetIndex,'risk asset');at(threats,row.threatIndex,'risk threat');} + for(const row of controls)at(risks,row.riskIndex,'control risk'); + for(const type of ['SecurityActivity','VerificationMeasurement'])for(const row of indexed(S+type))at(controls,row.controlIndex,'security control'); + const characteristics=indexed(Q+'ProductQualityCharacteristic'),subs=indexed(Q+'QualitySubcharacteristic'),requirements=indexed(Q+'QualityRequirement'); + for(const row of subs)at(characteristics,row.characteristicIndex,'quality characteristic'); + for(const row of requirements)at(subs,row.subcharacteristicIndex,'quality subcharacteristic'); + for(const row of indexed(Q+'QualityMeasure'))at(requirements,row.requirementIndex,'quality requirement'); + const features=byType(A+'Feature'); + for(const row of features.values()){ + for(const field of ['calls','acceptance']){ + if(!row[field].length)fail(`empty feature ${field}: ${row.id}`); + for(const id of row[field])if(!declarations.has(id))fail(`unresolved feature ${field}: ${id}`); + } + } + for(const row of rows(A+'Journey')){ + requireRef(stakeholderMap,row.actor,'journey stakeholder'); + for(const id of row.steps)requireRef(features,id,'journey feature'); + } + const processes=byType(A+'SystemProcess'),states=byType(A+'SystemState'),views=byType(A+'DesignView'); + for(const row of [...processes.values(),...states.values()])requireRef(componentMap,row.owner,'process/state owner'); + const flows=(from,to)=>edges.some(edge=>components[edge.fromIndex].id===from&&components[edge.toIndex].id===to); + const connected=(a,b)=>a===b||flows(a,b)||flows(b,a); + const process=id=>requireRef(processes,id,'system process'); + const state=id=>requireRef(states,id,'system state'); + const once=(seen,value,label)=>{if(seen.has(value))fail(`duplicate ${label}: ${value}`);seen.add(value);}; + const diagramTypes={opmObjectProcess:['OpmThing','OpmLink'],umlComponent:['UmlComponent','UmlConnector'],umlSequence:['UmlLifeline','UmlMessage'],umlStateMachine:['UmlState','UmlTransition']}; + const elementTypes=new Set(Object.values(diagramTypes).flat().map(type=>A+type)); + for(const row of all.filter(row=>elementTypes.has(row.type))){ + const view=requireRef(views,row.view,'design view'); + if(!diagramTypes[kind(view.diagram)]?.includes(row.type.slice(A.length)))fail(`wrong diagram element ${row.id}`); + } + for(const view of views.values()){ + requireRef(byType(A+'Viewpoint'),view.viewpoint,'design viewpoint'); + const shown=type=>rows(A+type).filter(row=>row.view===view.id); + const unique=(items,field,label)=>{const seen=new Set();for(const row of items)once(seen,row[field],label);return seen;}; + const things=new Map(); + for(const row of shown('OpmThing')){ + const type=kind(row.kind);if(type==='object')requireRef(componentMap,row.subject,'OPM object');else process(row.subject); + if(things.has(row.subject))fail(`duplicate OPM thing ${row.subject}`);things.set(row.subject,type); + } + const links=new Set(); + for(const row of shown('OpmLink')){ + const type=kind(row.kind),source=requireRef(things,row.source,'OPM source'),target=requireRef(things,row.target,'OPM target'); + once(links,JSON.stringify([type,row.source,row.target]),'OPM link'); + if(['agent','instrument','consumption','effect','result'].includes(type)){ + const result=type==='result'; + if(source!==(result?'process':'object')||target!==(result?'object':'process'))fail(`OPM direction ${row.id}`); + const object=result?row.target:row.source,owner=process(result?row.source:row.target).owner; + if(!connected(object,owner))fail(`unbacked OPM object/process link ${row.id}`); + }else if(type==='invocation'){ + if(source!=='process'||target!=='process')fail(`OPM invocation direction ${row.id}`); + const from=process(row.source).owner,to=process(row.target).owner; + if(from!==to&&!flows(from,to))fail(`unbacked OPM invocation ${row.id}`); + } + } + const componentsShown=unique(shown('UmlComponent'),'component','UML component'); + for(const id of componentsShown)requireRef(componentMap,id,'UML component'); + unique(shown('UmlConnector'),'edge','UML connector'); + for(const row of shown('UmlConnector')){ + const edge=requireRef(edgeMap,row.edge,'UML edge'); + for(const index of [edge.fromIndex,edge.toIndex])if(!componentsShown.has(components[index].id))fail(`hidden UML connector endpoint ${row.id}`); + } + const lifelines=unique(shown('UmlLifeline'),'component','UML lifeline'); + unique(shown('UmlLifeline'),'order','UML lifeline position'); + for(const id of lifelines)requireRef(componentMap,id,'UML lifeline'); + unique(shown('UmlMessage'),'order','UML message position'); + for(const row of shown('UmlMessage')){ + for(const id of [row.source,row.target])if(!lifelines.has(id))fail(`missing message lifeline ${row.id}`); + const [caller,callee]=kind(row.kind)==='reply'?[row.target,row.source]:[row.source,row.target]; + if(process(row.process).owner!==callee)fail(`UML message process owner ${row.id}`); + if(caller!==callee&&!flows(caller,callee))fail(`unbacked UML message ${row.id}`); + } + const machineStates=shown('UmlState'),stateIds=unique(machineStates,'state','UML state'); + const owners=new Set(machineStates.map(row=>state(row.state).owner)); + if(owners.size>1)fail(`mixed state machine owners ${view.id}`); + if(machineStates.filter(row=>row.initial).length>1)fail(`multiple initial states ${view.id}`); + unique(shown('UmlTransition'),'order','UML transition position'); + for(const row of shown('UmlTransition')){ + for(const id of [row.source,row.target])if(!stateIds.has(id))fail(`missing transition state ${row.id}`); + if(!owners.has(process(row.trigger).owner))fail(`state transition process owner ${row.id}`); + } + } + return true; +} diff --git a/scripts/retain-authoring-evidence.mjs b/scripts/retain-authoring-evidence.mjs new file mode 100644 index 0000000..55c7837 --- /dev/null +++ b/scripts/retain-authoring-evidence.mjs @@ -0,0 +1,44 @@ +#!/usr/bin/env node +/** Select the exact output reported by real LexLean; never generate certificates. */ +import assert from 'node:assert/strict'; +import {createHash} from 'node:crypto'; +import {lstatSync,readFileSync} from 'node:fs'; +import {dirname,resolve} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import {retainSourceEvidence} from './retain-source-evidence.mjs'; +const root=resolve(dirname(fileURLToPath(import.meta.url)),'..'); +const digest=bytes=>createHash('sha256').update(bytes).digest('hex'); +function readOutput(base,path){ + const parts=path.split('/'); + assert.ok(lstatSync(base).isDirectory(),'output base is not a nonsymlink directory'); + for(let i=1;i'); + const summary=retainAuthoringEvidence(readFileSync(resolve(args[0]),'utf8')); + console.log(`Retained exact source attestation ${summary.attestation_id}; native Prism acceptance remains separate.`); +} diff --git a/scripts/retain-source-evidence.mjs b/scripts/retain-source-evidence.mjs new file mode 100644 index 0000000..c078b3e --- /dev/null +++ b/scripts/retain-source-evidence.mjs @@ -0,0 +1,85 @@ +#!/usr/bin/env node +/** Retain actual source-verifier records. Never runs or replaces a native gate. */ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { lstatSync, mkdtempSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs'; +import { dirname, join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { discoverSourceInputs, validateSourceEvidence } from './check-source-evidence.mjs'; + +const projectRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..'); +const hash = bytes => createHash('sha256').update(bytes).digest('hex'); + +/** Inputs are the unmodified files emitted by the actual pinned verifier. */ +export function retainSourceEvidence(attestationPath, manifestPath, root = projectRoot) { + function readRecord(path) { + assert.ok(lstatSync(path).isFile(), `evidence is not a nonsymlink file: ${path}`); + return readFileSync(path); + } + const attestationBytes = readRecord(attestationPath), manifestBytes = readRecord(manifestPath); + const attestation = JSON.parse(attestationBytes), manifest = JSON.parse(manifestBytes); + const sources = discoverSourceInputs(root, manifest); + const counts = {}; + for (const process of attestation.processes) counts[process.tool] = (counts[process.tool] ?? 0) + 1; + const summary = { + format: 'Stitch exact-source verification summary', + version: 1, + assurance: 'Summary of actual pinned LexLean/Lean/leanchecker/axiom verification; not a native Prism artifact certificate or whole-host guarantee', + attestation_id: attestation.attestation_id, + attestation_sha256: hash(attestationBytes), + source_id: attestation.source_id, + semantic_id: attestation.semantic_id, + build_id: attestation.build_id, + status: attestation.status, + module_count: manifest.modules.length, + declaration_audits: attestation.declarations.length, + successful_processes: attestation.processes.length, + processes_by_tool: counts, + sources, + not_covered: [ + 'Native Prism/Holo and guest artifact build', + 'Browser/provider/VM correctness and physical network trials', + 'Licensing and release qualification', + 'Handwritten host-code representation correspondence beyond named runtime tests', + ], + attestation_path: 'product/source-attestation.json', + build_manifest_path: 'product/source-build-manifest.json', + }; + // Validate everything before touching any destination, including on first use + // when there is no previous summary. Retention does not establish provenance + // of arbitrary supplied JSON; use only records from the real verifier run. + validateSourceEvidence(root, summary, attestationBytes, manifestBytes); + const product = resolve(root, 'product'); + assert.ok(lstatSync(product).isDirectory(), 'product is not a nonsymlink directory'); + const records = [ + ['source-attestation.json', attestationBytes], + ['source-build-manifest.json', manifestBytes], + ['source-verification.json', Buffer.from(`${JSON.stringify(summary, null, 2)}\n`)], + ]; + for (const [name] of records) { + const existing = lstatSync(join(product, name), { throwIfNoEntry: false }); + assert.ok(!existing || existing.isFile(), `destination is not a nonsymlink file: product/${name}`); + } + const stage = mkdtempSync(join(product, '.source-evidence-')); + try { + for (const [name, bytes] of records) writeFileSync(join(stage, name), bytes, { flag: 'wx' }); + // Detect a changed source or SDK pin while preparing the files. Replace the + // summary last: an interrupted multi-file replacement must fail closed. + validateSourceEvidence(root, summary, attestationBytes, manifestBytes); + for (const [name] of records) renameSync(join(stage, name), join(product, name)); + } finally { + rmSync(stage, { recursive: true, force: true }); + } + return summary; +} + +if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + const args = process.argv.slice(2); + if (args.length !== 2 || args.some(arg => arg.startsWith('--'))) { + console.error('usage: node scripts/retain-source-evidence.mjs '); + process.exitCode = 64; + } else { + const summary = retainSourceEvidence(resolve(args[0]), resolve(args[1])); + console.log(`Retained actual source evidence for ${summary.module_count} modules. Native Prism acceptance remains separate.`); + } +} diff --git a/scripts/verify-custody.py b/scripts/verify-custody.py new file mode 100644 index 0000000..afaa460 --- /dev/null +++ b/scripts/verify-custody.py @@ -0,0 +1,201 @@ +#!/usr/bin/env python3 +"""Independent stdlib implementation of Stitch's raw custody commitments. + +No JavaScript/Prism runtime or network is used. --write-fixtures is for deliberate +fixture regeneration; the default only verifies the checked-in vectors and all +three recovery pairs, then tests malformed encodings. This establishes agreement +on this bounded corpus, not whole-browser formal correspondence or durability. +""" +import argparse +import copy +import hashlib +import json +import pathlib +import struct + +ROOT = pathlib.Path(__file__).resolve().parents[1] +FIXTURE = ROOT / 'tests/fixtures/custody-vectors.json' +MAX_BYTES = 16 * 1024 * 1024 + + +def digest(payload, domain): + frame = ('stitch/' + domain + '/v1\0').encode('ascii') + struct.pack('>Q', len(payload)) + payload + return 'sha256:' + hashlib.sha256(frame).hexdigest() + + +def canonical(value): + # Fixture/model record keys are ASCII. ensure_ascii=False matches compact + # JSON UTF-8, not an escaped representation of non-ASCII content. + return json.dumps(value, ensure_ascii=False, sort_keys=True, separators=(',', ':'), allow_nan=False).encode('utf-8') + + +def fragment_digest(encoding, index, data): + return digest(bytes.fromhex(encoding[7:]) + struct.pack('>I', index) + data, 'fragment') + + +def split(data): + n = (len(data) + 1) // 2 + left = data[:n] + right = data[n:] + bytes(n - len(data[n:])) + return [left, right, bytes(a ^ b for a, b in zip(left, right))] + + +def create(data): + assert len(data) <= MAX_BYTES + shards = split(data) + encoding = digest(data, 'encoding') + body = { + 'version': 1, + 'object': {'digestAlgorithm': 'sha256', 'contentDigest': digest(data, 'object'), 'byteLength': len(data)}, + 'encoding': {'format': 'raw', 'encodingDigest': encoding, 'byteLength': len(data), 'dependencies': []}, + 'fragments': {'scheme': 'xor-2-of-3', 'threshold': 2, 'count': 3, 'byteLength': len(shards[0]), + 'digests': [fragment_digest(encoding, i, b) for i, b in enumerate(shards)]}, + } + return dict(body, manifestDigest=digest(canonical(body), 'manifest')), shards + + +def keys(value, expected): + assert type(value) is dict and set(value) == set(expected) + + +def is_digest(value): + assert type(value) is str and len(value) == 71 and value.startswith('sha256:') + assert all(c in '0123456789abcdef' for c in value[7:]) + + +def verify_manifest(m): + keys(m, ['version', 'object', 'encoding', 'fragments', 'manifestDigest']) + keys(m['object'], ['digestAlgorithm', 'contentDigest', 'byteLength']) + keys(m['encoding'], ['format', 'encodingDigest', 'byteLength', 'dependencies']) + keys(m['fragments'], ['scheme', 'threshold', 'count', 'byteLength', 'digests']) + assert type(m['version']) is int and m['version'] == 1 + assert m['object']['digestAlgorithm'] == 'sha256' and m['encoding']['format'] == 'raw' + n = m['object']['byteLength'] + assert type(n) is int and 0 <= n <= MAX_BYTES + assert type(m['encoding']['byteLength']) is int and m['encoding']['byteLength'] == n + assert m['encoding']['dependencies'] == [] and type(m['encoding']['dependencies']) is list + f = m['fragments'] + assert f['scheme'] == 'xor-2-of-3' and type(f['threshold']) is int and f['threshold'] == 2 + assert type(f['count']) is int and f['count'] == 3 + assert type(f['byteLength']) is int and f['byteLength'] == (n + 1) // 2 + assert type(f['digests']) is list and len(f['digests']) == 3 + for d in [m['manifestDigest'], m['object']['contentDigest'], m['encoding']['encodingDigest'], *f['digests']]: + is_digest(d) + body = {k: v for k, v in m.items() if k != 'manifestDigest'} + assert digest(canonical(body), 'manifest') == m['manifestDigest'] + + +def recover(m, supplied): + verify_manifest(m) + assert 2 <= len(supplied) <= 3 + assert len({i for i, _ in supplied}) == len(supplied) + shards = [None] * 3 + for index, data in supplied: + assert type(index) is int and 0 <= index < 3 and type(data) is bytes + assert len(data) == m['fragments']['byteLength'] + assert fragment_digest(m['encoding']['encodingDigest'], index, data) == m['fragments']['digests'][index] + shards[index] = data + if shards[0] is None: + shards[0] = bytes(a ^ b for a, b in zip(shards[1], shards[2])) + if shards[1] is None: + shards[1] = bytes(a ^ b for a, b in zip(shards[0], shards[2])) + n = m['object']['byteLength'] + if n % 2: + assert shards[1][-1] == 0 + data = (shards[0] + shards[1])[:n] + recreated, _ = create(data) + assert recreated == m + return data + + +def fixture_data(): + corpus = [('empty', b''), ('one-zero', b'\0'), ('odd', bytes([0, 1, 2, 254, 255])), + ('even', bytes([0, 1, 2, 3, 254, 255])), ('utf8', 'Stitch \u2603 \U0001f9f5'.encode()), + ('all-bytes', bytes(range(256)))] + vectors = [] + for name, data in corpus: + manifest, shards = create(data) + vectors.append({'name': name, 'objectHex': data.hex(), 'manifest': manifest, + 'fragments': [{'index': i, 'hex': b.hex()} for i, b in enumerate(shards)]}) + manifest, shards = create(bytes([1, 2, 3])) + invalid = [] + + def add(name, expected, m=None, supplied=None): + m = copy.deepcopy(manifest) if m is None else m + supplied = [(0, shards[0]), (1, shards[1])] if supplied is None else supplied + invalid.append({'name': name, 'expectedError': expected, 'manifest': m, + 'fragments': [{'index': i, 'hex': b.hex()} for i, b in supplied]}) + + add('duplicate-index', 'DuplicateFragment', supplied=[(0, shards[0]), (0, shards[0])]) + add('missing-fragment', 'InsufficientFragments', supplied=[(0, shards[0])]) + truncated = copy.deepcopy(manifest) + truncated['object']['contentDigest'] = truncated['object']['contentDigest'][:24] + add('truncated-object-digest', 'InvalidDigest', truncated) + dependencies = copy.deepcopy(manifest) + dependencies['encoding']['dependencies'] = ['sha256:' + 'a' * 64] + add('undeclared-external-basis', 'InvalidSchema', dependencies) + add('forged-fragment', 'FragmentDigestMismatch', supplied=[(0, bytes([shards[0][0] ^ 1, shards[0][1]])), (1, shards[1])]) + absent = copy.deepcopy(manifest) + absent['fragments']['digests'][2] = 'sha256:' + '0' * 64 + absent['manifestDigest'] = digest(canonical({k: v for k, v in absent.items() if k != 'manifestDigest'}), 'manifest') + add('inconsistent-absent-fragment', 'InvalidParity', absent) + padding = copy.deepcopy(manifest) + bad_shards = [shards[0], bytes([shards[1][0], 7]), bytes([shards[2][0], shards[2][1] ^ 7])] + padding['fragments']['digests'] = [fragment_digest(padding['encoding']['encodingDigest'], i, b) for i, b in enumerate(bad_shards)] + padding['manifestDigest'] = digest(canonical({k: v for k, v in padding.items() if k != 'manifestDigest'}), 'manifest') + add('nonzero-padding', 'InvalidPadding', padding, [(0, bad_shards[0]), (1, bad_shards[1])]) + wrong_object = copy.deepcopy(manifest) + wrong_object['object']['contentDigest'] = 'sha256:' + '0' * 64 + wrong_object['manifestDigest'] = digest(canonical({k: v for k, v in wrong_object.items() if k != 'manifestDigest'}), 'manifest') + add('object-does-not-match', 'ObjectDigestMismatch', wrong_object) + wrong_encoding = copy.deepcopy(manifest) + wrong_encoding['encoding']['encodingDigest'] = 'sha256:' + '0' * 64 + wrong_encoding['fragments']['digests'] = [fragment_digest(wrong_encoding['encoding']['encodingDigest'], i, b) for i, b in enumerate(shards)] + wrong_encoding['manifestDigest'] = digest(canonical({k: v for k, v in wrong_encoding.items() if k != 'manifestDigest'}), 'manifest') + add('encoding-does-not-match', 'EncodingDigestMismatch', wrong_encoding) + return {'version': 1, 'hashFrame': 'UTF8(stitch//v1\\0)||uint64be(length)||payload', + 'vectors': vectors, 'invalidVectors': invalid} + + +def must_reject(action): + try: + action() + except (AssertionError, KeyError, ValueError, TypeError, IndexError): + return + raise AssertionError('Malformed input was accepted') + + +def main(): + args = argparse.ArgumentParser() + args.add_argument('--write-fixtures', action='store_true') + options = args.parse_args() + generated = fixture_data() + if options.write_fixtures: + FIXTURE.parent.mkdir(parents=True, exist_ok=True) + FIXTURE.write_text(json.dumps(generated, ensure_ascii=False, indent=2) + '\n') + fixture = json.loads(FIXTURE.read_text()) + assert fixture == generated, 'Checked-in commitments differ from independent Python implementation' + pairs = [(0, 1), (0, 2), (1, 2)] + for v in fixture['vectors']: + data = bytes.fromhex(v['objectHex']) + shards = [bytes.fromhex(f['hex']) for f in v['fragments']] + for a, b in pairs: + assert recover(v['manifest'], [(a, shards[a]), (b, shards[b])]) == data + must_reject(lambda: recover(v['manifest'], [(0, shards[0]), (0, shards[0])])) + bad = copy.deepcopy(v['manifest']) + bad['object']['contentDigest'] = bad['object']['contentDigest'][:-1] + must_reject(lambda: verify_manifest(bad)) + for v in fixture['invalidVectors']: + supplied = [(f['index'], bytes.fromhex(f['hex'])) for f in v['fragments']] + must_reject(lambda: recover(v['manifest'], supplied)) + m, shards = create(bytes([1, 2, 3])) + bad = copy.deepcopy(m) + bad['fragments']['digests'][2] = digest(b'incorrect', 'fragment') + body = {k: v for k, v in bad.items() if k != 'manifestDigest'} + bad['manifestDigest'] = digest(canonical(body), 'manifest') + must_reject(lambda: recover(bad, [(0, shards[0]), (1, shards[1])])) + print(f"Independent Python custody verification: {len(fixture['vectors'])} valid vectors, {len(pairs) * len(fixture['vectors'])} recovery pairs, {len(fixture['invalidVectors'])} shared invalid vectors rejected") + + +if __name__ == '__main__': + main() diff --git a/scripts/verify-prism-id-vectors.py b/scripts/verify-prism-id-vectors.py new file mode 100644 index 0000000..4abd75a --- /dev/null +++ b/scripts/verify-prism-id-vectors.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Independent check of prism id canonical JSON and kappa vectors. + +Written from docs/prism-id.md, not from src/prism-id.js, using only the Python +standard library. A native, mobile or embedded implementation can be checked +against the same vectors the same way. +""" +import hashlib +import json +import sys +import unicodedata + + +class Refused(Exception): + pass + + +def string(text): + try: + text.encode('utf-8') + except UnicodeEncodeError as error: + raise Refused('not well-formed Unicode') from error + if unicodedata.normalize('NFC', text) != text: + raise Refused('not NFC') + out = ['"'] + for ch in text: + c = ord(ch) + simple = {'"': '\\"', '\\': '\\\\', '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r'} + if ch in simple: + out.append(simple[ch]) + elif c < 0x20: + out.append('\\u%04x' % c) + else: + out.append(ch) + out.append('"') + return ''.join(out) + + +def canonical(value): + if value is None: + return 'null' + if value is True: + return 'true' + if value is False: + return 'false' + if isinstance(value, int): + if abs(value) > 2 ** 53 - 1: + raise Refused('integer outside the safe range') + return str(value) + if isinstance(value, float): + raise Refused('number outside the integer subset') + if isinstance(value, str): + return string(value) + if isinstance(value, list): + return '[' + ','.join(canonical(v) for v in value) + ']' + if isinstance(value, dict): + for key in value: + string(key) + keys = sorted(value, key=lambda k: k.encode('utf-8')) + return '{' + ','.join(string(k) + ':' + canonical(value[k]) for k in keys) + '}' + raise Refused('not JSON') + + +def kappa(value): + return 'sha256:' + hashlib.sha256(canonical(value).encode('utf-8')).hexdigest() + + +def main(path): + with open(path, encoding='utf-8') as handle: + vectors = json.load(handle) + for v in vectors['canonical']: + got = canonical(v['value']) + if got != v['canonical'] or kappa(v['value']) != v['kappa']: + print('mismatch: ' + v['name'], file=sys.stderr) + return 1 + for v in vectors['refused']: + try: + canonical(v['value']) + except Refused: + continue + print('accepted a refused vector: ' + v['name'], file=sys.stderr) + return 1 + for record in vectors['prism']['records']: + if record['body']['kind'] == 'prism/genesis/1' and kappa(record['body']) != vectors['prism']['id']: + print('prism id is not the kappa of its genesis', file=sys.stderr) + return 1 + if record['body']['kind'] in ('prism/genesis/1', 'prism/bind/1'): + device = record['body']['device'] + if record['body']['kind'] == 'prism/genesis/1' and kappa(device) != record['signer']: + print('genesis signer is not the kappa of its device record', file=sys.stderr) + return 1 + print('verified %d canonical vectors and %d refusals' % (len(vectors['canonical']), len(vectors['refused']))) + return 0 + + +if __name__ == '__main__': + sys.exit(main(sys.argv[1])) diff --git a/site/catalog.js b/site/catalog.js new file mode 100644 index 0000000..b323692 --- /dev/null +++ b/site/catalog.js @@ -0,0 +1,36 @@ +/** Read-only presentation of a generated, source-derived inventory. Not a verifier. */ +export function validateCatalog(catalog) { + if (!catalog || catalog.format !== 'stitch/site-facets/1' || typeof catalog.assurance !== 'string' || !Array.isArray(catalog.facets) || catalog.facets.length > 100) throw new TypeError('Unrecognized facet inventory.'); + const names = new Set(); + for (const facet of catalog.facets) { + if (!facet || typeof facet.name !== 'string' || names.has(facet.name) || typeof facet.summary !== 'string' || typeof facet.evidenceStatus !== 'string' || !Number.isSafeInteger(facet.count) || facet.count < 0 || !/^app\/src\/(?:[A-Za-z0-9_-]+\/)*[A-Za-z0-9_-]+\.lex\.tex$/.test(facet.source)) throw new TypeError('Invalid source facet record.'); + names.add(facet.name); + } + return catalog; +} + +export function renderCatalog(document, catalog) { + validateCatalog(catalog); + const grid = document.createElement('div'); grid.className = 'facet-grid'; + for (const facet of catalog.facets) { + const card = document.createElement('article'); card.className = 'facet-card'; + const heading = document.createElement('h3'); heading.textContent = facet.name; + const summary = document.createElement('p'); summary.textContent = facet.summary; + const count = document.createElement('span'); count.className = 'facet-count'; count.textContent = `${facet.count} declarations`; + const evidence = document.createElement('p'); evidence.className = 'facet-status'; evidence.textContent = facet.evidenceStatus; + const link = document.createElement('a'); link.textContent = 'Read source ↗'; link.href = `./${facet.source}`; + card.append(heading, summary, count, evidence, link); grid.append(card); + } + document.getElementById('facetCatalogContent').replaceChildren(grid); + document.getElementById('facetCatalogStatus').textContent = catalog.assurance; +} + +if (typeof document !== 'undefined') { + fetch(new URL('./facets.json', import.meta.url), { credentials: 'omit' }).then(response => { + if (!response.ok) throw new Error('Facet inventory unavailable.'); + return response.json(); + }).then(catalog => renderCatalog(document, catalog)).catch(() => { + document.getElementById('facetCatalogContent').textContent = 'The facet inventory could not be loaded. Inspect the source repository for the current model.'; + document.getElementById('facetCatalogStatus').textContent = 'No coverage or verification status inferred.'; + }); +} diff --git a/site/explorer.js b/site/explorer.js new file mode 100644 index 0000000..cb2812d --- /dev/null +++ b/site/explorer.js @@ -0,0 +1,132 @@ +/** Local teaching surface. Reuses Stitch's real byte/manifest verifier, never transport. */ +import { createObject, recoverObject } from '../src/layer3-storage/custody.js'; + +export const EXPLORER_BYTE_LIMIT = 256; +export const DEFAULT_MESSAGE = 'Keep the bytes. Change the peers.'; +export const FRAGMENT_NAMES = Object.freeze(['A', 'B', 'Parity']); + +export async function encodeExample(text) { + if (typeof text !== 'string') throw new TypeError('Enter text to encode.'); + const bytes = new TextEncoder().encode(text); + if (bytes.length > EXPLORER_BYTE_LIMIT) throw new RangeError('Use at most 256 UTF-8 bytes in this local example.'); + return { text, bytes, ...await createObject(bytes) }; +} + +export async function inspectExample(example, available = [true, true, true], corrupted = null) { + if (!Array.isArray(available) || available.length !== 3 || available.some(x => typeof x !== 'boolean')) throw new TypeError('Choose the three fragment availability states.'); + if (corrupted !== null && ![0, 1, 2].includes(corrupted)) throw new TypeError('Choose a valid fragment to alter.'); + const supplied = example.fragments.filter(f => available[f.index]).map(f => ({ index: f.index, bytes: new Uint8Array(f.bytes) })); + const altered = supplied.find(f => f.index === corrupted); + if (altered && altered.bytes.length) altered.bytes[0] ^= 1; + if (supplied.length < 2) return { state: 'insufficient', count: supplied.length, title: 'Not enough fragments.', detail: 'Two distinct compatible fragments are required. The missing information cannot be recreated from one.', bytes: null }; + try { + const bytes = await recoverObject(example.manifest, supplied); + return { state: 'recovered', count: supplied.length, title: 'Exact bytes recovered.', detail: 'The supplied fragment commitments, encoding and reconstructed object all passed the existing Stitch verifier.', bytes }; + } catch (error) { + return { state: 'refused', count: supplied.length, title: 'Changed bytes refused.', detail: `Verification stopped (${error.code || 'verification error'}). Every supplied fragment is checked, even when two other fragments are intact.`, bytes: null }; + } +} + +export function hexPreview(bytes) { + return [...bytes.slice(0, 16)].map(b => b.toString(16).padStart(2, '0')).join(' ') + (bytes.length > 16 ? ' …' : '') || '(empty)'; +} + +export function installExplorer(document, { encodeObject = encodeExample, inspectObject = inspectExample } = {}) { + const get = id => document.getElementById(id); + let example = null; + let generation = 0; + let encodeEpoch = 0; + let encoding = false; + let available = [true, true, true]; + let corrupted = null; + const form = get('exampleForm'); + function resetControls() { + available = [true, true, true]; corrupted = null; + } + function renderFragments() { + example.fragments.forEach(fragment => { + const index = fragment.index; + const bytes = new Uint8Array(fragment.bytes); + if (corrupted === index && bytes.length) bytes[0] ^= 1; + get(`fragment${index}`).dataset.available = String(available[index]); + get(`fragment${index}`).dataset.corrupted = String(corrupted === index); + get(`available${index}`).checked = available[index]; + get(`fragmentBytes${index}`).textContent = hexPreview(bytes); + get(`fragmentSize${index}`).textContent = `${fragment.bytes.length} bytes`; + get(`fragmentState${index}`).textContent = !available[index] ? 'WITHHELD FROM RECOVERY' : corrupted === index ? 'ONE BYTE CHANGED' : 'SUPPLIED UNCHANGED'; + get(`corrupt${index}`).disabled = !available[index] || !bytes.length; + get(`corrupt${index}`).textContent = corrupted === index ? 'Restore byte' : 'Change one byte'; + get(`corrupt${index}`).setAttribute('aria-pressed', String(corrupted === index)); + }); + } + async function inspect() { + if (!example || encoding) return; + const version = ++generation; + renderFragments(); + const result = get('exampleResult'); + result.dataset.state = 'checking'; + get('exampleResultTitle').textContent = 'Checking exact commitments…'; + get('exampleResultDetail').textContent = 'Local verification is running.'; + get('recoveredText').textContent = ''; + get('recoveryCount').textContent = `${available.filter(Boolean).length} / 3`; + try { + const observation = await inspectObject(example, [...available], corrupted); + if (version !== generation) return; + result.dataset.state = observation.state; + get('exampleResultTitle').textContent = observation.title; + get('exampleResultDetail').textContent = observation.detail; + get('recoveredText').textContent = observation.bytes === null ? 'No recovered output accepted.' : new TextDecoder().decode(observation.bytes) || '(empty object)'; + } catch (error) { + if (version !== generation) return; + result.dataset.state = 'refused'; + get('exampleResultTitle').textContent = 'Local verification unavailable.'; + get('exampleResultDetail').textContent = error.message; + } + } + async function encode() { + const epoch = ++encodeEpoch; + ++generation; // Pending inspections of the previous sample cannot publish. + encoding = true; + get('encodeExample').disabled = true; + get('exampleControls').hidden = true; // No old result may describe the edited input. + get('exampleInputStatus').textContent = 'Encoding and committing the input locally…'; + try { + const next = await encodeObject(get('exampleInput').value); + if (epoch !== encodeEpoch) return; + example = next; resetControls(); + get('exampleInputStatus').textContent = `${next.bytes.length} UTF-8 bytes · 3 fragments of ${next.fragments[0].bytes.length} bytes · local example only`; + get('exampleCommitment').textContent = next.manifest.object.contentDigest; + get('exampleControls').hidden = false; + encoding = false; + await inspect(); + } catch (error) { + if (epoch !== encodeEpoch) return; + get('exampleInputStatus').textContent = `${error.message} Encode a valid input to show a result.`; + get('exampleControls').hidden = true; + } finally { + if (epoch === encodeEpoch) { encoding = false; get('encodeExample').disabled = false; } + } + } + form.addEventListener('submit', event => { event.preventDefault(); void encode(); }); + [0, 1, 2].forEach(index => { + get(`available${index}`).addEventListener('change', () => { if (encoding) return; available[index] = get(`available${index}`).checked; void inspect(); }); + get(`corrupt${index}`).addEventListener('click', () => { if (encoding) return; corrupted = corrupted === index ? null : index; void inspect(); }); + }); + const presets = { complete: [true, true, true], one: [true, false, true], two: [false, false, true], tamper: [true, true, true] }; + for (const [name, mask] of Object.entries(presets)) get(`preset${name}`).addEventListener('click', () => { + if (encoding || !example) return; + available = [...mask]; corrupted = name === 'tamper' && example.fragments[0].bytes.length ? 0 : null; void inspect(); + }); + get('exampleInput').value = DEFAULT_MESSAGE; + void encode(); + return { encode, inspect }; +} + +if (typeof document !== 'undefined') { + installExplorer(document); + // The fragment identifier belongs to the mesh key. Never use it for page navigation. + for (const button of document.querySelectorAll('[data-scroll-to]')) button.addEventListener('click', () => { + const target = document.getElementById(button.dataset.scrollTo); + target.focus({ preventScroll: true }); target.scrollIntoView({ behavior: 'auto', block: 'start' }); + }); +} diff --git a/site/facets.json b/site/facets.json new file mode 100644 index 0000000..406c84a --- /dev/null +++ b/site/facets.json @@ -0,0 +1,69 @@ +{ + "format": "stitch/site-facets/1", + "assurance": "Source-derived product inventory and obligations, not a verification receipt or whole-product certificate.", + "facets": [ + { + "name": "Product.Features", + "source": "app/src/Product/Features.lex.tex", + "summary": "Every live operator action and its guarded journey, linked to executable evidence.", + "count": 148, + "evidenceStatus": "Source-derived inventory; exact-revision SDK and browser qualification required" + }, + { + "name": "Product.Design", + "source": "app/src/Product/Design.lex.tex", + "summary": "The five-layer component graph, object process, publication sequence and unknown-write state machine.", + "count": 118, + "evidenceStatus": "Source-derived inventory; exact-revision SDK and browser qualification required" + }, + { + "name": "Product.Security", + "source": "app/src/Product/Security.lex.tex", + "summary": "Assets, STRIDE threats, qualitative risk assessments and traceable controls without false pass claims.", + "count": 255, + "evidenceStatus": "Source-derived inventory; exact-revision SDK and browser qualification required" + }, + { + "name": "Product.Quality", + "source": "app/src/Product/Quality.lex.tex", + "summary": "Source-derived coverage, configured resource limits, zero-defect requirements and open observations.", + "count": 48, + "evidenceStatus": "Source-derived inventory; exact-revision SDK and browser qualification required" + }, + { + "name": "Product.Brand", + "source": "app/src/Product/Brand.lex.tex", + "summary": "Stitch own palette, typography and scoped text-contrast measurements.", + "count": 8, + "evidenceStatus": "Source-derived inventory; exact-revision SDK and browser qualification required" + }, + { + "name": "Product.Users", + "source": "app/src/Product/Users.lex.tex", + "summary": "Real user groups, goals, tasks and environments; usability studies remain open.", + "count": 16, + "evidenceStatus": "Source-derived inventory; exact-revision SDK and browser qualification required" + }, + { + "name": "Product.Persistence", + "source": "app/src/Product/Persistence.lex.tex", + "summary": "What restores automatically, what remains volatile, and which trust decisions and effect outcomes require explicit handling.", + "count": 18, + "evidenceStatus": "Source-derived inventory; exact-revision SDK and browser qualification required" + }, + { + "name": "Product.Release", + "source": "app/src/Product/Release.lex.tex", + "summary": "Complete dependency/deployment inventory and separate source, native, runtime and browser qualification.", + "count": 46, + "evidenceStatus": "Source-derived inventory; exact-revision SDK and browser qualification required" + }, + { + "name": "Product.Compliance", + "source": "app/src/Product/Compliance.lex.tex", + "summary": "Named standards obligations, evidence procedures and explicit certification boundaries.", + "count": 17, + "evidenceStatus": "Source-derived inventory; exact-revision SDK and browser qualification required" + } + ] +} diff --git a/site/site.css b/site/site.css new file mode 100644 index 0000000..507645d --- /dev/null +++ b/site/site.css @@ -0,0 +1,134 @@ +/* Stitch's dark technical surface, with a reader-first layer above the console. */ +:root { --accent: #bde8cc; --site-muted: #a1aaa4; --site-line: #303832; } +html { scroll-padding-top: 24px; } +body { padding: 0; } +button, a, input, textarea, summary, select { -webkit-tap-highlight-color: transparent; } +button:disabled { opacity: .42; cursor: not-allowed; } +a { color: var(--accent); text-underline-offset: 4px; } +.site-shell { max-width: 1440px; margin: auto; padding: 0 6%; } +.site-nav { padding: 26px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--site-line); } +.site-wordmark { color: #f2f5ee; font-size: 27px; font-weight: 700; letter-spacing: -1.5px; display: flex; gap: 11px; align-items: center; } +.stitch-mark { width: 30px; height: 30px; } +.site-nav-actions { display: flex; gap: 24px; align-items: center; } +.site-nav button, .site-nav a { background: none; border: 0; color: #b6c1b8; padding: 8px 0; font-size: 12px; font-weight: 400; text-decoration: none; } +.site-nav button:hover, .site-nav a:hover { color: #fff; } +.site-eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; line-height: 1.8; } +.site-hero { padding: 76px 0 64px; display: grid; grid-template-columns: 1fr 1.08fr; gap: 28px; align-items: center; } +.site-hero h1 { margin: 23px 0; font: 500 clamp(38px, 4.5vw, 67px)/1.07 ui-sans-serif, system-ui, sans-serif; letter-spacing: -.055em; max-width: 650px; } +.site-hero h1 span { color: var(--accent); } +.site-lead { font: 400 17px/1.65 ui-sans-serif, system-ui, sans-serif; color: #b6bfb7; max-width: 500px; } +.site-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 29px; } +.site-primary, .site-secondary { padding: 13px 19px; border-radius: 4px; font-size: 12px; } +.site-primary { background: var(--accent); color: #101b13; border-color: var(--accent); } +.site-secondary { background: transparent; color: #d9e2d9; border-color: #465146; } +.site-note { color: var(--site-muted); font-size: 11px; line-height: 1.65; margin-top: 14px; } +.site-figure { margin: 0; min-width: 0; } +.site-figure img { display: block; width: 100%; height: auto; } +.site-figure figcaption { color: #93a096; font-size: 10px; line-height: 1.6; margin-top: 9px; text-align: center; } +.site-principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--site-line); border-bottom: 1px solid var(--site-line); } +.site-principles article { padding: 27px 24px; border-right: 1px solid var(--site-line); } +.site-principles article:first-child { padding-left: 0; } +.site-principles article:last-child { border: 0; } +.site-principles h2 { text-transform: none; letter-spacing: 0; font-size: 13px; margin-bottom: 8px; } +.site-principles p { font: 14px/1.6 ui-sans-serif, system-ui, sans-serif; color: var(--site-muted); } +.site-section { padding: 72px 0; scroll-margin-top: 20px; } +.site-section-head { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 30px; } +.site-section h2, .console-intro h2 { font: 500 clamp(26px, 3vw, 38px)/1.2 ui-sans-serif, system-ui, sans-serif; letter-spacing: -.035em; text-transform: none; margin: 12px 0; } +.site-section-head > p { max-width: 400px; font: 15px/1.6 ui-sans-serif, system-ui, sans-serif; color: var(--site-muted); } +.example-box { background: #111713; border: 1px solid #344138; border-radius: 8px; overflow: hidden; } +.example-top { padding: 25px; border-bottom: 1px solid #303c33; display: flex; gap: 24px; align-items: center; } +.example-top label { display: block; font-size: 11px; color: #afc5b6; margin-bottom: 9px; } +.example-input-wrap { flex: 1; min-width: 0; } +#exampleInput { width: 100%; padding: 12px; font-size: 13px; border-radius: 3px; background: #0a100c; } +#exampleInputStatus { margin-top: 9px; font-size: 11px; color: #9db3a4; min-height: 18px; } +.example-presets { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 19px 25px 4px; } +.example-presets > span { color: #99ab9e; font-size: 11px; margin-right: 5px; } +.example-presets button { background: #1d2820; color: #c6dacb; border: 1px solid #3a4b3f; padding: 9px 13px; border-radius: 30px; font-size: 11px; } +.fragment-grid { padding: 20px 25px 25px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } +.fragment-card { min-width: 0; border: 1px solid #526d59; background: #17251b; padding: 20px; border-radius: 5px; } +.fragment-card[data-available="false"] { border-style: dashed; border-color: #4e554f; background: #131714; } +.fragment-card[data-corrupted="true"][data-available="true"] { border-color: #c9a479; background: #292016; } +.fragment-card h3 { font-size: 24px; letter-spacing: -.04em; font-weight: 400; } +.fragment-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } +.fragment-card-head > span { color: #a5b5a9; font-size: 11px; } +.fragment-state { font-size: 9px; letter-spacing: .07em; color: #a9c9b4; min-height: 32px; margin: 9px 0; } +.fragment-hex { min-height: 54px; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; color: #d5e1d7; } +.fragment-card label { display: flex; align-items: center; gap: 8px; margin: 18px 0 14px; color: #c7d4ca; } +.fragment-card input { accent-color: var(--accent); width: 16px; height: 16px; } +.fragment-card button { background: transparent; border: 1px solid #526356; color: #bcd1c2; font-size: 10px; padding: 8px 10px; } +.example-result { border-top: 1px solid #354a3b; padding: 24px 25px; display: grid; grid-template-columns: 110px 1fr; gap: 20px; background: #18271d; } +.example-result[data-state="insufficient"], .example-result[data-state="refused"] { background: #282219; border-color: #635039; } +.recovery-counter { font-size: 28px; color: var(--accent); } +.recovery-counter span { display: block; font-size: 9px; color: #9fb1a4; text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; } +.example-result h3 { font-size: 15px; margin-bottom: 6px; } +.example-result p { color: #bdcabe; font: 14px/1.6 ui-sans-serif, system-ui, sans-serif; } +#recoveredText { display: block; font-size: 12px; line-height: 1.6; margin-top: 14px; overflow-wrap: anywhere; white-space: pre-wrap; color: #e4f0e5; } +.example-evidence { padding: 18px 25px; border-top: 1px solid #334236; } +.example-evidence summary { cursor: pointer; color: #adbbb0; font-size: 11px; } +.example-evidence p { margin-top: 12px; color: #a0b0a4; font-size: 11px; line-height: 1.7; } +#exampleCommitment { display: block; overflow-wrap: anywhere; color: #c1d8c8; margin-top: 12px; font-size: 11px; } +.site-boundary { margin-top: 15px; color: #a3ada5; font: 13px/1.6 ui-sans-serif, system-ui, sans-serif; } +.site-boundary strong { color: #dce5dd; } +.layer-list { border-top: 1px solid var(--site-line); } +.layer-row { display: grid; grid-template-columns: 48px 210px 1fr 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--site-line); align-items: baseline; } +.layer-number { color: #8bab97; font-size: 11px; } +.layer-row h3 { font-size: 14px; font-weight: 500; } +.layer-row p { font: 14px/1.6 ui-sans-serif, system-ui, sans-serif; color: var(--site-muted); } +.layer-row .layer-limit { color: #84998c; font-size: 12px; } +.site-boundaries { padding-top: 0; } +.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; } +.boundary-card { padding: 28px; background: #111612; border: 1px solid #303c33; border-radius: 5px; } +.boundary-card h3 { font-size: 14px; margin-bottom: 17px; } +.boundary-card ul { padding-left: 18px; color: #aab9ae; font: 14px/1.7 ui-sans-serif, system-ui, sans-serif; } +.boundary-card li + li { margin-top: 10px; } +.boundary-links { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 21px; font-size: 11px; } +.console-shell { padding: 40px max(14px, 4vw) 50px; border-top: 1px solid #3e4e41; background: #0d100e; } +.console-intro { max-width: 1320px; margin: 0 auto 28px; } +.console-intro p { max-width: 800px; color: #a4b0a7; font: 15px/1.7 ui-sans-serif, system-ui, sans-serif; } +.console-shell > header { max-width: 1320px; margin: 0 auto 12px; } +.console-shell #productTitle { font: 700 13px/1.5 var(--font); text-transform: none; letter-spacing: 0; } +.console-shell > .stratum, .console-shell > .grid, #metricsLabSection { max-width: 1320px; margin-left: auto; margin-right: auto; } +.console-shell .stratum { overflow-x: auto; border-radius: 4px; padding: 18px; gap: 12px; } +.console-shell button, .console-shell input, .console-shell select, .console-shell textarea { padding: 9px 12px; border-radius: 3px; } +.console-shell .muted { color: #9ba49e; } +.console-shell table { min-width: 620px; table-layout: fixed; } +.console-shell td, .console-shell th { overflow-wrap: anywhere; padding: 9px; } +.console-shell .stratum-head { flex-wrap: wrap; gap: 8px; } +.console-shell summary { cursor: pointer; padding: 7px 0; } +.console-shell #operatorJourneyNav { gap: 8px; } +.console-shell #operatorJourneyNav [aria-current="location"] { color: var(--accent); border-color: #94b7a0; background: #1b2a20; } +.site-footer { padding: 26px 6%; display: flex; gap: 15px; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid #2e3830; color: #8c9c90; font-size: 11px; } +:focus-visible { outline: 2px solid #bde8cc; outline-offset: 4px; } +@media (min-width: 1600px) { .site-hero { gap: 50px; } } +@media (max-width: 900px) { + .site-shell { padding: 0 5%; } .site-hero { grid-template-columns: 1fr; padding-top: 46px; gap: 32px; } + .site-hero h1 { max-width: 680px; font-size: clamp(42px, 7vw, 62px); } + .site-figure { max-width: 650px; margin: auto; } .site-section-head { align-items: start; flex-direction: column; gap: 8px; } + .site-section-head > p { max-width: 650px; } .layer-row { grid-template-columns: 26px 140px 1fr; gap: 12px; } .layer-limit { grid-column: 3; } + .site-nav-actions { gap: 17px; } +} +@media (max-width: 580px) { + .site-nav { padding: 19px 0; } .site-nav-actions { gap: 13px; } .site-nav-actions button, .site-nav-actions a { font-size: 10px; } .site-wordmark { font-size: 23px; gap: 7px; } + .site-nav-actions .nav-explore { display: none; } .site-hero { padding: 36px 0; } .site-hero h1 { font-size: 43px; } .site-lead { font-size: 16px; } + .site-principles { grid-template-columns: 1fr; } .site-principles article, .site-principles article:first-child { padding: 21px 0; border: 0; border-bottom: 1px solid var(--site-line); } + .site-section { padding: 45px 0; } .site-section-head { margin-bottom: 22px; } .example-top { align-items: stretch; flex-direction: column; gap: 8px; padding: 20px; } + .example-top button { align-self: flex-start; } .example-presets { padding: 18px 20px 0; } .fragment-grid { grid-template-columns: 1fr; padding: 20px; gap: 10px; } + .fragment-card { padding: 17px; } .fragment-state { min-height: 0; } .fragment-hex { min-height: 0; } .fragment-card label { margin: 13px 0; } + .example-result { grid-template-columns: 1fr; padding: 20px; gap: 14px; } .recovery-counter { font-size: 22px; } .recovery-counter span { display: inline; margin-left: 10px; } + .layer-row { grid-template-columns: 24px 1fr; gap: 10px; } .layer-row p, .layer-row .layer-limit { grid-column: 2; } + .boundary-grid { grid-template-columns: 1fr; } .boundary-card { padding: 22px; } .site-boundaries { padding-top: 0; } + .console-shell { padding: 35px 12px; } .console-shell .stratum { padding: 13px; } .console-shell .controls { gap: 10px; } + .console-shell .controls > input:not([type="checkbox"]), .console-shell .controls > textarea { flex-basis: 100%; width: 100% !important; } + .console-shell #operatorJourneyNav button { flex: 1 1 45%; text-align: left; min-height: 44px; } + .site-footer { font-size: 10px; } +} +@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } } +.facet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; } +.facet-card { background: #101611; border: 1px solid #303c33; border-radius: 4px; padding: 22px; min-width: 0; } +.facet-card h3 { font-size: 14px; color: #d6e6d9; margin-bottom: 12px; } +.facet-card > p { color: #a0b0a5; font: 13px/1.65 ui-sans-serif, system-ui, sans-serif; } +.facet-count { display: inline-block; color: #b7d9c3; font-size: 10px; margin: 16px 0 8px; padding: 5px 9px; border: 1px solid #3d5344; border-radius: 3px; } +.facet-card > .facet-status { font-size: 11px; color: #8b9d91; } +.facet-card a { display: inline-block; margin-top: 15px; font-size: 11px; } +@media (max-width: 900px) { .facet-grid { grid-template-columns: repeat(2, 1fr); } } +@media (max-width: 580px) { .facet-grid { grid-template-columns: 1fr; } } diff --git a/site/stitch-fabric.svg b/site/stitch-fabric.svg new file mode 100644 index 0000000..1bed2f8 --- /dev/null +++ b/site/stitch-fabric.svg @@ -0,0 +1,45 @@ + +One object, three fragments, one exact recovery +An object becomes fragments A, B and parity. The route through B is unavailable; A and parity reach recovery. Two compatible checked fragments reconstruct the exact object. This diagram represents the protocol, not live peers. + + + + + + + + + + + + + + + + + + + STITCH / RECOVERY PATH + ILLUSTRATIVE TOPOLOGY · NO LIVE NETWORK + + + Exact object + bytes + commitment + + + FRAGMENT 01A + first byte half + + FRAGMENT 02B + unavailable + + + FRAGMENT 03A ⊕ B + XOR parity + + + + Reconstruct. Verify.A ⊕ (A ⊕ B) = B + ANY 2 COMPATIBLE FRAGMENTS · EXACT DIGEST CHECK + + diff --git a/src/authority-ui.js b/src/authority-ui.js new file mode 100644 index 0000000..e171fdf --- /dev/null +++ b/src/authority-ui.js @@ -0,0 +1,113 @@ +/** Contextual origin-local administration. No network or automatic trust changes. */ +import { model } from './layer1-uor/generated-model.js'; +import { parseCanonicalJson } from './layer1-uor/custody.js'; +const controls = { inspectAuthorityStorageBtn: 0, rotateAuthorityBtn: 1, revokeAuthorityBtn: 2, + saveTrustedAnchorBtn: 3, restoreTrustedAnchorBtn: 4, migrateTrustedAnchorBtn: 5, + revokeTrustedAnchorBtn: 6, persistAuthorityStorageBtn: 7, exportAuthorityJournalBtn: 8, compactAuthorityJournalBtn: 9 }; +export function installAuthorityControls({ document, store, pointerObserver, onAuthorityChanged = () => {}, onChange = () => {}, + download = text => { + const url = URL.createObjectURL(new Blob([text], { type: 'application/json' })); + const link = document.createElement('a'); link.href = url; link.download = 'stitch-public-authority-journal.json'; link.click(); + setTimeout(() => URL.revokeObjectURL(url), 1000); + } }) { + const get = id => document.getElementById(id), panel = get('authorityLifecyclePanel'); + let busy = false, version = 0, status = null, trust = null; + const scope = () => [get('dnsQueryInput').value.trim(), get('pointerAuthorityInput').value.trim()]; + const message = text => { get('authorityLifecycleStatus').textContent = text; onChange(); }; + function invalidate() { version++; get('authorityLifecycleConsent').checked = false; get('authorityAnchorConsent').checked = false; } + for (const id of ['dnsQueryInput','pointerAuthorityInput','authorityExpectedKey','authorityAnchorKey','authorityAnchorDigest','pointerJsonInput']) get(id).addEventListener('input', invalidate); + panel.addEventListener('toggle', () => { if (!panel.open) invalidate(); }); + function allowed(id) { + let hasHead = false; + try { hasHead = !!pointerObserver().head; } catch {} + return model['Stitch.Authority.controlAllowed'](controls[id], busy, !!status, status?.status === 'active', hasHead, !!trust); + } + function render() { + for (const id of Object.keys(controls)) get(id).disabled = !allowed(id); + get('authoritySignerControls').hidden = !status; + get('authorityTrustControls').hidden = !trust; + panel.setAttribute('aria-busy', String(busy)); + } + async function refresh() { + const current = scope().join(':'); + status = await store.authorityStatus(); + const saved = scope()[0] ? await store.trustedAnchor(scope()[0]) : null; + if (current === scope().join(':')) trust = saved; + get('authoritySavedSummary').textContent = status + ? `Saved signer ${status.publicKey}; generation ${status.generation}; ${status.status}. Rotation never transfers trust.` : 'No saved signer. Missing storage does not prove that an earlier provider effect never happened.'; + get('authorityTrustSummary').textContent = trust + ? `Saved trust for ${trust.name}: ${trust.publicKey}, exact head ${trust.head.pointerDigest}; ${trust.status}.` : 'No saved trust anchor for this name. Independently confirm the current admitted head before saving it.'; + render(); + } + async function run(id, work) { + if (busy) return; + if (!allowed(id)) { message('This action requires the current saved signer, admitted head or saved trust anchor. Inspect storage and the exact scope first.'); return; } + busy = true; render(); + const start = ++version, captured = scope().join(':'), current = () => start === version && captured === scope().join(':') && panel.open; + try { await work(current); } + catch (error) { message(`Refused or interrupted: ${error.message}. Retained keys, anchors and unknown journals are not reset.`); } + finally { busy = false; get('authorityLifecycleConsent').checked = false; get('authorityAnchorConsent').checked = false; + try { await refresh(); } catch (error) { message(`Storage inspection failed: ${error.message}. Nothing was reset.`); } render(); } + } + function signerRequest(current) { + return { expectedPublicKey: get('authorityExpectedKey').value.trim(), confirmed: get('authorityLifecycleConsent').checked, scopeStillCurrent: current }; + } + const handlers = { + inspectAuthorityStorageBtn: async () => { + const result = await store.inspectStorage(); + message(`Origin storage: ${result.usageBytes ?? 'unknown'} bytes used / ${result.quotaBytes ?? 'unknown'} quota; persistent ${result.persistent ?? 'unknown'}; ${result.journalEntries} publication records, ${result.unknownEntries} unresolved. Estimates and persistence permission are not backups.`); + }, + rotateAuthorityBtn: async current => { + const next = await store.rotateAuthority(signerRequest(current)); + await onAuthorityChanged(next); + message(`New saved signer ${next.publicKey}. The former key is retired locally. No trust pin or DNS record changed. Independently distribute and accept the new key before using it for a name.`); + }, + revokeAuthorityBtn: async current => { + const next = await store.revokeAuthority(signerRequest(current)); + await onAuthorityChanged(next); + message(`Saved signer ${next.publicKey} revoked locally. Unknown publications remain reconcilable. This cannot revoke signatures, remote copies or key handles held by other origin scripts.`); + }, + saveTrustedAnchorBtn: async current => { + const observer = pointerObserver(); + await store.saveTrustedAnchor({ candidate: observer.head, expectedAuthorityKey: get('authorityAnchorKey').value.trim(), + expectedPointerDigest: get('authorityAnchorDigest').value.trim(), confirmed: get('authorityAnchorConsent').checked, scopeStillCurrent: current }); + message('Exact current head and independently confirmed key saved locally. Later admitted successors update this saved head transactionally. Keep an independent recent anchor outside this origin.'); + }, + restoreTrustedAnchorBtn: async current => { + const observer = pointerObserver(), saved = await store.trustedAnchor(observer.name); + if (!saved) throw Error('No saved anchor for this name.'); + await observer.restoreFromTrustedAnchor({ expectedDigest: saved.head.pointerDigest, scopeStillCurrent: current }); + message('Saved exact head restored into this same pinned observer. A different retained head is never replaced. No DNS or signing effect occurred.'); + }, + migrateTrustedAnchorBtn: async current => { + const [name] = scope(), prior = await store.trustedAnchor(name); + if (!prior) throw Error('Save the independently accepted original anchor first.'); + await store.migrateTrustedAnchor({ name, expectedAuthorityKey: prior.publicKey, expectedPointerDigest: prior.head.pointerDigest, + newAuthorityKey: get('authorityAnchorKey').value.trim(), newPointerDigest: get('authorityAnchorDigest').value.trim(), + candidate: parseCanonicalJson(get('pointerJsonInput').value, { maxBytes: 4096 }), confirmed: get('authorityAnchorConsent').checked, scopeStillCurrent: current }); + message('Independently confirmed replacement anchor saved. The old live observer and visible pin are unchanged. Enter the replacement key above and explicitly restore the saved head. Old-scope unknown publications remain reconcilable.'); + }, + revokeTrustedAnchorBtn: async current => { + const [name] = scope(), prior = await store.trustedAnchor(name); + if (!prior || !current() || !get('authorityAnchorConsent').checked || get('authorityAnchorKey').value.trim() !== prior.publicKey + || get('authorityAnchorDigest').value.trim() !== prior.head.pointerDigest) throw Error('Confirm the exact saved key and digest before revoking trust.'); + await store.revokeTrustedAnchor({ name, expectedAuthorityKey: prior.publicKey, expectedPointerDigest: prior.head.pointerDigest, confirmed: true, scopeStillCurrent: current }); + message('Saved trust revoked for this name. Admission and new publication with this pin are blocked. Migration needs an independently accepted replacement key. Existing unknown writes are retained.'); + }, + persistAuthorityStorageBtn: async () => { + const granted = await store.requestPersistence({ confirmed: true }); + message(granted ? 'Browser granted origin persistence. Clearing, device loss and browser policy can still lose keys and journals; keep independent public evidence.' : 'Browser did not grant persistence. No data was deleted; save independent evidence and monitor available quota.'); + }, + exportAuthorityJournalBtn: async () => { download(await store.exportPublicJournal()); message('Public keys, exact anchors and publication journal exported. No private keys or tokens. This evidence has no automatic journal-import path; do not treat it as permission to repeat a write.'); }, + compactAuthorityJournalBtn: async current => { + if (!get('authorityLifecycleConsent').checked) throw Error('Confirm removal of definitely refused, identity-free journal records.'); + message(`Removed ${await store.compactRefusedJournal({ confirmed: true, scopeStillCurrent: current })} definitely refused publication records without provider identities. Unknown records, published heads and key/trust history remain retained.`); + }, + }; + for (const [id, handler] of Object.entries(handlers)) get(id).addEventListener('click', () => run(id, handler)); + for (const id of ['dnsQueryInput', 'pointerAuthorityInput']) get(id).addEventListener('input', () => { + invalidate(); trust = null; render(); if (panel.open && !busy) refresh().catch(error => message(`Storage unavailable: ${error.message}. No data was reset.`)); + }); + panel.addEventListener('toggle', () => { if (panel.open && !busy) refresh().catch(error => message(`Storage unavailable: ${error.message}. No data was reset.`)); }); + return Object.freeze({ refresh, render }); +} diff --git a/src/layer1-uor/browser-authority.js b/src/layer1-uor/browser-authority.js new file mode 100644 index 0000000..fad7000 --- /dev/null +++ b/src/layer1-uor/browser-authority.js @@ -0,0 +1,314 @@ +/** Origin-local authority operations. Not a key backup or global revocation service. */ +import { generateAuthority, signPointer, verifyPointer, admitPointer } from './pointer.js'; +import { canonicalBytes } from './custody.js'; +import { identifier, natural, digest } from './contracts.js'; +import { model } from './generated-model.js'; +const policy = (name, ...args) => model[`Stitch.Effects.${name}`](...args); +const lifecycle = (name, ...args) => model[`Stitch.Authority.${name}`](...args); +const keyValid = key => typeof key === 'string' && /^[a-f0-9]{64}$/.test(key); +const insist = (condition, message) => { if (!condition) throw Error(message); }; +const generation = value => value?.version === 1 ? 0 : value?.generation; +const active = value => value?.version === 1 || value?.status === 'active'; +const authorityState = value => ({ generation: value ? generation(value) : 0, present: !!value, revoked: !!value && !active(value) }); +function validateAuthority(value) { + if (value == null) return null; + insist((value.version === 1 || value.version === 2) && keyValid(value.publicKey), 'Stored authority invalid; it was not replaced.'); + if (value.version === 2) { + natural(value.generation); natural(value.updatedAtMs); + insist(['active', 'revoked'].includes(value.status) && Array.isArray(value.history) && value.history.length <= 64, + 'Stored authority lifecycle invalid; it was not replaced.'); + const seen = new Set([value.publicKey]); + value.history.forEach((entry, index) => { + insist(keyValid(entry.publicKey) && !seen.has(entry.publicKey) && entry.generation === index, + 'Stored authority history invalid; it was not replaced.'); + seen.add(entry.publicKey); natural(entry.revokedAtMs); + }); + insist(value.generation === value.history.length, 'Stored authority generation invalid.'); + } + if (active(value)) insist(value.privateKey?.type === 'private' && value.privateKey.extractable === false + && value.privateKey.algorithm?.name === 'Ed25519' && value.privateKey.usages.includes('sign'), 'Stored signing key invalid; it was not replaced.'); + else insist(value.privateKey === null, 'Revoked authority retains an unexpected key.'); + return value; +} +function validateTrust(value) { + if (value == null) return null; + insist(value.version === 1 && ['active', 'revoked'].includes(value.status) && keyValid(value.publicKey) + && value.head?.authorityKey === value.publicKey && value.head?.name === value.name, 'Stored trust anchor invalid; it was not replaced.'); + identifier(value.name); natural(value.generation); digest(value.head.pointerDigest); + insist(Array.isArray(value.history) && value.history.length === value.generation && value.generation <= 64, 'Stored trust history invalid.'); + for (const entry of value.history) { insist(keyValid(entry.publicKey) && ['active','revoked'].includes(entry.status), 'Stored trust history invalid.'); digest(entry.pointerDigest); } + return value; +} +export class BrowserAuthorityStore { + constructor({ indexedDB = globalThis.indexedDB, locks = globalThis.navigator?.locks, + storage = globalThis.navigator?.storage, clock = Date.now, database = 'stitch-authority-v1' } = {}) { + this.indexedDB = indexedDB; this.database = database; this.locks = locks; this.storage = storage; this.clock = clock; + } + exclusiveAuthority(work) { + if (!this.locks?.request) throw Error('Web Locks unavailable; safe cross-tab authority operations are blocked.'); + return this.locks.request(`stitch-authority:${this.database}`, { mode: 'exclusive' }, work); + } + exclusivePublication(scope, work) { + // One origin lifecycle lock excludes revoke/rotate while a dispatch is in + // flight. No timer takeover. Unknown intent survives owner termination. + return this.exclusiveAuthority(() => this.locks.request(`stitch-dns:${this.database}:${scope}`, { mode: 'exclusive' }, work)); + } + async open() { + if (!this.indexedDB) throw Error('Browser storage unavailable; no persistent authority or publication was created.'); + return new Promise((resolve, reject) => { + const request = this.indexedDB.open(this.database, 1); let blocked = false; + request.onupgradeneeded = () => request.result.createObjectStore('records'); + request.onerror = () => reject(request.error); + request.onblocked = () => { blocked = true; reject(Error('Browser storage upgrade blocked; close other Stitch tabs.')); }; + request.onsuccess = () => { if (blocked) request.result.close(); else { request.result.onversionchange = () => request.result.close(); resolve(request.result); } }; + }); + } + async transactionMany(keys, change) { + const db = await this.open(); + try { + return await new Promise((resolve, reject) => { + const tx = db.transaction('records', 'readwrite', { durability: 'strict' }); + const store = tx.objectStore('records'), values = new Map(); let result, remaining = keys.length; + tx.oncomplete = () => resolve(result); + tx.onabort = () => reject(tx.error || Error('Browser storage transaction aborted; prior data retained.')); + tx.onerror = () => {}; // Abort is the commit boundary, not request success. + for (const key of keys) { + const read = store.get(key); + read.onsuccess = () => { + values.set(key, read.result); + if (--remaining) return; + try { + const update = change(values); result = update.result; + for (const [key, value] of update.writes ?? []) { insist(keys.includes(key), 'Unscoped browser transaction.'); store.put(value, key); } + for (const key of update.deletes ?? []) { insist(keys.includes(key), 'Unscoped browser transaction.'); store.delete(key); } + } catch (error) { tx.abort(); reject(error); } + }; + } + }); + } finally { db.close(); } + } + transaction(key, change) { + return this.transactionMany([key], values => { + const update = change(values.get(key)); + return { result: update.result, writes: update.write === undefined ? [] : [[key, update.write]], deletes: update.delete ? [key] : [] }; + }); + } + async records() { + const db = await this.open(); + try { + return await new Promise((resolve, reject) => { + const tx = db.transaction('records', 'readonly'), values = []; + tx.oncomplete = () => resolve(values); tx.onabort = () => reject(tx.error || Error('Browser storage scan aborted.')); tx.onerror = () => {}; + const cursor = tx.objectStore('records').openCursor(); + cursor.onsuccess = () => { if (cursor.result) { values.push([cursor.result.key, cursor.result.value]); cursor.result.continue(); } }; + }); + } finally { db.close(); } + } + read(key) { return this.transaction(key, value => ({ result: value ?? null })); } + async authorityStatus() { + const value = validateAuthority(await this.read('authority')); + return value ? { publicKey: value.publicKey, generation: generation(value), status: active(value) ? 'active' : 'revoked', history: (value.history ?? []).map(entry => ({ publicKey: entry.publicKey, generation: entry.generation, revokedAtMs: entry.revokedAtMs })) } : null; + } + async restoreAuthority() { + const value = validateAuthority(await this.read('authority')); + if (!value) return null; + insist(active(value), 'Saved authority revoked locally. Explicit rotation is required; setup cannot replace it.'); + const challenge = new TextEncoder().encode('stitch/authority-storage-check/v1'); + const publicKey = await crypto.subtle.importKey('raw', Uint8Array.from(value.publicKey.match(/../g), x => parseInt(x, 16)), 'Ed25519', false, ['verify']); + const signature = await crypto.subtle.sign('Ed25519', value.privateKey, challenge); + insist(await crypto.subtle.verify('Ed25519', publicKey, signature, challenge), 'Stored authority key mismatch; it was not replaced.'); + return value; + } + async setupAuthority() { + return this.exclusiveAuthority(async () => { + const existing = await this.restoreAuthority(); + if (!policy('authorityMayCreate', !!existing, true)) return existing; + const created = { version: 1, ...await generateAuthority() }; + await this.transaction('authority', value => ({ result: null, write: value ?? created })); + return this.restoreAuthority(); + }); + } + async signPointer(body, expectedPublicKey) { + body = structuredClone(body); + return this.exclusiveAuthority(async () => { + const authority = await this.restoreAuthority(); + insist(lifecycle('maySign', authorityState(authority), authority?.publicKey === expectedPublicKey, + body.authorityKey === expectedPublicKey), 'Saved authority changed, missing or revoked; no pointer signed.'); + return signPointer(body, authority.privateKey); + }); + } + rotateAuthority({ expectedPublicKey, confirmed = false, scopeStillCurrent = () => true, nowMs = Date.now() }) { + return this.exclusiveAuthority(async () => { + natural(nowMs); + // Generation happens only for an explicit operation. Commit CAS still + // preserves the prior key on quota/abort and never changes a trust pin. + insist(confirmed === true && keyValid(expectedPublicKey), 'Confirm the exact authority to rotate.'); + const pair = await generateAuthority(); + await this.transaction('authority', prior => { + validateAuthority(prior); + insist(lifecycle('rotationAllowed', confirmed && scopeStillCurrent() === true, !!prior, prior?.publicKey === expectedPublicKey, + (prior?.history?.length ?? 0) < 64), 'Authority changed or lifecycle history full; rotation refused.'); + const next = lifecycle('rotate', authorityState(prior), confirmed, true, true); + const history = [...(prior.history ?? []), { publicKey: prior.publicKey, generation: generation(prior), revokedAtMs: nowMs }]; + return { result: null, write: { version: 2, ...pair, status: next.revoked ? 'revoked' : 'active', generation: Number(next.generation), history, updatedAtMs: nowMs } }; + }); + return this.authorityStatus(); + }); + } + revokeAuthority({ expectedPublicKey, confirmed = false, scopeStillCurrent = () => true, nowMs = Date.now() }) { + return this.exclusiveAuthority(() => this.transaction('authority', prior => { + validateAuthority(prior); natural(nowMs); + insist(lifecycle('revocationAllowed', confirmed === true && scopeStillCurrent() === true, !!prior, prior?.publicKey === expectedPublicKey), 'Confirm the exact saved authority to revoke.'); + const next = lifecycle('revoke', authorityState(prior), confirmed, true); + const write = { ...prior, version: 2, status: next.revoked ? 'revoked' : 'active', generation: Number(next.generation), privateKey: null, + history: prior.history ?? [], updatedAtMs: nowMs }; + return { write, result: { publicKey: write.publicKey, status: write.status, generation: write.generation } }; + })); + } + async trustedAnchor(name) { identifier(name); return validateTrust(await this.read(`trust:${name}`)); } + async assertTrustedAuthority(name, publicKey) { + const trust = await this.trustedAnchor(name); + insist(!trust || trust.status === 'active' && trust.publicKey === publicKey, 'This name has a different or revoked saved trust anchor; explicit migration is required.'); + return trust; + } + async saveTrustedAnchor({ candidate, expectedAuthorityKey, expectedPointerDigest, confirmed = false, scopeStillCurrent = () => true, nowMs }) { + return this.exclusiveAuthority(async () => { + candidate = structuredClone(candidate); if (nowMs !== undefined) natural(nowMs); digest(expectedPointerDigest); + insist(confirmed === true && keyValid(expectedAuthorityKey), 'Independently confirm the exact anchor key and digest.'); + await verifyPointer(candidate, expectedAuthorityKey); + insist(candidate.pointerDigest === expectedPointerDigest && candidate.validFromMs <= (nowMs ?? this.clock()) && (nowMs ?? this.clock()) < candidate.validUntilMs, + 'Trust anchor digest or validity mismatch.'); + const key = `trust:${candidate.name}`; + return this.transaction(key, prior => { + validateTrust(prior); + const now = nowMs ?? this.clock(); natural(now); + insist(candidate.validFromMs <= now && now < candidate.validUntilMs, 'Trust anchor expired before storage commit.'); + insist(lifecycle('anchorSaveAllowed', confirmed, scopeStillCurrent() === true, !prior, + prior?.status === 'active' && prior?.publicKey === expectedAuthorityKey && prior?.head.pointerDigest === expectedPointerDigest), 'A different saved anchor exists; explicit migration is required.'); + const write = prior ?? { version: 1, name: candidate.name, publicKey: expectedAuthorityKey, head: candidate, status: 'active', generation: 0, history: [] }; + return { write, result: write }; + }); + }); + } + async migrateTrustedAnchor({ name, expectedAuthorityKey, expectedPointerDigest, newAuthorityKey, newPointerDigest, + candidate, confirmed = false, scopeStillCurrent = () => true, nowMs }) { + return this.exclusiveAuthority(async () => { + identifier(name); if (nowMs !== undefined) natural(nowMs); digest(expectedPointerDigest); digest(newPointerDigest); candidate = structuredClone(candidate); + insist(confirmed === true && keyValid(newAuthorityKey), 'Independently confirm the replacement authority and exact anchor.'); + await verifyPointer(candidate, newAuthorityKey); + insist(candidate.name === name && candidate.pointerDigest === newPointerDigest && candidate.validFromMs <= (nowMs ?? this.clock()) && (nowMs ?? this.clock()) < candidate.validUntilMs, + 'Replacement anchor scope, digest or validity mismatch.'); + return this.transaction(`trust:${name}`, prior => { + validateTrust(prior); + const now = nowMs ?? this.clock(); natural(now); + insist(candidate.validFromMs <= now && now < candidate.validUntilMs, 'Replacement anchor expired before storage commit.'); + insist(lifecycle('migrationAllowed', confirmed, scopeStillCurrent() === true, !!prior, + prior?.publicKey === expectedAuthorityKey && prior?.head.pointerDigest === expectedPointerDigest, + (prior?.history?.length ?? 0) < 64), 'Trust anchor changed or history full; migration refused.'); + insist(lifecycle('anchorChronologyAllowed', prior.publicKey === newAuthorityKey, candidate.revision < prior.head.revision, + candidate.revision === prior.head.revision, candidate.pointerDigest === prior.head.pointerDigest, + candidate.revision === prior.head.revision + 1, candidate.previousDigest === prior.head.pointerDigest), + 'Same-key anchor rollback, fork or wrong adjacent predecessor refused.'); + insist(!prior.history.some(entry => entry.publicKey === newAuthorityKey && entry.publicKey !== prior.publicKey) && !(prior.status === 'revoked' && prior.publicKey === newAuthorityKey), 'A retired trust key cannot be reactivated; use an independently accepted new key.'); + const next = lifecycle('migrate', { generation: prior.generation, present: true, revoked: prior.status === 'revoked' }, confirmed, true, true, true); + const write = { version: 1, name, publicKey: newAuthorityKey, head: candidate, status: next.revoked ? 'revoked' : 'active', generation: Number(next.generation), + history: [...prior.history, { publicKey: prior.publicKey, pointerDigest: prior.head.pointerDigest, status: prior.status }] }; + return { write, result: write }; + }); + }); + } + async retainTrustedHead({ name, expectedPointerDigest, candidate, nowMs = Date.now() }) { + return this.exclusiveAuthority(async () => { + candidate = structuredClone(candidate); + const prior = await this.trustedAnchor(name); + insist(prior?.status === 'active', 'Saved trust anchor missing or revoked.'); + await verifyPointer(candidate, prior.publicKey); + if (candidate.pointerDigest !== prior.head.pointerDigest) await admitPointer(prior.head, candidate, { + name, trustedAuthorityKey: prior.publicKey, nowMs }); + return this.transaction(`trust:${name}`, current => { + validateTrust(current); + insist(current?.status === 'active' && current.publicKey === prior.publicKey + && current.head.pointerDigest === prior.head.pointerDigest + && (current.head.pointerDigest === expectedPointerDigest || current.head.pointerDigest === candidate.pointerDigest), + 'Saved trust head changed; restore its exact anchor before succession.'); + const write = { ...current, head: candidate }; return { write, result: write }; + }); + }); + } + async revokeTrustedAnchor({ name, expectedAuthorityKey, expectedPointerDigest, confirmed = false, scopeStillCurrent = () => true }) { + identifier(name); + return this.exclusiveAuthority(() => this.transaction(`trust:${name}`, prior => { + validateTrust(prior); + insist(lifecycle('revocationAllowed', confirmed === true && scopeStillCurrent() === true, !!prior, + prior?.publicKey === expectedAuthorityKey && prior?.head.pointerDigest === expectedPointerDigest), 'Saved anchor changed; revocation refused.'); + const write = { ...prior, status: 'revoked' }; return { write, result: write }; + })); + } + readPublication(scope) { return this.read(`dns:${scope}`); } + claimPublication(scope, pending) { + return this.transactionMany([`dns:${scope}`, 'authority', `trust:${pending.candidate?.name}`], values => { + const prior = values.get(`dns:${scope}`), authority = validateAuthority(values.get('authority')); + const trust = validateTrust(values.get(`trust:${pending.candidate?.name}`)); + if (!policy('journalMayClaim', prior?.outcome === 'unknown')) return { result: { prior, writer: false } }; + const publicKey = pending.candidate?.authorityKey; + const retired = authority && ((!active(authority) && authority.publicKey === publicKey) || authority.history?.some(x => x.publicKey === publicKey)); + insist(lifecycle('publicationAllowed', !!retired, !trust || trust.status === 'active' && trust.publicKey === publicKey), 'Writer key or saved trust revoked/changed; only existing unknown reconciliation is allowed.'); + const owner = crypto.randomUUID(), write = { ...pending, owner }; + insist(write.outcome === 'unknown' && write.candidate && write.pointerDigest === write.candidate.pointerDigest, 'Invalid write-ahead intent.'); + return { writes: [[`dns:${scope}`, write]], result: { prior, writer: true, owner } }; + }); + } + finishPublication(scope, expectedDigest, owner, next) { + return this.transaction(`dns:${scope}`, prior => { + const allowed = policy('journalMayFinish', prior?.pointerDigest === expectedDigest, prior?.owner === owner, next.outcome === 'published'); + if (prior?.outcome === 'published' && next.outcome !== 'published') throw Error('Published journal cannot be downgraded by an older observation.'); + insist(allowed, 'Publication journal changed; refresh and reconcile the retained candidate.'); + return { write: { ...next, owner: prior.owner }, result: null }; + }); + } + async inspectStorage() { + const [estimate, persistent, rows] = await Promise.all([this.storage?.estimate?.() ?? {}, this.storage?.persisted?.() ?? null, this.records()]); + return { usageBytes: Number.isFinite(estimate.usage) ? estimate.usage : null, quotaBytes: Number.isFinite(estimate.quota) ? estimate.quota : null, + persistent, journalEntries: rows.filter(([key]) => key.startsWith('dns:')).length, + unknownEntries: rows.filter(([key, value]) => key.startsWith('dns:') && value?.outcome === 'unknown').length, + assurance: 'Origin-wide estimates and persistence permission do not guarantee retention or provide a backup.' }; + } + async requestPersistence({ confirmed = false } = {}) { + insist(confirmed === true, 'Explicit storage persistence request required.'); + insist(this.storage?.persist, 'Browser storage persistence request unavailable.'); + return this.storage.persist(); + } + async exportPublicJournal() { + const rows = await this.records(), publications = [], anchors = []; + let authority = null; + for (const [key, value] of rows) { + if (key === 'authority') { validateAuthority(value); authority = { publicKey: value.publicKey, generation: generation(value), status: active(value) ? 'active' : 'revoked', history: (value.history ?? []).map(entry => ({ publicKey: entry.publicKey, generation: entry.generation, revokedAtMs: entry.revokedAtMs })) }; } + if (key.startsWith('trust:')) { validateTrust(value); await verifyPointer(value.head, value.publicKey); anchors.push({ version: 1, name: value.name, publicKey: value.publicKey, head: value.head, status: value.status, generation: value.generation, history: value.history.map(entry => ({ publicKey: entry.publicKey, pointerDigest: entry.pointerDigest, status: entry.status })) }); } + if (key.startsWith('dns:')) { + const scope = JSON.parse(key.slice(4)); + insist(Array.isArray(scope) && /^[a-f0-9]{32}$/.test(scope[0]) && keyValid(scope[2]), 'Invalid journal scope.'); identifier(scope[1]); digest(value.pointerDigest); + insist(value.recordId == null || typeof value.recordId === 'string' && /^[A-Za-z0-9_-]{1,128}$/.test(value.recordId), 'Invalid provider identity.'); + insist(scope.length === 3 && ['unknown','published','refused'].includes(value.outcome), 'Corrupt publication journal; export refused.'); + const entry = { scope, outcome: value.outcome, pointerDigest: value.pointerDigest, recordId: value.recordId ?? null }; + if (value.outcome === 'unknown') { await verifyPointer(value.candidate, scope[2]); entry.candidate = value.candidate; } + publications.push(entry); + } + } + return new TextDecoder().decode(canonicalBytes({ version: 1, kind: 'stitch-public-authority-journal', authority, anchors, publications, + warning: 'Public evidence only. No signing keys, tokens or automatic journal import. Preserve unknown candidates and provider identities independently before clearing browser data.' })); + } + async compactRefusedJournal({ confirmed = false, scopeStillCurrent = () => true } = {}) { + insist(confirmed === true, 'Explicit refused-journal cleanup required.'); + return this.exclusiveAuthority(async () => { + let removed = 0; + for (const [key] of await this.records()) { + if (!key.startsWith('dns:')) continue; + removed += await this.transaction(key, prior => { + const allowed = lifecycle('journalRemovalAllowed', confirmed && scopeStillCurrent() === true, prior?.outcome === 'refused', prior?.recordId == null); + return { delete: allowed, result: allowed ? 1 : 0 }; + }); + } + return removed; + }); + } +} diff --git a/src/layer1-uor/contracts.js b/src/layer1-uor/contracts.js new file mode 100644 index 0000000..d91259a --- /dev/null +++ b/src/layer1-uor/contracts.js @@ -0,0 +1,28 @@ +/** Shared runtime limits and closed-record validation. Limits are resource policy, not theorems. */ +export class ContractError extends Error { + constructor(code, message = code) { super(message); this.name = 'ContractError'; this.code = code; } +} +export const refuse = (code, message) => { throw new ContractError(code, message); }; +export function record(value, keys) { + if (!value || typeof value !== 'object' || Array.isArray(value) || + ![Object.prototype, null].includes(Object.getPrototypeOf(value)) || + Object.keys(value).sort().join('|') !== [...keys].sort().join('|')) refuse('invalid-record'); + return value; +} +export function natural(value, maximum = Number.MAX_SAFE_INTEGER) { + if (!Number.isSafeInteger(value) || value < 0 || value > maximum) refuse('invalid-integer'); + return value; +} +export function identifier(value) { + if (typeof value !== 'string' || !/^[a-zA-Z0-9._:-]{1,128}$/.test(value)) refuse('invalid-identifier'); + return value; +} +export function digest(value) { + if (typeof value !== 'string' || !/^sha256:[0-9a-f]{64}$/.test(value)) refuse('invalid-digest'); + return value; +} +export function hexValue(value, bits) { + if (typeof value !== 'string' || !/^0x(?:0|[1-9a-f][0-9a-f]*)$/.test(value) || value.length > 34 || + BigInt(value) >= 1n << BigInt(bits)) refuse('invalid-ring-value'); + return value; +} diff --git a/src/layer1-uor/custody.js b/src/layer1-uor/custody.js new file mode 100644 index 0000000..3a3e43b --- /dev/null +++ b/src/layer1-uor/custody.js @@ -0,0 +1,375 @@ +/** + * Layer 1 object custody commitments. Browser-compatible, dependency-free WebCrypto. + * + * This is a reference realization, not a proof of browser or network behavior. + * Digests establish byte integrity under SHA-256's security assumptions; they do + * not establish authorization, confidentiality, availability, or retention. + * + * Hash frame (all lengths unsigned, big endian): + * UTF8("stitch/" + domain + "/v1\0") || uint64(payload.length) || payload + * Fragment payload: raw32(encodingDigest) || uint32(index) || fragmentBytes. + * Manifest payload: canonicalBytes(manifest without manifestDigest). + * Canonical JSON follows RFC 8785: sorted UTF-16 keys, ECMAScript finite + * binary64 serialization, unchanged Unicode strings, and UTF-8 output. + * Application schemas and explicit resource budgets remain separate contracts. + */ + +export const CUSTODY_LIMITS = Object.freeze({ + maxObjectBytes: 16 * 1024 * 1024, + maxManifestBytes: 16 * 1024, + maxCanonicalBytes: 64 * 1024, + maxDepth: 16, + maxEntries: 4096, + maxStringLength: 4096, + maxRequests: 256, + maxCopies: 64, +}); + +export class CustodyError extends Error { + constructor(code, message = code) { + super(message); + this.name = 'CustodyError'; + this.code = code; + } +} + +const fail = (code, message) => { throw new CustodyError(code, message); }; +const utf8 = new TextEncoder(); +const DIGEST = /^sha256:[0-9a-f]{64}$/; + +/** Snapshot caller-owned bytes before any asynchronous operation. */ +export function copyBytes(value, maxBytes = CUSTODY_LIMITS.maxObjectBytes) { + if (!(value instanceof Uint8Array)) fail('InvalidBytes', 'Expected Uint8Array'); + if (!Number.isSafeInteger(maxBytes) || maxBytes < 0 || value.byteLength > maxBytes) { + fail('SizeLimit', 'Byte sequence exceeds its size limit'); + } + return new Uint8Array(value); +} + +function validString(value, maxLength = CUSTODY_LIMITS.maxStringLength) { + if (value.length > maxLength) fail('SizeLimit', 'String too long'); + for (let i = 0; i < value.length; i++) { + const c = value.charCodeAt(i); + // RFC 7493 §2.1 (the JCS input domain) also excludes Unicode noncharacters. + if ((c >= 0xfdd0 && c <= 0xfdef) || c === 0xfffe || c === 0xffff) { + fail('InvalidCanonicalValue', 'Unicode noncharacter'); + } + if (c >= 0xd800 && c <= 0xdbff) { + const next = value.charCodeAt(++i); + if (!(next >= 0xdc00 && next <= 0xdfff)) fail('InvalidCanonicalValue', 'Lone surrogate'); + const point = 0x10000 + ((c - 0xd800) << 10) + next - 0xdc00; + if ((point & 0xffff) >= 0xfffe) fail('InvalidCanonicalValue', 'Unicode noncharacter'); + } else if (c >= 0xdc00 && c <= 0xdfff) { + fail('InvalidCanonicalValue', 'Lone surrogate'); + } + } +} + +/** + * Canonical UTF-8 bytes. Rejects cycles, getters, symbols, sparse/extended arrays, + * nonfinite numbers, hidden properties, and non-JSON prototypes before coercion. + * Number serialization is the ECMAScript algorithm required by RFC 8785 §3.2.2.3. + * The caller must supply an already valid value; use parseCanonicalJson on wire JSON + * so duplicate properties are rejected before a normal JSON parser can erase them. + */ +export function canonicalBytes(value, { + maxBytes = CUSTODY_LIMITS.maxCanonicalBytes, + maxDepth = CUSTODY_LIMITS.maxDepth, + maxEntries = CUSTODY_LIMITS.maxEntries, + maxStringLength = CUSTODY_LIMITS.maxStringLength, +} = {}) { + for (const limit of [maxBytes, maxDepth, maxEntries, maxStringLength]) { + if (!Number.isSafeInteger(limit) || limit < 0) fail('SizeLimit', 'Invalid JSON resource bound'); + } + const seen = new Set(); + let entries = 0; + let outputLength = 0; + const append = value => { + outputLength += value.length; + if (outputLength > maxBytes) fail('SizeLimit', 'Canonical record too large'); + return value; + }; + function encode(v, depth) { + if (depth > maxDepth) fail('SizeLimit', 'Canonical record too deep'); + if (++entries > maxEntries) fail('SizeLimit', 'Too many canonical values'); + if (v === null) return append('null'); + if (typeof v === 'boolean') return append(v ? 'true' : 'false'); + if (typeof v === 'number') { + if (!Number.isFinite(v)) fail('InvalidCanonicalValue', 'Expected finite IEEE 754 number'); + return append(JSON.stringify(v)); + } + if (typeof v === 'string') { + validString(v, maxStringLength); + return append(JSON.stringify(v)); + } + if (typeof v !== 'object' || seen.has(v)) fail('InvalidCanonicalValue', 'Non-JSON value or cycle'); + const array = Array.isArray(v); + const proto = Object.getPrototypeOf(v); + if (array ? proto !== Array.prototype : proto !== Object.prototype && proto !== null) { + fail('InvalidCanonicalValue', 'Expected a plain JSON value'); + } + const keys = Reflect.ownKeys(v); + // Check count before enumerating or allocating any output for a large array. + if (keys.length > maxEntries + (array ? 1 : 0)) fail('SizeLimit', 'Too many keys'); + if (keys.some(k => typeof k !== 'string')) fail('InvalidCanonicalValue', 'Symbol key'); + const descriptors = Object.getOwnPropertyDescriptors(v); + for (const key of keys) { + const d = descriptors[key]; + if (!Object.hasOwn(d, 'value') || (!d.enumerable && !(array && key === 'length'))) { + fail('InvalidCanonicalValue', 'Accessors and hidden fields are not canonical'); + } + } + seen.add(v); + let result; + if (array) { + if (v.length > maxEntries || keys.length !== v.length + 1) { + fail('InvalidCanonicalValue', 'Sparse or extended array'); + } + const items = []; + for (let i = 0; i < v.length; i++) { + if (!Object.hasOwn(descriptors, String(i))) fail('InvalidCanonicalValue', 'Sparse array'); + items.push(encode(descriptors[String(i)].value, depth + 1)); + } + result = append('[') + items.join(',') + append(']'); + append(','.repeat(Math.max(0, items.length - 1))); + } else { + const items = []; + for (const key of keys.sort()) { + validString(key, maxStringLength); + const name = append(JSON.stringify(key)); + items.push(name + append(':') + encode(descriptors[key].value, depth + 1)); + } + result = append('{') + items.join(',') + append('}'); + append(','.repeat(Math.max(0, items.length - 1))); + } + seen.delete(v); + return result; + } + const result = utf8.encode(encode(value, 0)); + if (result.length > maxBytes) fail('SizeLimit', 'Canonical UTF-8 record too large'); + return result; +} + +/** + * Parse JSON without losing duplicate names, including escape-equivalent names. + * RFC 8785 §3.1 and §5 require validation before signature processing. This + * parser preserves strings without normalization, rejects nonfinite numbers and + * malformed UTF-8, and creates only data properties (including __proto__). + * Limits are deployment resource policies, not changes to the JCS data model. + */ +export function parseCanonicalJson(input, { + maxBytes = CUSTODY_LIMITS.maxCanonicalBytes, + maxDepth = CUSTODY_LIMITS.maxDepth, + maxEntries = CUSTODY_LIMITS.maxEntries, + maxStringLength = CUSTODY_LIMITS.maxStringLength, +} = {}) { + for (const value of [maxBytes, maxDepth, maxEntries, maxStringLength]) { + if (!Number.isSafeInteger(value) || value < 0) fail('SizeLimit', 'Invalid JSON resource bound'); + } + let text; + if (input instanceof Uint8Array) { + if (input.byteLength > maxBytes) fail('SizeLimit', 'JSON input too large'); + try { text = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(input); } + catch { fail('InvalidCanonicalValue', 'Malformed JSON UTF-8'); } + } else if (typeof input === 'string') { + // Check code units before allocating UTF-8; its byte count is at least this. + if (input.length > maxBytes || utf8.encode(input).length > maxBytes) fail('SizeLimit', 'JSON input too large'); + text = input; + } else fail('InvalidCanonicalValue', 'Expected JSON text or UTF-8 bytes'); + let at = 0, entries = 0; + const invalid = () => fail('InvalidCanonicalValue', `Invalid JSON at offset ${at}`); + const ws = () => { while (at < text.length && /[\x20\t\r\n]/.test(text[at])) at++; }; + function string() { + const start = at++; + while (at < text.length) { + const c = text.charCodeAt(at++); + if (c === 34) { + let value; + try { value = JSON.parse(text.slice(start, at)); } catch { invalid(); } + validString(value, maxStringLength); + return value; + } + if (c < 32) invalid(); + if (c === 92) { + const escape = text[at++]; + if (escape === 'u') { + if (!/^[0-9a-fA-F]{4}$/.test(text.slice(at, at + 4))) invalid(); + at += 4; + } else if (!['"', '\\', '/', 'b', 'f', 'n', 'r', 't'].includes(escape)) invalid(); + } + } + invalid(); + } + const number = /-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?/y; + function value(depth) { + if (depth > maxDepth || ++entries > maxEntries) fail('SizeLimit', 'JSON structure exceeds resource bound'); + ws(); + const token = text[at]; + if (token === '"') return string(); + if (token === '{' || token === '[') { + at++; ws(); + const array = token === '[', close = array ? ']' : '}', result = array ? [] : Object.create(null); + const names = new Set(); + if (text[at] === close) { at++; return result; } + for (;;) { + ws(); + if (array) result.push(value(depth + 1)); + else { + if (text[at] !== '"') invalid(); + const key = string(); + if (names.has(key)) fail('InvalidCanonicalValue', 'Duplicate JSON property'); + names.add(key); ws(); + if (text[at++] !== ':') invalid(); + result[key] = value(depth + 1); + } + ws(); + if (text[at] === close) { at++; return result; } + if (text[at++] !== ',') invalid(); + } + } + for (const [literal, parsed] of [['true', true], ['false', false], ['null', null]]) { + if (text.startsWith(literal, at)) { at += literal.length; return parsed; } + } + number.lastIndex = at; + const match = number.exec(text); + if (!match) invalid(); + at = number.lastIndex; + const parsed = Number(match[0]); + if (!Number.isFinite(parsed)) fail('InvalidCanonicalValue', 'Expected finite IEEE 754 number'); + return parsed; + } + const result = value(0); + ws(); + if (at !== text.length) invalid(); + return result; +} + +function uint64(value) { + const bytes = new Uint8Array(8); + new DataView(bytes.buffer).setBigUint64(0, BigInt(value), false); + return bytes; +} + +/** Domain-separated digest. Domain must be a short lowercase ASCII name. */ +export async function sha256Bytes(bytes, domain) { + if (typeof domain !== 'string' || !/^[a-z][a-z0-9-]{0,31}$/.test(domain)) { + fail('InvalidSchema', 'Invalid digest domain'); + } + const payload = copyBytes(bytes, CUSTODY_LIMITS.maxObjectBytes + 36); + if (!globalThis.crypto?.subtle) fail('CryptoUnavailable', 'WebCrypto requires a supported secure context'); + const prefix = utf8.encode(`stitch/${domain}/v1\0`); + const framed = new Uint8Array(prefix.length + 8 + payload.length); + framed.set(prefix); + framed.set(uint64(payload.length), prefix.length); + framed.set(payload, prefix.length + 8); + const digest = new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', framed)); + return 'sha256:' + Array.from(digest, b => b.toString(16).padStart(2, '0')).join(''); +} + +export function assertDigest(value) { + if (typeof value !== 'string' || !DIGEST.test(value)) fail('InvalidDigest', 'Expected full lowercase SHA-256 digest'); + return value; +} + +export async function commitObject(bytes) { + const snapshot = copyBytes(bytes); + return Object.freeze({ + digestAlgorithm: 'sha256', + contentDigest: await sha256Bytes(snapshot, 'object'), + byteLength: snapshot.length, + }); +} + +export async function fragmentDigest(encodingDigest, index, bytes) { + assertDigest(encodingDigest); + if (!Number.isInteger(index) || index < 0 || index > 2) fail('InvalidSchema', 'Invalid fragment index'); + const snapshot = copyBytes(bytes, Math.ceil(CUSTODY_LIMITS.maxObjectBytes / 2)); + const payload = new Uint8Array(36 + snapshot.length); + for (let i = 0; i < 32; i++) payload[i] = parseInt(encodingDigest.slice(7 + i * 2, 9 + i * 2), 16); + new DataView(payload.buffer).setUint32(32, index, false); + payload.set(snapshot, 36); + return sha256Bytes(payload, 'fragment'); +} + +export function exactKeys(value, expected, name = 'record') { + if (value === null || typeof value !== 'object' || Array.isArray(value)) fail('InvalidSchema', `${name} must be a record`); + const actual = Object.keys(value).sort(); + const wanted = [...expected].sort(); + if (actual.length !== wanted.length || actual.some((k, i) => k !== wanted[i])) { + fail('InvalidSchema', `${name} has missing or unknown fields`); + } +} + +export function deepFreeze(value) { + if (value && typeof value === 'object') { + for (const v of Object.values(value)) deepFreeze(v); + Object.freeze(value); + } + return value; +} + +/** Snapshot strict records without executing accessors. */ +export function snapshotRecord(record, maxBytes = CUSTODY_LIMITS.maxCanonicalBytes) { + const bytes = canonicalBytes(record); + if (bytes.length > maxBytes) fail('SizeLimit', 'Record exceeds its size limit'); + return JSON.parse(new TextDecoder().decode(bytes)); +} + +export function manifestBody(manifest) { + return { version: manifest.version, object: manifest.object, encoding: manifest.encoding, fragments: manifest.fragments }; +} + +/** + * Verify schema and complete manifest commitment; returns an immutable snapshot. + * This alone does not prove that its declared fragments encode its object. + * recoverObject establishes that relationship from actual fragment bytes. + */ +export async function verifyManifest(manifest) { + const m = snapshotRecord(manifest, CUSTODY_LIMITS.maxManifestBytes); + exactKeys(m, ['version', 'object', 'encoding', 'fragments', 'manifestDigest'], 'manifest'); + exactKeys(m.object, ['digestAlgorithm', 'contentDigest', 'byteLength'], 'object'); + exactKeys(m.encoding, ['format', 'encodingDigest', 'byteLength', 'dependencies'], 'encoding'); + exactKeys(m.fragments, ['scheme', 'threshold', 'count', 'byteLength', 'digests'], 'fragments'); + if (m.version !== 1 || m.object.digestAlgorithm !== 'sha256' || m.encoding.format !== 'raw' + || m.fragments.scheme !== 'xor-2-of-3' || m.fragments.threshold !== 2 || m.fragments.count !== 3) { + fail('InvalidSchema', 'Unsupported custody version or encoding'); + } + const length = m.object.byteLength; + if (!Number.isSafeInteger(length) || length < 0 || length > CUSTODY_LIMITS.maxObjectBytes) { + fail('SizeLimit', 'Invalid object length'); + } + if (m.encoding.byteLength !== length || m.fragments.byteLength !== Math.ceil(length / 2)) { + fail('InvalidSchema', 'Inconsistent encoding or fragment lengths'); + } + if (!Array.isArray(m.encoding.dependencies) || m.encoding.dependencies.length !== 0) { + fail('InvalidSchema', 'Raw encoding must be self-contained'); + } + if (!Array.isArray(m.fragments.digests) || m.fragments.digests.length !== 3) { + fail('InvalidSchema', 'Expected exactly three fragment digests'); + } + [m.object.contentDigest, m.encoding.encodingDigest, m.manifestDigest, ...m.fragments.digests].forEach(assertDigest); + const actual = await sha256Bytes(canonicalBytes(manifestBody(m)), 'manifest'); + if (actual !== m.manifestDigest) fail('ManifestDigestMismatch', 'Manifest commitment does not match'); + return deepFreeze(m); +} + +/** Verify one fragment's full binding; does not establish coding consistency. */ +export async function verifyFragment(manifest, fragment) { + // Read descriptors first so untrusted accessor fields are not executed. + if (!fragment || typeof fragment !== 'object' || Array.isArray(fragment) + || ![Object.prototype, null].includes(Object.getPrototypeOf(fragment))) fail('InvalidSchema', 'Invalid fragment'); + const descriptors = Object.getOwnPropertyDescriptors(fragment); + if (Reflect.ownKeys(fragment).length !== 2 || !descriptors.index?.enumerable || !descriptors.bytes?.enumerable + || !Object.hasOwn(descriptors.index, 'value') || !Object.hasOwn(descriptors.bytes, 'value')) { + fail('InvalidSchema', 'Fragment requires only index and bytes'); + } + const index = descriptors.index.value; + if (!Number.isInteger(index) || index < 0 || index > 2) fail('InvalidSchema', 'Invalid fragment index'); + const bytes = copyBytes(descriptors.bytes.value, Math.ceil(CUSTODY_LIMITS.maxObjectBytes / 2)); + const m = await verifyManifest(manifest); + if (bytes.length !== m.fragments.byteLength) fail('InvalidSchema', 'Incorrect fragment length'); + if (await fragmentDigest(m.encoding.encodingDigest, index, bytes) !== m.fragments.digests[index]) { + fail('FragmentDigestMismatch', 'Fragment is not committed by this manifest'); + } + return { index, bytes }; +} diff --git a/src/layer1-uor/effects.js b/src/layer1-uor/effects.js new file mode 100644 index 0000000..dd2522e --- /dev/null +++ b/src/layer1-uor/effects.js @@ -0,0 +1,122 @@ +/** Lifecycle refinement boundary. The source owns phase/identity admission; + * browsers, provider completeness, signatures and guest readiness remain host facts. + * These projections reuse live runtime state. They do not journal effects or refund work. + */ +import { model } from './generated-model.js'; +// JS string identity is UTF-16 code-unit identity. UTF-8 replacement of lone +// surrogates would collapse distinct signaling topics/peer IDs into one model ID. +const bytes = value => { + if (typeof value !== 'string') throw new TypeError('Lifecycle identity must be a string'); + const encoded = new Uint8Array(value.length * 2); + for (let index = 0; index < value.length; index++) { + const unit = value.charCodeAt(index); + encoded[index * 2] = unit >>> 8; encoded[index * 2 + 1] = unit & 255; + } + return encoded; +}; +const tag = value => ({ tag: value, fields: [] }); +const call = (name, ...args) => model[`Stitch.Effects.${name}`](...args); +const count = value => { + const number = Number(value); + if (!Number.isSafeInteger(number) || number < 0) throw new RangeError('Lifecycle generation exceeds host integer range'); + return number; +}; +export const transportState = node => ({ generation: node.generation, closed: node.closed, + channelKey: bytes(node.channelKey), localPeer: bytes(node.peerId) }); +export const captureTransport = (node, remotePeer = '') => ({ generation: node.generation, + channelKey: bytes(node.channelKey), localPeer: bytes(node.peerId), remotePeer: bytes(remotePeer) }); +export const transportCanSend = node => call('transportCanSend', transportState(node)); +export const transportSessionCurrent = (node, callback) => call('transportSessionMatches', transportState(node), callback); +export const transportPeerCurrent = (node, callback, remotePeer, entry) => call('transportPeerCallbackAllowed', + transportState(node), callback, bytes(remotePeer), node.peers.get(remotePeer) === entry); +export const transportChannelCurrent = (node, callback, remotePeer, entry, channel) => call('transportChannelCallbackAllowed', + transportState(node), callback, bytes(remotePeer), node.peers.get(remotePeer) === entry, entry.dc === channel); +export const transportSignalAllowed = (node, message) => !!message && typeof message.channelKey === 'string' + && typeof message.from === 'string' && message.from.length > 0 && (message.to == null || typeof message.to === 'string') + && call('transportSignalAllowed', transportState(node), bytes(message.channelKey), bytes(message.from), + bytes(message.to ?? ''), message.to == null); +export const transportPeerAllocationAllowed = node => call('transportPeerAllocationAllowed', transportState(node), node.peers.size, node.maxPeers); +export function closeTransport(node) { + const next = call('transportClose', transportState(node)); + node.generation = count(next.generation); node.closed = next.closed; +} +export function openTransport(node, channelKey) { + // channelKey is preserved as the real browser topic, never replaced by an invented ID. + const next = call('transportOpen', transportState(node), bytes(channelKey)); + node.closed = next.closed; node.channelKey = channelKey; +} +const dnsPhase = previous => tag(({ idle: 'Idle', published: 'Published', refused: 'Refused', unknown: 'Unknown' })[previous?.outcome ?? 'idle']); +const dnsScope = scope => ({ zoneId: bytes(scope.zoneId), name: bytes(scope.name), authorityKey: bytes(scope.trustedAuthorityKey) }); +const publication = (scope, previous) => ({ scope: dnsScope(scope), phase: dnsPhase(previous), + pointerDigest: bytes(previous?.pointerDigest ?? ''), recordId: bytes(previous?.recordId ?? ''), hasRecordId: !!previous?.recordId }); +const dnsCandidate = (scope, candidate) => ({ scope: dnsScope(scope), pointerDigest: bytes(candidate.pointerDigest), + previousDigest: bytes(candidate.previousDigest ?? ''), hasPrevious: candidate.previousDigest !== null, + revision: candidate.revision, validFrom: candidate.validFromMs, validUntil: candidate.validUntilMs }); +const dnsRead = (scope, candidate, remote, pointer) => ({ scope: dnsScope(scope), candidateDigest: bytes(candidate.pointerDigest), + complete: true, authenticated: !!pointer, recordPresent: !!remote, recordId: bytes(remote?.id ?? ''), + pointerDigest: bytes(pointer?.pointerDigest ?? ''), revision: pointer?.revision ?? 0 }); +export const dnsRequestAllowed = (scope, previous, candidate, busy) => call('dnsRequestAllowed', + publication(scope, previous), dnsCandidate(scope, candidate), busy); +export const dnsReadDecision = (scope, previous, candidate, remote, pointer, now) => call('dnsReadDecision', + publication(scope, previous), dnsCandidate(scope, candidate), dnsRead(scope, candidate, remote, pointer), now).tag; +export function dnsWriteState(scope, previous, candidate, remote, pointer, now) { + if (!['Create', 'Update'].includes(dnsReadDecision(scope, previous, candidate, remote, pointer, now))) throw Error('Model refused DNS write admission'); + const next = call('dnsBeginWrite', publication(scope, previous), dnsCandidate(scope, candidate), dnsRead(scope, candidate, remote, pointer), now); + if (next.phase.tag !== 'Unknown') throw Error('Model refused DNS write transition'); + return { outcome: 'unknown', pointerDigest: candidate.pointerDigest, candidate, recordId: remote?.id ?? null }; +} +export function dnsWriteOutcome(scope, pending, result) { + const next = call('dnsFinishWrite', publication(scope, pending), { scope: dnsScope(scope), + candidateDigest: bytes(pending.pointerDigest), recordId: bytes(typeof result?.id === 'string' ? result.id : ''), + recordIdValid: typeof result?.id === 'string' && /^[A-Za-z0-9_-]{1,128}$/.test(result.id), + acknowledged: result?.ok === true && result?.outcome === 'published', refused: result?.outcome === 'refused' }); + return ({ Published: 'published', Refused: 'refused', Unknown: 'unknown' })[next.phase.tag]; +} +export function dnsLifecycle(previous, busy = false) { + return { outcome: previous?.outcome ?? 'idle', recordId: previous?.recordId ?? null, pointerDigest: previous?.pointerDigest ?? null, + canPublish: !busy && call('dnsMayWritePhase', dnsPhase(previous)), + canReconcile: !busy && call('dnsMayReconcile', dnsPhase(previous)) }; +} +const vmState = node => ({ generation: node.bootGeneration, phase: tag(node.vmPhase) }); +export const vmCanBoot = node => call('vmCanBoot', vmState(node)); +export const vmIsBooting = node => call('vmIsBooting', vmState(node)); +export const vmCanExecute = node => call('vmCanExecute', vmState(node)); +export const vmCallbackCurrent = (node, generation, vm) => call('vmCallbackAllowed', vmState(node), generation, node.v86 === vm); +export const vmFailAllowed = (node, generation) => call('vmFailAllowed', vmState(node), generation); +function applyVm(node, next) { node.bootGeneration = count(next.generation); node.vmPhase = next.phase.tag; } +export const startVm = node => applyVm(node, call('vmStart', vmState(node))); +export const failVm = (node, generation) => applyVm(node, call('vmFail', vmState(node), generation)); +export const readyVm = (node, generation, vm, readinessObserved) => applyVm(node, + call('vmObserveReady', vmState(node), generation, node.v86 === vm, readinessObserved)); +const c1Progress = entry => ({ startedAt: Math.floor(entry.startedAtMs * 1000), + lastSequence: entry.lastHeartbeatSeq ?? 0, hasSequence: entry.lastHeartbeatSeq !== null, consecutive: entry.heartbeatsPassed }); +const c1Clock = (entry, nowMs) => Math.floor(entry.startedAtMs * 1000) + Math.ceil((nowMs - entry.startedAtMs) * 1000); +export function observeC1Probe(entry, sequence, nowMs, correlated) { + const next = call('c1ObserveProbe', c1Progress(entry), sequence, c1Clock(entry, nowMs), correlated); + entry.lastHeartbeatSeq = next.hasSequence ? count(next.lastSequence) : null; + entry.heartbeatsPassed = count(next.consecutive); +} +export const c1ConnectionQualified = (entry, nowMs) => call('c1ConnectionQualified', c1Progress(entry), c1Clock(entry, nowMs), entry.dc?.ordered === true); +export const c1DirectSuccess = (entry, nowMs, selectedPathObserved, usedRelay) => call('c1DirectSuccess', + c1Progress(entry), c1Clock(entry, nowMs), entry.dc?.ordered === true, selectedPathObserved, usedRelay); +export function c1SampleStructurallyValid(sample) { + return typeof sample.success === 'boolean' + && Number.isSafeInteger(sample.heartbeats_passed) && sample.heartbeats_passed >= 0 + && Number.isFinite(sample.qualification_elapsed_sec) && sample.qualification_elapsed_sec >= 0 + && (sample.ice_setup_sec === null || (Number.isFinite(sample.ice_setup_sec) && sample.ice_setup_sec >= 0 && sample.ice_setup_sec <= sample.qualification_elapsed_sec)) + && typeof sample.ordered_channel === 'boolean' && typeof sample.selected_path_observed === 'boolean' + && typeof sample.used_turn === 'boolean' && (!sample.success || c1SampleQualified(sample)); +} +export function c1SampleQualified(sample) { + if (!Number.isSafeInteger(sample.heartbeats_passed) || sample.heartbeats_passed < 0 + || !Number.isFinite(sample.qualification_elapsed_sec) || sample.qualification_elapsed_sec < 0 + || sample.qualification_elapsed_sec > 10 + || !Number.isFinite(sample.ice_setup_sec) || sample.ice_setup_sec < 0 || sample.ice_setup_sec > 10 + || sample.ice_setup_sec > sample.qualification_elapsed_sec + || typeof sample.ordered_channel !== 'boolean' || typeof sample.selected_path_observed !== 'boolean' + || typeof sample.used_turn !== 'boolean') return false; + const elapsed = Math.round(sample.qualification_elapsed_sec * 1000000); + if (!Number.isSafeInteger(elapsed)) return false; + return call('c1DirectSuccess', { startedAt: 0, lastSequence: 0, hasSequence: false, consecutive: sample.heartbeats_passed }, + elapsed, sample.ordered_channel, sample.selected_path_observed, sample.used_turn); +} diff --git a/src/layer1-uor/generated-model.js b/src/layer1-uor/generated-model.js new file mode 100644 index 0000000..baf2ab3 --- /dev/null +++ b/src/layer1-uor/generated-model.js @@ -0,0 +1,50547 @@ +/** GENERATED by scripts/check-model.mjs. DO NOT EDIT. + * Exact BigInt evaluation of a declared subset of the project LexLean source. + * This is NOT a Prism compiler, proof certificate, or whole-runtime certification. + */ +const definitions = { + "Stitch.Authority.signingAllowed": { + "module": "Stitch.Authority", + "name": "signingAllowed", + "params": [ + { + "name": "active", + "type": { + "kind": "Bool" + } + }, + { + "name": "expectedKey", + "type": { + "kind": "Bool" + } + }, + { + "name": "bodyKey", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "active" + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "expectedKey" + }, + "right": { + "k": "var", + "name": "bodyKey" + } + } + } + }, + "Stitch.Authority.rotationAllowed": { + "module": "Stitch.Authority", + "name": "rotationAllowed", + "params": [ + { + "name": "confirmed", + "type": { + "kind": "Bool" + } + }, + { + "name": "exists", + "type": { + "kind": "Bool" + } + }, + { + "name": "sameKey", + "type": { + "kind": "Bool" + } + }, + { + "name": "historyCapacity", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "confirmed" + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "exists" + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "sameKey" + }, + "right": { + "k": "var", + "name": "historyCapacity" + } + } + } + } + }, + "Stitch.Authority.revocationAllowed": { + "module": "Stitch.Authority", + "name": "revocationAllowed", + "params": [ + { + "name": "confirmed", + "type": { + "kind": "Bool" + } + }, + { + "name": "exists", + "type": { + "kind": "Bool" + } + }, + { + "name": "sameScope", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "confirmed" + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "exists" + }, + "right": { + "k": "var", + "name": "sameScope" + } + } + } + }, + "Stitch.Authority.anchorSaveAllowed": { + "module": "Stitch.Authority", + "name": "anchorSaveAllowed", + "params": [ + { + "name": "confirmed", + "type": { + "kind": "Bool" + } + }, + { + "name": "scopeCurrent", + "type": { + "kind": "Bool" + } + }, + { + "name": "absent", + "type": { + "kind": "Bool" + } + }, + { + "name": "identical", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "confirmed" + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "scopeCurrent" + }, + "right": { + "k": "binary", + "op": "||", + "left": { + "k": "var", + "name": "absent" + }, + "right": { + "k": "var", + "name": "identical" + } + } + } + } + }, + "Stitch.Authority.migrationAllowed": { + "module": "Stitch.Authority", + "name": "migrationAllowed", + "params": [ + { + "name": "confirmed", + "type": { + "kind": "Bool" + } + }, + { + "name": "scopeCurrent", + "type": { + "kind": "Bool" + } + }, + { + "name": "exists", + "type": { + "kind": "Bool" + } + }, + { + "name": "samePrior", + "type": { + "kind": "Bool" + } + }, + { + "name": "historyCapacity", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "confirmed" + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "scopeCurrent" + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "exists" + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "samePrior" + }, + "right": { + "k": "var", + "name": "historyCapacity" + } + } + } + } + } + }, + "Stitch.Authority.anchorChronologyAllowed": { + "module": "Stitch.Authority", + "name": "anchorChronologyAllowed", + "params": [ + { + "name": "sameKey", + "type": { + "kind": "Bool" + } + }, + { + "name": "older", + "type": { + "kind": "Bool" + } + }, + { + "name": "sameRevision", + "type": { + "kind": "Bool" + } + }, + { + "name": "sameDigest", + "type": { + "kind": "Bool" + } + }, + { + "name": "adjacent", + "type": { + "kind": "Bool" + } + }, + { + "name": "predecessor", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "||", + "left": { + "k": "not", + "value": { + "k": "var", + "name": "sameKey" + } + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "not", + "value": { + "k": "var", + "name": "older" + } + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "binary", + "op": "||", + "left": { + "k": "not", + "value": { + "k": "var", + "name": "sameRevision" + } + }, + "right": { + "k": "var", + "name": "sameDigest" + } + }, + "right": { + "k": "binary", + "op": "||", + "left": { + "k": "not", + "value": { + "k": "var", + "name": "adjacent" + } + }, + "right": { + "k": "var", + "name": "predecessor" + } + } + } + } + } + }, + "Stitch.Authority.publicationAllowed": { + "module": "Stitch.Authority", + "name": "publicationAllowed", + "params": [ + { + "name": "retiredKey", + "type": { + "kind": "Bool" + } + }, + { + "name": "trustMatches", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "&&", + "left": { + "k": "not", + "value": { + "k": "var", + "name": "retiredKey" + } + }, + "right": { + "k": "var", + "name": "trustMatches" + } + } + }, + "Stitch.Authority.journalRemovalAllowed": { + "module": "Stitch.Authority", + "name": "journalRemovalAllowed", + "params": [ + { + "name": "confirmed", + "type": { + "kind": "Bool" + } + }, + { + "name": "definitelyRefused", + "type": { + "kind": "Bool" + } + }, + { + "name": "noProviderIdentity", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "confirmed" + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "definitelyRefused" + }, + "right": { + "k": "var", + "name": "noProviderIdentity" + } + } + } + }, + "Stitch.Authority.controlAllowed": { + "module": "Stitch.Authority", + "name": "controlAllowed", + "params": [ + { + "name": "action", + "type": { + "kind": "Nat" + } + }, + { + "name": "busy", + "type": { + "kind": "Bool" + } + }, + { + "name": "saved", + "type": { + "kind": "Bool" + } + }, + { + "name": "active", + "type": { + "kind": "Bool" + } + }, + { + "name": "hasHead", + "type": { + "kind": "Bool" + } + }, + { + "name": "hasTrust", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "&&", + "left": { + "k": "not", + "value": { + "k": "var", + "name": "busy" + } + }, + "right": { + "k": "if", + "cond": { + "k": "binary", + "op": "=?", + "left": { + "k": "var", + "name": "action" + }, + "right": { + "k": "nat", + "value": "1" + } + }, + "yes": { + "k": "var", + "name": "saved" + }, + "no": { + "k": "if", + "cond": { + "k": "binary", + "op": "=?", + "left": { + "k": "var", + "name": "action" + }, + "right": { + "k": "nat", + "value": "2" + } + }, + "yes": { + "k": "binary", + "op": "&&", + "left": { + "k": "var", + "name": "saved" + }, + "right": { + "k": "var", + "name": "active" + } + }, + "no": { + "k": "if", + "cond": { + "k": "binary", + "op": "=?", + "left": { + "k": "var", + "name": "action" + }, + "right": { + "k": "nat", + "value": "3" + } + }, + "yes": { + "k": "var", + "name": "hasHead" + }, + "no": { + "k": "if", + "cond": { + "k": "binary", + "op": "=?", + "left": { + "k": "var", + "name": "action" + }, + "right": { + "k": "nat", + "value": "4" + } + }, + "yes": { + "k": "var", + "name": "hasTrust" + }, + "no": { + "k": "if", + "cond": { + "k": "binary", + "op": "=?", + "left": { + "k": "var", + "name": "action" + }, + "right": { + "k": "nat", + "value": "5" + } + }, + "yes": { + "k": "var", + "name": "hasTrust" + }, + "no": { + "k": "if", + "cond": { + "k": "binary", + "op": "=?", + "left": { + "k": "var", + "name": "action" + }, + "right": { + "k": "nat", + "value": "6" + } + }, + "yes": { + "k": "var", + "name": "hasTrust" + }, + "no": { + "k": "bool", + "value": true + } + } + } + } + } + } + } + } + }, + "Stitch.Authority.rotate": { + "module": "Stitch.Authority", + "name": "rotate", + "params": [ + { + "name": "state", + "type": { + "kind": "State" + } + }, + { + "name": "confirmed", + "type": { + "kind": "Bool" + } + }, + { + "name": "sameKey", + "type": { + "kind": "Bool" + } + }, + { + "name": "historyCapacity", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "State" + }, + "body": { + "k": "if", + "cond": { + "k": "call", + "name": "rotationAllowed", + "args": [ + { + "k": "var", + "name": "confirmed" + }, + { + "k": "project", + "value": { + "k": "var", + "name": "state" + }, + "field": "present" + }, + { + "k": "var", + "name": "sameKey" + }, + { + "k": "var", + "name": "historyCapacity" + } + ] + }, + "yes": { + "k": "record", + "name": "State", + "values": { + "generation": { + "k": "binary", + "op": "+", + "left": { + "k": "project", + "value": { + "k": "var", + "name": "state" + }, + "field": "generation" + }, + "right": { + "k": "nat", + "value": "1" + } + }, + "present": { + "k": "bool", + "value": true + }, + "revoked": { + "k": "bool", + "value": false + } + } + }, + "no": { + "k": "var", + "name": "state" + } + } + }, + "Stitch.Authority.revoke": { + "module": "Stitch.Authority", + "name": "revoke", + "params": [ + { + "name": "state", + "type": { + "kind": "State" + } + }, + { + "name": "confirmed", + "type": { + "kind": "Bool" + } + }, + { + "name": "sameScope", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "State" + }, + "body": { + "k": "if", + "cond": { + "k": "call", + "name": "revocationAllowed", + "args": [ + { + "k": "var", + "name": "confirmed" + }, + { + "k": "project", + "value": { + "k": "var", + "name": "state" + }, + "field": "present" + }, + { + "k": "var", + "name": "sameScope" + } + ] + }, + "yes": { + "k": "record", + "name": "State", + "values": { + "generation": { + "k": "project", + "value": { + "k": "var", + "name": "state" + }, + "field": "generation" + }, + "present": { + "k": "bool", + "value": true + }, + "revoked": { + "k": "bool", + "value": true + } + } + }, + "no": { + "k": "var", + "name": "state" + } + } + }, + "Stitch.Authority.migrate": { + "module": "Stitch.Authority", + "name": "migrate", + "params": [ + { + "name": "state", + "type": { + "kind": "State" + } + }, + { + "name": "confirmed", + "type": { + "kind": "Bool" + } + }, + { + "name": "scopeCurrent", + "type": { + "kind": "Bool" + } + }, + { + "name": "samePrior", + "type": { + "kind": "Bool" + } + }, + { + "name": "historyCapacity", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "State" + }, + "body": { + "k": "if", + "cond": { + "k": "call", + "name": "migrationAllowed", + "args": [ + { + "k": "var", + "name": "confirmed" + }, + { + "k": "var", + "name": "scopeCurrent" + }, + { + "k": "project", + "value": { + "k": "var", + "name": "state" + }, + "field": "present" + }, + { + "k": "var", + "name": "samePrior" + }, + { + "k": "var", + "name": "historyCapacity" + } + ] + }, + "yes": { + "k": "record", + "name": "State", + "values": { + "generation": { + "k": "binary", + "op": "+", + "left": { + "k": "project", + "value": { + "k": "var", + "name": "state" + }, + "field": "generation" + }, + "right": { + "k": "nat", + "value": "1" + } + }, + "present": { + "k": "bool", + "value": true + }, + "revoked": { + "k": "bool", + "value": false + } + } + }, + "no": { + "k": "var", + "name": "state" + } + } + }, + "Stitch.Authority.maySign": { + "module": "Stitch.Authority", + "name": "maySign", + "params": [ + { + "name": "state", + "type": { + "kind": "State" + } + }, + { + "name": "expectedKey", + "type": { + "kind": "Bool" + } + }, + { + "name": "bodyKey", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "call", + "name": "signingAllowed", + "args": [ + { + "k": "binary", + "op": "&&", + "left": { + "k": "project", + "value": { + "k": "var", + "name": "state" + }, + "field": "present" + }, + "right": { + "k": "not", + "value": { + "k": "project", + "value": { + "k": "var", + "name": "state" + }, + "field": "revoked" + } + } + }, + { + "k": "var", + "name": "expectedKey" + }, + { + "k": "var", + "name": "bodyKey" + } + ] + } + }, + "Stitch.Budget.chooseBool": { + "module": "Stitch.Budget", + "name": "chooseBool", + "params": [ + { + "name": "condition", + "type": { + "kind": "Bool" + } + }, + { + "name": "whenTrue", + "type": { + "kind": "Bool" + } + }, + { + "name": "whenFalse", + "type": { + "kind": "Bool" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "if", + "cond": { + "k": "var", + "name": "condition" + }, + "yes": { + "k": "var", + "name": "whenTrue" + }, + "no": { + "k": "var", + "name": "whenFalse" + } + } + }, + "Stitch.Budget.chooseNat": { + "module": "Stitch.Budget", + "name": "chooseNat", + "params": [ + { + "name": "condition", + "type": { + "kind": "Bool" + } + }, + { + "name": "whenTrue", + "type": { + "kind": "Nat" + } + }, + { + "name": "whenFalse", + "type": { + "kind": "Nat" + } + } + ], + "result": { + "kind": "Nat" + }, + "body": { + "k": "if", + "cond": { + "k": "var", + "name": "condition" + }, + "yes": { + "k": "var", + "name": "whenTrue" + }, + "no": { + "k": "var", + "name": "whenFalse" + } + } + }, + "Stitch.Budget.reserveAllowed": { + "module": "Stitch.Budget", + "name": "reserveAllowed", + "params": [ + { + "name": "spent", + "type": { + "kind": "Nat" + } + }, + { + "name": "reserved", + "type": { + "kind": "Nat" + } + }, + { + "name": "cost", + "type": { + "kind": "Nat" + } + }, + { + "name": "limit", + "type": { + "kind": "Nat" + } + }, + { + "name": "now", + "type": { + "kind": "Nat" + } + }, + { + "name": "last", + "type": { + "kind": "Nat" + } + }, + { + "name": "end", + "type": { + "kind": "Nat" + } + } + ], + "result": { + "kind": "Bool" + }, + "body": { + "k": "binary", + "op": "&&", + "left": { + "k": "binary", + "op": "<=?", + "left": { + "k": "var", + "name": "last" + }, + "right": { + "k": "var", + "name": "now" + } + }, + "right": { + "k": "binary", + "op": "&&", + "left": { + "k": "binary", + "op": " name.includes('::') ? name.replace('::','.') : module+'.'+name; +function natural(value) { + if(typeof value==='bigint'&&value>=0n)return value; + if(typeof value==='number'&&Number.isSafeInteger(value)&&value>=0)return BigInt(value); + throw new TypeError('model Nat must be a non-negative BigInt or safe integer'); +} +function coerce(value,type,module) { + if(type.kind==='Nat')return natural(value); + if(type.kind==='Bool') {if(typeof value!=='boolean')throw new TypeError('model Bool required');return value;} + if(type.kind==='Bytes') {if(!(value instanceof Uint8Array))throw new TypeError('model Bytes required');return value.slice();} + if(type.kind==='String') {if(typeof value!=='string')throw new TypeError('model String required');return value;} + if(type.kind==='List') {if(!Array.isArray(value))throw new TypeError('model List required');return value.map(x=>coerce(x,type.element,module));} + const id=qualify(module,type.kind),shape=types[id]; + if(!shape)throw new TypeError('unknown model type '+id); + if(shape.kind==='structure') {if(!value||typeof value!=='object'||Object.keys(value).sort().join(',')!==shape.fields.map(x=>x.name).sort().join(','))throw new TypeError('exact model record fields required for '+id);return Object.fromEntries(shape.fields.map(f=>[f.name,coerce(value[f.name],f.type,id.slice(0,id.lastIndexOf('.')))]));} + const constructor=shape.constructors.find(x=>x.name===value?.tag); + if(!constructor||!Array.isArray(value.fields)||value.fields.length!==constructor.fields.length)throw new TypeError('model constructor required for '+id); + return {tag:value.tag,fields:value.fields.map((v,i)=>coerce(v,constructor.fields[i],id.slice(0,id.lastIndexOf('.'))))}; +} +const tailCall = Symbol("source-tail-call"); +function evaluate(ast,env,module,tail=false) { + switch(ast.k) { + case 'nat':return BigInt(ast.value); + case 'bool':case 'string':return ast.value; + case 'var':if(!Object.hasOwn(env,ast.name))throw Error('unbound model variable');return env[ast.name]; + case 'if':return evaluate(evaluate(ast.cond,env,module)?ast.yes:ast.no,env,module,tail); + case 'not':return !evaluate(ast.value,env,module); + case 'project':return evaluate(ast.value,env,module)[ast.field]; + case 'let':return evaluate(ast.body,{...env,[ast.name]:evaluate(ast.value,env,module)},module,tail); + case 'record':return Object.fromEntries(Object.entries(ast.values).map(([k,v])=>[k,evaluate(v,env,module)])); + case 'call': {const id=qualify(module,ast.name),args=ast.args.map(x=>evaluate(x,env,module));return tail?{[tailCall]:true,id,args}:invoke(id,args);} + case 'nil':return []; + case 'cons':return [evaluate(ast.head,env,module),...evaluate(ast.tail,env,module)]; + case 'ctor':return {tag:ast.name.split('.').at(-1),fields:ast.args.map(x=>evaluate(x,env,module))}; + case 'match': { + const value=evaluate(ast.value,env,module);let tag,fields; + if(Array.isArray(value)){tag=value.length?'cons':'nil';fields=value.length?[value[0],value.slice(1)]:[];}else if(typeof value==='bigint'){tag=value===0n?'zero':'succ';fields=value===0n?[]:[value-1n];}else if(typeof value==='boolean'){tag=value?'true':'false';fields=[];}else {tag=value.tag;fields=value.fields;} + const b=ast.branches.find(x=>x.constructor.split('.').at(-1)===tag); + if(!b||b.binders.length!==fields.length)throw Error('nonexhaustive model match');return evaluate(b.body,{...env,...Object.fromEntries(b.binders.map((n,i)=>[n,fields[i]]))},module,tail); + } + case 'binary': { + const left=evaluate(ast.left,env,module); + if(ast.op==='&&')return left&&evaluate(ast.right,env,module); + if(ast.op==='||')return left||evaluate(ast.right,env,module); + const right=evaluate(ast.right,env,module); + switch(ast.op){case '+':return left+right;case '=?':return left===right;case '<=?':return left<=right;case 'evaluate(x,env,module)); + switch(ast.operation){case 'subtract':return a[0]>=a[1]?a[0]-a[1]:0n;case 'multiply':return a[0]*a[1];case 'quotient':return a[1]===0n?a[2]:a[0]/a[1];case 'remainder':return a[1]===0n?a[2]:a[0]%a[1];case 'equal':return a[0].length===a[1].length&&a[0].every((x,i)=>x===a[1][i]);default:throw Error('unsupported model primitive');} + } + default:throw Error('unsupported model node '+ast.k); + } +} +function invoke(id,args) {for(;;){const d=definitions[id];if(!d||d.params.length!==args.length)throw Error('unknown model function/arity '+id);const result=evaluate(d.body,Object.fromEntries(d.params.map((p,i)=>[p.name,args[i]])),d.module,true);if(!result?.[tailCall])return result;id=result.id;args=result.args;}} +export const model=Object.freeze(Object.fromEntries(Object.entries(definitions).map(([id,d])=>[id,(...args)=>{if(args.length!==d.params.length)throw new TypeError('model arity '+id);return invoke(id,args.map((v,i)=>coerce(v,d.params[i].type,d.module)));}]))); + +export const budgetReserveAllowed = model["Stitch.Budget.reserveAllowed"]; +export const budgetSettlementAllowed = model["Stitch.Budget.settlementAllowed"]; +export const pointerSuccessorAllowed = model["Stitch.Pointer.successorAllowed"]; +export const checkpointLinkAllowed = model["Stitch.Compute.checkpointLinkAllowed"]; +export const custodyCommitAllowed = model["Stitch.Custody.commitAllowed"]; +export const custodyRetireAllowed = model["Stitch.Custody.retireAllowed"]; +export const custodyPairAllowed = model["Stitch.Fragments.pairAllowed"]; diff --git a/src/layer1-uor/index.js b/src/layer1-uor/index.js index 059533c..69b310f 100644 --- a/src/layer1-uor/index.js +++ b/src/layer1-uor/index.js @@ -97,6 +97,13 @@ export function applyPrimitiveOp(op, a, b = null) { const { bits, mask, value: x } = a; const y = b ? (b.value & mask) : 0n; + if (op === PrimitiveOp.CONCAT) { + if (!(b instanceof Datum)) throw new TypeError('CONCAT requires a second Datum'); + // UOR pipeline TermValue bytes are big-endian. Datum.toBytes remains its + // legacy little-endian coordinate wire format, not CONCAT's term encoding. + if (bits + b.bits > 128) throw new RangeError('CONCAT result exceeds Datum capacity (128 bits)'); + return new Datum(bits + b.bits, (x << BigInt(b.bits)) | b.value); + } switch (op) { case PrimitiveOp.NEG: return new Datum(bits, (-x) & mask); @@ -130,6 +137,15 @@ export function applyPrimitiveOp(op, a, b = null) { return new Datum(bits, y === 0n ? 0n : (x / y) & mask); case PrimitiveOp.MOD: return new Datum(bits, y === 0n ? 0n : (x % y) & mask); + case PrimitiveOp.POW: { + let result = 1n, base = x, exponent = y; + while (exponent > 0n) { + if (exponent & 1n) result = (result * base) & mask; + base = (base * base) & mask; + exponent >>= 1n; + } + return new Datum(bits, result); + } default: throw new Error(`Unsupported PrimitiveOp discriminant: ${op}`); } @@ -462,8 +478,8 @@ export class Trace { } /** - * Re-derive a Certified GroundingCertificate from a Trace via structural validation - * + fingerprint passthrough (matches `uor_foundation_verify::verify_trace`). + * Check structural trace well-formedness and preserve the legacy UOR grounding record. + * This does NOT replay the named program/input or certify execution. Use replay.js for that. * * @param {Trace} trace * @returns {{ ok: boolean, error?: string, certificate?: { fingerprint: ContentFingerprint, wittLevelBits: number, kind: number } }} @@ -494,6 +510,7 @@ export function verifyTrace(trace) { return { ok: true, + evidence: 'structure-only', certificate: { fingerprint: trace.fingerprint, wittLevelBits: trace.wittLevelBits, diff --git a/src/layer1-uor/pointer.js b/src/layer1-uor/pointer.js new file mode 100644 index 0000000..fd54416 --- /dev/null +++ b/src/layer1-uor/pointer.js @@ -0,0 +1,326 @@ +/** Single-writer pointer admission. The caller supplies an independently trusted authority key. */ +import { canonicalBytes, sha256Bytes, parseCanonicalJson } from './custody.js'; +import { record, natural, identifier, digest, refuse } from './contracts.js'; +import { model, pointerSuccessorAllowed } from './generated-model.js'; +import { acceptedRecoveryAnchor } from '../recovery.js'; +import { dnsRequestAllowed, dnsReadDecision, dnsWriteState, dnsWriteOutcome, dnsLifecycle } from './effects.js'; +const hex = bytes => Array.from(bytes, b => b.toString(16).padStart(2, '0')).join(''); +function unhex(value, length) { + if (typeof value !== 'string' || value.length !== length * 2 || !/^[0-9a-f]+$/.test(value)) refuse('invalid-key-or-signature'); + return Uint8Array.from(value.match(/../g), x => parseInt(x, 16)); +} +function validateBody(body) { + record(body, ['version', 'name', 'authorityKey', 'revision', 'previousDigest', 'objectRoot', 'validFromMs', 'validUntilMs']); + if (body.version !== 1) refuse('unsupported-pointer'); + identifier(body.name); unhex(body.authorityKey, 32); natural(body.revision); digest(body.objectRoot); + natural(body.validFromMs); natural(body.validUntilMs); + if (body.validUntilMs <= body.validFromMs) refuse('invalid-validity'); + if (body.previousDigest !== null) digest(body.previousDigest); + return body; +} +const snapshot = value => JSON.parse(new TextDecoder().decode(canonicalBytes(value))); +const signingBytes = body => canonicalBytes({ domain: 'stitch/pointer/v1', body }); +export async function generateAuthority() { + const keyPair = await globalThis.crypto.subtle.generateKey({ name: 'Ed25519' }, false, ['sign', 'verify']); + const publicKey = hex(new Uint8Array(await globalThis.crypto.subtle.exportKey('raw', keyPair.publicKey))); + return { publicKey, privateKey: keyPair.privateKey }; +} +export async function signPointer(body, privateKey) { + body = snapshot(body); + validateBody(body); + const signature = hex(new Uint8Array(await globalThis.crypto.subtle.sign('Ed25519', privateKey, signingBytes(body)))); + const pointer = { ...structuredClone(body), signature }; + return { ...pointer, pointerDigest: await sha256Bytes(canonicalBytes(pointer), 'pointer') }; +} +export async function verifyPointer(pointer, trustedAuthorityKey) { + pointer = snapshot(pointer); + record(pointer, ['version', 'name', 'authorityKey', 'revision', 'previousDigest', 'objectRoot', 'validFromMs', 'validUntilMs', 'signature', 'pointerDigest']); + const { signature, pointerDigest, ...body } = pointer; + validateBody(body); digest(pointerDigest); unhex(trustedAuthorityKey, 32); + if (body.authorityKey !== trustedAuthorityKey) refuse('wrong-authority'); + if (pointerDigest !== await sha256Bytes(canonicalBytes({ ...body, signature }), 'pointer')) refuse('pointer-integrity'); + const key = await globalThis.crypto.subtle.importKey('raw', unhex(trustedAuthorityKey, 32), { name: 'Ed25519' }, false, ['verify']); + if (!await globalThis.crypto.subtle.verify('Ed25519', key, unhex(signature, 64), signingBytes(body))) refuse('pointer-signature'); + return body; +} +/** Compare-and-swap against this observer's retained head, not global linearizability. */ +export async function admitPointer(current, candidate, { name, trustedAuthorityKey, nowMs }) { + candidate = snapshot(candidate); if (current !== null) current = snapshot(current); + identifier(name); natural(nowMs); + await verifyPointer(candidate, trustedAuthorityKey); + if (candidate.name !== name) refuse('pointer-name'); + if (!(candidate.validFromMs <= nowMs && nowMs < candidate.validUntilMs)) refuse('pointer-expired'); + if (current === null) { + if (candidate.revision !== 0 || candidate.previousDigest !== null) refuse('pointer-bootstrap'); + } else { + await verifyPointer(current, trustedAuthorityKey); + if (current.name !== name || current.revision === Number.MAX_SAFE_INTEGER || + !pointerSuccessorAllowed(current.revision, candidate.revision, candidate.previousDigest === current.pointerDigest, + true, true, candidate.validFromMs, candidate.validUntilMs, nowMs)) refuse('pointer-conflict'); + } + return structuredClone(candidate); +} + +/** Retained observer-local head; pinning a key is an explicit host decision. */ +export class PointerObserver { + #head = null; + #pending = Promise.resolve(); + constructor({ name, trustedAuthorityKey, clock = Date.now, admission = null, trustStore = null }) { + identifier(name); unhex(trustedAuthorityKey, 32); + // A recovery action can never repin or rename an existing observer. + Object.defineProperties(this, { name: { value: name, enumerable: true }, + trustedAuthorityKey: { value: trustedAuthorityKey, enumerable: true } }); + this.clock = clock; this.admission = admission; this.trustStore = trustStore; + } + get head() { return this.#head === null ? null : structuredClone(this.#head); } + /** Explicit local trust-bootstrap, never ordinary imported evidence admission. + * Both restoration and ordinary succession share the same serialized CAS. + * Only an empty head (or the exact already-retained head) is eligible. Even a + * newer accepted anchor cannot replace a different live head. + */ + restoreFromRecovery(vault, { expectedDigest, scopeStillCurrent = () => true }) { + const scope = { name: this.name, authorityKey: this.trustedAuthorityKey, expectedDigest }; + const work = this.#pending.then(async () => { + await this.trustStore?.assertTrustedAuthority(this.name, this.trustedAuthorityKey); + const anchor = acceptedRecoveryAnchor(vault, scope); + await verifyPointer(anchor, this.trustedAuthorityKey); + // Recheck acceptance and the wall clock after asynchronous crypto. A newer + // acceptance, changed UI scope or expiry cannot commit a stale operation. + const accepted = acceptedRecoveryAnchor(vault, scope); + const nowMs = this.clock(); natural(nowMs); + if (!model['Stitch.Pointer.restoreAllowed'](accepted.pointerDigest === anchor.pointerDigest, + anchor.name === this.name && anchor.authorityKey === this.trustedAuthorityKey && scopeStillCurrent() === true, + anchor.pointerDigest === expectedDigest, true, anchor.validFromMs, anchor.validUntilMs, nowMs, + this.#head !== null, this.#head?.pointerDigest === anchor.pointerDigest)) refuse('pointer-restore-conflict-or-stale'); + // Exact repetition is idempotent, including its storage reservation. + if (this.#head === null) { + const saved = await this.trustStore?.assertTrustedAuthority(this.name, this.trustedAuthorityKey); + if (saved && saved.head.pointerDigest !== anchor.pointerDigest) refuse('pointer-saved-anchor-changed'); + this.admission?.reserve('refresh', { storageBytes: canonicalBytes(anchor).length }); + this.#head = anchor; + } + return this.head; + }); + this.#pending = work.catch(() => {}); + return work; + } + /** Explicit restoration from operator-saved origin-local trust. Never repins + * this observer and never replaces a different retained head. */ + restoreFromTrustedAnchor({ expectedDigest, scopeStillCurrent = () => true }) { + const work = this.#pending.then(async () => { + if (!this.trustStore) refuse('pointer-trust-storage-unavailable'); + const anchor = await this.trustStore.assertTrustedAuthority(this.name, this.trustedAuthorityKey); + if (!anchor || anchor.head.pointerDigest !== expectedDigest) refuse('pointer-saved-anchor-changed'); + await verifyPointer(anchor.head, this.trustedAuthorityKey); + const current = await this.trustStore.assertTrustedAuthority(this.name, this.trustedAuthorityKey); + const now = this.clock(); natural(now); + if (!model['Stitch.Pointer.restoreAllowed'](current?.head.pointerDigest === expectedDigest, + scopeStillCurrent() === true, anchor.head.pointerDigest === expectedDigest, true, + anchor.head.validFromMs, anchor.head.validUntilMs, now, this.#head !== null, this.#head?.pointerDigest === expectedDigest)) refuse('pointer-restore-conflict-or-stale'); + if (this.#head === null) { + this.admission?.reserve('refresh', { storageBytes: canonicalBytes(anchor.head).length }); + this.#head = structuredClone(anchor.head); + } + return this.head; + }); + this.#pending = work.catch(() => {}); return work; + } + admit(candidate) { + // Snapshot synchronously and serialize compare-and-swap plus head retention. + try { candidate = snapshot(candidate); } catch (error) { return Promise.reject(error); } + const work = this.#pending.then(async () => { + const savedTrust = await this.trustStore?.assertTrustedAuthority(this.name, this.trustedAuthorityKey); + const admitted = await admitPointer(this.#head, candidate, { name: this.name, + trustedAuthorityKey: this.trustedAuthorityKey, nowMs: this.clock() }); + this.admission?.reserve('refresh', { storageBytes: canonicalBytes(admitted).length }); + if (savedTrust) await this.trustStore.retainTrustedHead({ name: this.name, expectedPointerDigest: this.#head?.pointerDigest ?? null, candidate: admitted, nowMs: this.clock() }); + this.#head = admitted; + return this.head; + }); + this.#pending = work.catch(() => {}); + return work; + } +} + +/** Full pointer JSON needs multiple DNS TXT strings; never truncate commitments. */ +export function pointerDnsText(pointer) { + const text = new TextDecoder().decode(canonicalBytes(pointer)); + return text.match(/.{1,200}/g).map(part => JSON.stringify(part)).join(' '); +} +export function parsePointerDnsText(text) { + if (typeof text !== 'string' || text.length > 4096) refuse('invalid-pointer-dns'); + const limits = { maxBytes: 4096, maxDepth: 8, maxEntries: 128, maxStringLength: 1024 }; + if (text.startsWith('{')) return structuredClone(parseCanonicalJson(text, limits)); + const chunks = text.match(/"(?:[^"\\]|\\.)*"/g); + if (!chunks || chunks.join(' ') !== text.trim()) refuse('invalid-pointer-dns'); + return structuredClone(parseCanonicalJson(chunks.map(part => parseCanonicalJson(part, limits)).join(''), limits)); +} + +/** DNS publication state scoped to destination and pinned authority. + * Optional origin-local journal provides conservative restart reconciliation. + * Reconciliation observes the provider; it is neither atomic CAS nor global order. + * Credentials are used for this call only and never retained in publication state. + */ +export class PointerPublisher { + #states = new Map(); + #busy = new Set(); + #journalBusy = false; + constructor({ resolver, clock = Date.now, journal = null }) { this.resolver = resolver; this.clock = clock; this.journal = journal; } + async restore(destination) { + const scope = JSON.stringify([String(destination.zoneId).toLowerCase(), destination.name, destination.trustedAuthorityKey]); + if (this.journal) { + const state = await this.journal.readPublication(scope); + if (state) this.#states.set(scope, state); + else this.#states.delete(scope); + } + return this.pending(destination); + } + async publish(request) { + if (!this.journal) return this.#publish(request); + if (this.#journalBusy) refuse('dns-publication-in-flight'); + request = { ...request, candidate: snapshot(request.candidate) }; + this.#journalBusy = true; + const scope = JSON.stringify([String(request.zoneId).toLowerCase(), request.name, request.trustedAuthorityKey]); + try { return await this.journal.exclusivePublication(scope, () => this.#publishJournal(request)); } + finally { this.#journalBusy = false; } + } + async #publishJournal(request) { + if (!this.journal) return this.#publish(request); + const { zoneId, name, trustedAuthorityKey } = request; + if (typeof zoneId !== 'string' || !/^[a-f0-9]{32}$/i.test(zoneId)) refuse('invalid-dns-destination'); + identifier(name); unhex(trustedAuthorityKey, 32); + if (typeof request.apiToken !== 'string' || !request.apiToken) refuse('invalid-dns-destination'); + const candidate = snapshot(request.candidate); + await verifyPointer(candidate, trustedAuthorityKey); + if (candidate.name !== name) refuse('pointer-name'); + const scope = JSON.stringify([zoneId.toLowerCase(), name, trustedAuthorityKey]); + // Reads and local admission do not claim an uncertain external effect. + // The Web Lock spans the read, write-ahead commit, dispatch and settlement. + const prior = await this.journal.readPublication(scope); + const effective = prior?.outcome === 'unknown' ? prior.candidate : candidate; + if (prior) this.#states.set(scope, prior); + else this.#states.delete(scope); + let claim = null; + const settle = async () => { + const next = this.#states.get(scope); + if (next && next.outcome !== 'unknown' && (claim?.writer || prior?.outcome === 'unknown')) { + await this.journal.finishPublication(scope, effective.pointerDigest, claim?.owner, next); + } + }; + let result; + try { + result = await this.#publish({ ...request, candidate: effective }, async pending => { + claim = await this.journal.claimPublication(scope, pending); + if (!claim.writer) throw Error('An earlier publication must be reconciled before dispatch.'); + }); + } catch (error) { + // A trusted adapter can prove it refused before dispatch. Persist that + // definite refusal using the claim owner; failed settlement stays unknown. + try { await settle(); } + catch { + await this.restore(request); + return { outcome: 'unknown', reason: 'Could not save the definite refusal. Reconcile the retained candidate before any further write.' }; + } + await this.restore(request); + throw error; + } + try { await settle(); } + catch { + await this.restore(request); + return { outcome: 'unknown', reason: 'Provider result could not be saved. Reconcile the retained exact candidate; do not repeat the write.' }; + } + if (claim?.writer || prior?.outcome === 'unknown') await this.restore(request); + return result; + } + + pending({ zoneId, name, trustedAuthorityKey }) { + const state = this.#states.get(JSON.stringify([String(zoneId).toLowerCase(), name, trustedAuthorityKey])); + return state?.outcome === 'unknown' ? structuredClone(state.candidate) : null; + } + status({ zoneId, name, trustedAuthorityKey }) { + const scope = JSON.stringify([String(zoneId).toLowerCase(), name, trustedAuthorityKey]); + return dnsLifecycle(this.#states.get(scope), this.#busy.has(scope)); + } + async #publish({ zoneId, apiToken, name, trustedAuthorityKey, candidate }, beforeWrite = async () => {}) { + // Snapshot all caller-controlled data before the first await. + candidate = snapshot(candidate); + if (typeof zoneId !== 'string' || !/^[a-f0-9]{32}$/i.test(zoneId) + || typeof apiToken !== 'string' || !apiToken) refuse('invalid-dns-destination'); + zoneId = zoneId.toLowerCase(); + identifier(name); unhex(trustedAuthorityKey, 32); + const scope = JSON.stringify([zoneId, name, trustedAuthorityKey]); + const destination = { zoneId, name, trustedAuthorityKey }; + const busy = this.#busy.has(scope), retained = this.#states.get(scope); + if (!dnsRequestAllowed(destination, retained, candidate, busy)) { + if (busy) refuse('dns-publication-in-flight'); + if (retained?.outcome === 'unknown') return { outcome: 'unknown', reason: 'Reconcile the earlier exact candidate before another publication.' }; + refuse('dns-publication-unresolved'); + } + this.#busy.add(scope); + try { + await verifyPointer(candidate, trustedAuthorityKey); + if (candidate.name !== name) refuse('pointer-name'); + const previous = this.#states.get(scope); + // Reserve retained publication-state capacity before any provider effect, + // so a successful/uncertain write cannot outlive an admission refusal. + this.resolver.admission?.reserve('refresh', { storageBytes: canonicalBytes(candidate).length + canonicalBytes(scope).length }); + let records; + try { records = await this.resolver.listCloudflareRecords({ zoneId, apiToken, name }); } + catch (error) { + if (previous?.outcome === 'unknown') return { outcome: 'unknown', reason: 'Provider reconciliation failed; retry a read without repeating the write.' }; + throw error; + } + // Defense in depth for adapters: never overwrite ambiguous or foreign rows. + if (!Array.isArray(records) || records.length > 1) refuse('dns-record-conflict'); + const remote = records[0]; + let recordId = null, pointer = null; + if (remote) { + if (remote.name !== name || remote.type !== 'TXT' || typeof remote.id !== 'string' + || !/^[A-Za-z0-9_-]{1,128}$/.test(remote.id)) refuse('dns-record-conflict'); + pointer = parsePointerDnsText(remote.content); + await verifyPointer(pointer, trustedAuthorityKey); + if (pointer.name !== name || (previous?.recordId && previous.recordId !== remote.id)) refuse('dns-record-conflict'); + recordId = remote.id; + } + const now = this.clock(); + const decision = dnsReadDecision(destination, previous, candidate, remote, pointer, now); + if (decision === 'Reconciled') { + this.#states.set(scope, { outcome: 'published', pointerDigest: candidate.pointerDigest, recordId }); + return { outcome: 'published', recordId, reconciled: true }; + } + if (decision === 'Wait') { + return { outcome: 'unknown', reason: 'The earlier write may have completed. Provider has not shown the exact candidate; retry reconciliation, not publication.' }; + } + if (decision === 'Refuse') { + if (!remote && previous?.recordId) refuse('dns-record-missing'); + if (!(candidate.validFromMs <= now && now < candidate.validUntilMs)) refuse('pointer-expired'); + refuse('dns-record-conflict'); + } + // Mark uncertain before dispatch. An adapter exception after this boundary + // cannot silently authorize another mutation, even if it lost the response. + const pending = dnsWriteState(destination, previous, candidate, remote, pointer, now); + await beforeWrite(pending); + this.#states.set(scope, pending); + let result; + try { + result = await this.resolver.writeCloudflareRecord({ zoneId, apiToken, recordId, type: 'TXT', name, + content: pointerDnsText(candidate), ttl: 60 }); + } catch (error) { + if (error.effectDispatched === false) { + // Built-in adapter refused before invoking fetch. Keep all resource + // charges, but an explicit later attempt is safe after local repair. + this.#states.set(scope, { ...pending, outcome: dnsWriteOutcome(destination, pending, { outcome: 'refused' }), candidate: undefined }); + } + throw error; + } + const outcome = dnsWriteOutcome(destination, pending, result); + this.#states.set(scope, { outcome, pointerDigest: candidate.pointerDigest, candidate: outcome === 'unknown' ? candidate : undefined, recordId: outcome === 'published' ? result.id : recordId }); + return { outcome, recordId: outcome === 'published' ? result.id : recordId, + reason: outcome === 'unknown' ? 'Publication completion is unknown. Retry to read the provider without repeating this write.' : undefined }; + } catch (error) { + if (this.#states.get(scope)?.outcome === 'unknown') return { outcome: 'unknown', + reason: 'The earlier write is unresolved and this read could not safely reconcile it. Check the provider record, then retry reconciliation; no write was repeated.' }; + throw error; + } finally { this.#busy.delete(scope); } + } +} diff --git a/src/layer2-schedulers/index.js b/src/layer2-schedulers/index.js index a8227ba..9e936da 100644 --- a/src/layer2-schedulers/index.js +++ b/src/layer2-schedulers/index.js @@ -9,6 +9,8 @@ * Zero upward dependencies. */ +import { budgetReserveAllowed } from '../layer1-uor/generated-model.js'; + const LN2 = Math.LN2; /** @@ -311,6 +313,10 @@ export class BudgetPacedSurvivalScheduler { static NAME = 'Budget-Paced-Survival'; constructor({ ttlSeconds = 60, durationSeconds = 600, maxRefreshBudget = 30, minFloorSeconds = 5 } = {}) { + if (![ttlSeconds, durationSeconds, minFloorSeconds].every(x => Number.isFinite(x) && x > 0) || + !Number.isSafeInteger(maxRefreshBudget) || maxRefreshBudget < 0) throw new RangeError('Invalid scheduler policy'); + this.epochStartSec = null; + this.lastObservedSec = 0; this.ttlSeconds = ttlSeconds; this.durationSeconds = durationSeconds; this.maxRefreshBudget = maxRefreshBudget; @@ -321,25 +327,46 @@ export class BudgetPacedSurvivalScheduler { } recordFailure(timestampSec) { + if (!Number.isFinite(timestampSec)) throw new RangeError('Invalid failure observation'); this.failureTimestamps.push(timestampSec); + if (this.failureTimestamps.length > 256) this.failureTimestamps.shift(); } markRefreshed(timestampSec) { + if (!Number.isFinite(timestampSec) || timestampSec < 0) throw new RangeError('Invalid elapsed time'); + if (this.epochStartSec === null) { + this.epochStartSec = timestampSec; + this.lastRefreshSec = timestampSec; + this.lastObservedSec = timestampSec; + this.refreshCount = 1; // Initial observation is not a network refresh. + return true; + } + if (timestampSec < this.lastObservedSec) return false; + const elapsedMs = Math.floor((timestampSec - this.epochStartSec) * 1000); + const lastMs = Math.floor((this.lastObservedSec - this.epochStartSec) * 1000); + if (!budgetReserveAllowed(this.refreshCount - 1, 0, 1, this.maxRefreshBudget, + elapsedMs, lastMs, Math.ceil(this.durationSeconds * 1000))) return false; this.lastRefreshSec = timestampSec; + this.lastObservedSec = timestampSec; this.refreshCount++; + return true; } evaluate(nowSec) { + if (!Number.isFinite(nowSec) || nowSec < this.lastObservedSec) throw new RangeError('Clock regression'); + if (this.epochStartSec === null) this.markRefreshed(nowSec); + this.lastObservedSec = nowSec; + const elapsedSeconds = nowSec - this.epochStartSec; const ageSeconds = Math.max(0, nowSec - this.lastRefreshSec); const shortFailures = this.failureTimestamps.slice(-4); const lambdaShort = estimatePoissonRate(shortFailures, 1 / this.ttlSeconds); const lambdaLong = estimatePoissonRate(this.failureTimestamps, 1 / this.ttlSeconds); - // Cauchy-Schwarz optimal refresh spacing under budget constraint: dt* proportional to (lambda_long / lambda_short)^(1/2) + // Candidate hazard pacing only; no general optimality claim for observed churn. const sqrtHazardRatio = Math.max(0.5, Math.min(2.5, Math.sqrt(lambdaShort / Math.max(1e-6, lambdaLong)))); const refreshesUsed = Math.max(0, this.refreshCount - 1); const budgetRemaining = Math.max(1, this.maxRefreshBudget - refreshesUsed); - const timeRemaining = Math.max(this.minFloorSeconds, this.durationSeconds - nowSec); + const timeRemaining = Math.max(this.minFloorSeconds, this.durationSeconds - elapsedSeconds); const nominalBudgetInterval = timeRemaining / budgetRemaining; const targetIntervalSeconds = Math.max( @@ -347,8 +374,12 @@ export class BudgetPacedSurvivalScheduler { Math.min(this.ttlSeconds * 0.9, nominalBudgetInterval / sqrtHazardRatio) ); const pAlive = computeSurvivalProbability(lambdaShort, ageSeconds); - const shouldRefresh = ageSeconds >= targetIntervalSeconds; + const exhausted = refreshesUsed >= this.maxRefreshBudget || elapsedSeconds >= this.durationSeconds; + const shouldRefresh = !exhausted && ageSeconds >= targetIntervalSeconds; return { + elapsedSeconds, + budgetRemaining: Math.max(0, this.maxRefreshBudget - refreshesUsed), + exhausted, ageSeconds, lambda: lambdaShort, pAlive, diff --git a/src/layer2-schedulers/policy.js b/src/layer2-schedulers/policy.js new file mode 100644 index 0000000..73de074 --- /dev/null +++ b/src/layer2-schedulers/policy.js @@ -0,0 +1,108 @@ +/** Conservative reservation ledger. Failed or ambiguous effects keep their reservation charged. */ +import { identifier, natural, record, refuse } from '../layer1-uor/contracts.js'; +import { snapshotRecord } from '../layer1-uor/custody.js'; +import { budgetReserveAllowed, budgetSettlementAllowed } from '../layer1-uor/generated-model.js'; +let runtimeEpoch = 0; // origin-local instance identity, never a distributed clock +const kinds = ['refresh', 'place', 'repair', 'checkpoint', 'retrieve']; +const measures = ['requests', 'transferBytes', 'storageBytes', 'computeSteps']; +function cost(value) { record(value, measures); for (const k of measures) natural(value[k]); return value; } +export const zeroCost = () => Object.fromEntries(measures.map(k => [k, 0])); +export function createBudget({ epoch, startMs, endMs, limit }) { + identifier(epoch); natural(startMs); natural(endMs); cost(limit); + if (endMs <= startMs) refuse('invalid-epoch'); + return { epoch, startMs, endMs, lastObservedMs: startMs, limit: { ...limit }, spent: zeroCost(), reservations: [] }; +} +function validate(state) { + record(state, ['epoch', 'startMs', 'endMs', 'lastObservedMs', 'limit', 'spent', 'reservations']); + identifier(state.epoch); natural(state.startMs); natural(state.endMs); natural(state.lastObservedMs); + cost(state.limit); cost(state.spent); + if (state.endMs <= state.startMs || state.lastObservedMs < state.startMs || !Array.isArray(state.reservations)) refuse('invalid-budget'); + const ids = new Set(); const totals = zeroCost(); + for (const r of state.reservations) { + record(r, ['id', 'kind', 'cost', 'status']); identifier(r.id); cost(r.cost); + if (ids.has(r.id) || !kinds.includes(r.kind) || !['reserved', 'settled'].includes(r.status)) refuse('invalid-reservation'); + ids.add(r.id); + for (const k of measures) totals[k] += r.cost[k]; + } + for (const k of measures) { + natural(totals[k]); + if (totals[k] !== state.spent[k] || state.spent[k] > state.limit[k]) refuse('invalid-budget'); + } +} +export function reserveAction(state, { id, kind, cost: requested }, nowMs) { + requested = snapshotRecord(requested); + validate(state); identifier(id); natural(nowMs); cost(requested); + if (!kinds.includes(kind)) refuse('unsupported-action'); + if (nowMs < state.lastObservedMs) refuse('clock-regression'); + if (nowMs >= state.endMs) refuse('epoch-expired'); + if (state.reservations.some(r => r.id === id)) refuse('duplicate-action'); + const spent = zeroCost(); + for (const k of measures) { + if (!budgetReserveAllowed(state.spent[k], 0, requested[k], state.limit[k], nowMs, state.lastObservedMs, state.endMs)) refuse('budget-exhausted'); + spent[k] = state.spent[k] + requested[k]; + } + return { ...structuredClone(state), lastObservedMs: nowMs, spent, + reservations: [...structuredClone(state.reservations), { id, kind, cost: { ...requested }, status: 'reserved' }] }; +} +/** Only a completed, exact local accounting receipt can release unused reservation. */ +export function settleAction(state, id, actualCost) { + actualCost = snapshotRecord(actualCost); + validate(state); identifier(id); cost(actualCost); + const reservation = state.reservations.find(r => r.id === id); + if (!reservation || reservation.status !== 'reserved') refuse('unknown-reservation'); + const spent = { ...state.spent }; + for (const k of measures) { + if (!budgetSettlementAllowed(reservation.cost[k], reservation.cost[k], actualCost[k], true)) refuse('reservation-exceeded'); + spent[k] -= reservation.cost[k] - actualCost[k]; + } + return { ...structuredClone(state), spent, reservations: state.reservations.map(r => r.id === id + ? { ...r, cost: { ...actualCost }, status: 'settled' } : structuredClone(r)) }; +} + +/** + * Local effect admission. Charges are cumulative ceilings in one explicit epoch, + * not measurements of TLS, ICE/STUN, browser memory, VM work, or host overhead. + * Failed/unknown effects stay charged. No automatic refund or epoch rollover. + */ +export class ResourceAdmission { + #state; + #sequence = 0; + constructor({ clock = () => Math.floor(performance.now()), durationMs = 600000, + limit = { requests: 4096, transferBytes: 16 * 1024 * 1024, + storageBytes: 16 * 1024 * 1024, computeSteps: 1000000 }, maxActions = 16384 } = {}) { + natural(durationMs); natural(maxActions, 65536); + this.clock = clock; + this.maxActions = maxActions; + const startMs = clock(); natural(startMs); + natural(startMs + durationMs); + this.#state = createBudget({ epoch: `runtime-${++runtimeEpoch}`, startMs, endMs: startMs + durationMs, limit }); + } + get state() { return structuredClone(this.#state); } + /** Read-only admission evidence for a correlated still-pending effect. */ + reservationCurrent(id, epoch) { + const now = this.clock(); + return Number.isSafeInteger(now) && now >= this.#state.lastObservedMs + && now < this.#state.endMs && this.#state.epoch === epoch + && this.#state.reservations.some(r => r.id === id && r.status === 'reserved'); + } + reserve(kind, requested = {}) { + if (this.#sequence >= this.maxActions) refuse('action-capacity'); + const amount = { ...zeroCost(), ...requested }; + const id = `effect-${this.#sequence + 1}`; + const next = reserveAction(this.#state, { id, kind, cost: amount }, this.clock()); + this.#state = next; + this.#sequence++; + return id; + } + run(kind, requested, effect) { + this.reserve(kind, requested); + return effect(); + } +} + +/** Exact UTF-8 application payload length, excluding lower-layer overhead. */ +export const wireBytes = value => new TextEncoder().encode(typeof value === 'string' ? value : JSON.stringify(value)).length; +export function reserveNetwork(admission, kind, payload, destinations = 1) { + natural(destinations); + if (destinations) admission.reserve(kind, { requests: destinations, transferBytes: wireBytes(payload) * destinations }); +} diff --git a/src/layer3-storage/custody.js b/src/layer3-storage/custody.js new file mode 100644 index 0000000..6c04d95 --- /dev/null +++ b/src/layer3-storage/custody.js @@ -0,0 +1,357 @@ +/** + * Layer 3 reference object recovery and placement transitions. + * + * No transport is performed here. An acknowledgement is an assertion by the + * named holder with bytes checked locally, not an authenticated storage receipt. + * Distinct holder strings do not establish distinct machines/failure domains. + * Placement summaries are conditional on truthful, currently reachable holders. + * State arguments are trusted local observations produced by these transitions, + * not signed transferable evidence. Schema guards do not authenticate history. + */ +import { + CUSTODY_LIMITS, CustodyError, canonicalBytes, sha256Bytes, commitObject, + fragmentDigest, verifyManifest, verifyFragment, copyBytes, + snapshotRecord, exactKeys, deepFreeze, +} from '../layer1-uor/custody.js'; +import { custodyCommitAllowed, custodyRetireAllowed, custodyPairAllowed } from '../layer1-uor/generated-model.js'; + +const fail = (code, message) => { throw new CustodyError(code, message); }; + +function split(bytes) { + const length = Math.ceil(bytes.length / 2); + const a = new Uint8Array(length), b = new Uint8Array(length), parity = new Uint8Array(length); + a.set(bytes.subarray(0, length)); + b.set(bytes.subarray(length)); + for (let i = 0; i < length; i++) parity[i] = a[i] ^ b[i]; + return [a, b, parity]; +} + +/** Raw, self-contained encoding only. The caller's bytes are never retained. */ +export async function createObject(bytes) { + const snapshot = copyBytes(bytes); + const shards = split(snapshot); + const object = await commitObject(snapshot); + const encodingDigest = await sha256Bytes(snapshot, 'encoding'); + const digests = await Promise.all(shards.map((b, i) => fragmentDigest(encodingDigest, i, b))); + const body = { + version: 1, + object, + encoding: { format: 'raw', encodingDigest, byteLength: snapshot.length, dependencies: [] }, + fragments: { scheme: 'xor-2-of-3', threshold: 2, count: 3, byteLength: shards[0].length, digests }, + }; + const manifest = deepFreeze({ ...body, manifestDigest: await sha256Bytes(canonicalBytes(body), 'manifest') }); + return { manifest, fragments: shards.map((b, index) => ({ index, bytes: b })) }; +} + +/** + * Any two distinct valid fragments recover the object. Every supplied fragment, + * the exact padding, all three regenerated fragment commitments, raw encoding, + * object bytes and complete manifest commitment are checked, even with 3 inputs. + * Refuses malformed/duplicate fragments rather than silently choosing a subset. + */ +export async function recoverObject(manifest, fragments) { + if (!Array.isArray(fragments) || Object.getPrototypeOf(fragments) !== Array.prototype + || fragments.length < 2 || fragments.length > 3) fail('InsufficientFragments', 'Supply two or three fragments'); + // Snapshot every fragment synchronously before the first await. Never retain + // mutable network buffers across asynchronous digest checks. + const inputs = []; + for (let i = 0; i < fragments.length; i++) { + const d = Object.getOwnPropertyDescriptor(fragments, String(i)); + if (!d || !Object.hasOwn(d, 'value')) fail('InvalidSchema', 'Sparse/accessor fragment list'); + const f = d.value; + if (!f || typeof f !== 'object' || Array.isArray(f) + || ![Object.prototype, null].includes(Object.getPrototypeOf(f))) fail('InvalidSchema', 'Invalid fragment'); + const descriptors = Object.getOwnPropertyDescriptors(f); + if (Reflect.ownKeys(f).length !== 2 || !descriptors.index?.enumerable || !descriptors.bytes?.enumerable + || !Object.hasOwn(descriptors.index, 'value') || !Object.hasOwn(descriptors.bytes, 'value')) { + fail('InvalidSchema', 'Fragment requires only index and bytes'); + } + const index = descriptors.index.value; + if (!Number.isInteger(index) || index < 0 || index > 2) fail('InvalidSchema', 'Invalid fragment index'); + if (inputs.some(v => v.index === index)) fail('DuplicateFragment', 'Fragment indices must be distinct'); + inputs.push({ index, bytes: copyBytes(descriptors.bytes.value, Math.ceil(CUSTODY_LIMITS.maxObjectBytes / 2)) }); + } + if (Reflect.ownKeys(fragments).length !== fragments.length + 1) fail('InvalidSchema', 'Extended fragment list'); + const m = await verifyManifest(manifest); + const checked = await Promise.all(inputs.map(f => verifyFragment(m, f))); + if (!custodyPairAllowed(checked[0].index, checked[1].index, true, true, m.encoding.dependencies.length === 0)) { + fail('InvalidTransition', 'Generated model refused the recovery pair'); + } + const shards = [null, null, null]; + for (const f of checked) shards[f.index] = f.bytes; + const n = m.fragments.byteLength; + if (!shards[0] || !shards[1]) { + const absent = shards[0] ? 1 : 0; + shards[absent] = new Uint8Array(n); + for (let i = 0; i < n; i++) shards[absent][i] = shards[1 - absent][i] ^ shards[2][i]; + } + if (m.object.byteLength % 2 === 1 && shards[1][n - 1] !== 0) fail('InvalidPadding', 'Nonzero XOR padding'); + const bytes = new Uint8Array(m.object.byteLength); + bytes.set(shards[0]); + bytes.set(shards[1].subarray(0, bytes.length - n), n); + const object = await commitObject(bytes); + if (object.contentDigest !== m.object.contentDigest) fail('ObjectDigestMismatch', 'Recovered object commitment does not match'); + if (await sha256Bytes(bytes, 'encoding') !== m.encoding.encodingDigest) { + fail('EncodingDigestMismatch', 'Recovered encoding commitment does not match'); + } + const regenerated = split(bytes); + for (let i = 0; i < 3; i++) { + if (await fragmentDigest(m.encoding.encodingDigest, i, regenerated[i]) !== m.fragments.digests[i]) { + fail('InvalidParity', 'Complete fragment manifest is inconsistent with recovered bytes'); + } + } + return bytes; +} + +function id(value) { + if (typeof value !== 'string' || !/^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$/.test(value)) { + fail('InvalidSchema', 'Holder and request IDs must be bounded ASCII identifiers'); + } +} + +function index(value) { + if (!Number.isInteger(value) || value < 0 || value > 2) fail('InvalidSchema', 'Invalid fragment index'); +} + +function clock(value) { + if (!Number.isSafeInteger(value) || value < 0) fail('InvalidSchema', 'Expected an explicit nonnegative integer clock observation'); +} + +function observeClock(s, nowMs) { + if (nowMs < s.lastObservedMs) fail('ClockRegression', 'Placement clock observation regressed'); + s.lastObservedMs = nowMs; +} + +const liveCommitted = (s, nowMs) => s.copies.filter(c => c.status === 'committed' + && s.requests.find(r => r.requestId === c.requestId).leaseExpiresAt > nowMs); + +function stateSnapshot(state) { + const s = snapshotRecord(state); + exactKeys(s, ['version', 'manifest', 'revision', 'lastObservedMs', 'copies', 'requests'], 'placement'); + clock(s.lastObservedMs); + if (s.version !== 1 || !Number.isSafeInteger(s.revision) || s.revision < 0 || s.revision >= Number.MAX_SAFE_INTEGER) { + fail('InvalidPlacement', 'Invalid placement version or revision'); + } + if (!Array.isArray(s.requests) || s.requests.length > CUSTODY_LIMITS.maxRequests + || !Array.isArray(s.copies) || s.copies.length > CUSTODY_LIMITS.maxCopies) { + fail('CapacityLimit', 'Placement state exceeds its bounded capacity'); + } + const requests = new Map(); + for (const r of s.requests) { + exactKeys(r, ['requestId', 'index', 'holder', 'fromRequestId', 'status', 'leaseExpiresAt'], 'request'); + id(r.requestId); id(r.holder); index(r.index); + clock(r.leaseExpiresAt); + if (r.fromRequestId !== null) id(r.fromRequestId); + if (!['requested', 'acknowledged', 'committed', 'failed', 'uncertain'].includes(r.status) + || requests.has(r.requestId)) fail('InvalidPlacement', 'Invalid or duplicate request'); + requests.set(r.requestId, r); + } + for (const r of s.requests) { + if (r.fromRequestId !== null) { + const old = requests.get(r.fromRequestId); + if (!old || old.status !== 'committed' || old.index !== r.index || old.holder === r.holder) { + fail('InvalidPlacement', 'Invalid migration predecessor'); + } + } + } + const copyKeys = new Set(), activeIndices = new Set(), activeHolders = new Set(); + for (const c of s.copies) { + exactKeys(c, ['index', 'holder', 'requestId', 'status'], 'copy'); + id(c.holder); id(c.requestId); index(c.index); + const r = requests.get(c.requestId); + if (!r || r.index !== c.index || r.holder !== c.holder + || !['acknowledged', 'committed', 'superseded'].includes(c.status) + || (c.status === 'acknowledged' && r.status !== 'acknowledged') + || (c.status === 'committed' && r.status !== 'committed') + || (c.status === 'superseded' && !['committed', 'failed', 'uncertain'].includes(r.status))) { + fail('InvalidPlacement', 'Copy is inconsistent with request history'); + } + const key = `${c.holder}\0${c.index}`; + if (copyKeys.has(key)) fail('InvalidPlacement', 'Duplicate physical copy assertion'); + copyKeys.add(key); + if (c.status === 'committed') { + if (activeIndices.has(c.index) || activeHolders.has(c.holder)) fail('HolderConflict', 'Active fragments require distinct holders'); + activeIndices.add(c.index); activeHolders.add(c.holder); + } + } + for (const r of s.requests) { + if (r.status === 'acknowledged' && !s.copies.some(c => c.requestId === r.requestId && c.status === 'acknowledged')) { + fail('InvalidPlacement', 'Acknowledged request has no copy assertion'); + } + } + return s; +} + +async function checkedState(state) { + const s = stateSnapshot(state); + s.manifest = await verifyManifest(s.manifest); + return s; +} + +function finish(s) { + s.revision++; + // Enforce the same aggregate bound on outputs as on inputs. + return deepFreeze(stateSnapshot(s)); +} + +export async function createPlacement(manifest) { + return deepFreeze({ version: 1, manifest: await verifyManifest(manifest), revision: 0, lastObservedMs: 0, copies: [], requests: [] }); +} + +async function request(state, parameters, migration) { + const p = snapshotRecord(parameters); + exactKeys(p, ['requestId', 'index', 'holder', 'leaseExpiresAt'], 'placement request'); + id(p.requestId); id(p.holder); index(p.index); + clock(p.leaseExpiresAt); + const s = await checkedState(state); + if (s.requests.length >= CUSTODY_LIMITS.maxRequests) fail('CapacityLimit', 'Request history is full'); + if (s.requests.some(r => r.requestId === p.requestId)) fail('RequestConflict', 'Request IDs cannot be reused'); + if (s.requests.some(r => r.index === p.index && ['requested', 'acknowledged'].includes(r.status))) { + fail('RequestConflict', 'Fragment already has a pending request'); + } + const active = s.copies.filter(c => c.status === 'committed'); + const old = active.find(c => c.index === p.index); + if (migration ? !old : !!old) fail('InvalidTransition', migration ? 'Migration needs a committed source' : 'Fragment already committed; request a migration'); + if (active.some(c => c.holder === p.holder) + || s.copies.some(c => c.index === p.index && c.holder === p.holder && c.status !== 'superseded')) { + fail('HolderConflict', 'Target already holds an active fragment or this copy'); + } + s.requests.push({ ...p, fromRequestId: old?.requestId ?? null, status: 'requested' }); + return finish(s); +} + +export const requestPlacement = (state, parameters) => request(state, parameters, false); +export const requestMigration = (state, parameters) => request(state, parameters, true); + +/** + * Receipt = {requestId,index,holder,manifestDigest,fragmentDigest,leaseExpiresAt,bytes}. + * Host must separately authenticate peers if that is part of its policy. Bytes + * here prove only that this caller supplied a valid fragment, not remote storage. + */ +export async function acknowledgePlacement(state, receipt, nowMs) { + clock(nowMs); + if (!receipt || typeof receipt !== 'object' || Array.isArray(receipt) + || ![Object.prototype, null].includes(Object.getPrototypeOf(receipt))) fail('InvalidSchema', 'Invalid acknowledgement'); + const d = Object.getOwnPropertyDescriptors(receipt); + const keys = ['requestId', 'index', 'holder', 'manifestDigest', 'fragmentDigest', 'leaseExpiresAt', 'bytes']; + if (Reflect.ownKeys(receipt).length !== keys.length || keys.some(k => !d[k]?.enumerable || !Object.hasOwn(d[k], 'value'))) { + fail('InvalidSchema', 'Acknowledgement has missing or unknown fields'); + } + const p = snapshotRecord(Object.fromEntries(keys.filter(k => k !== 'bytes').map(k => [k, d[k].value]))); + const bytes = copyBytes(d.bytes.value, Math.ceil(CUSTODY_LIMITS.maxObjectBytes / 2)); + const s = await checkedState(state); + observeClock(s, nowMs); + const r = s.requests.find(r => r.requestId === p.requestId); + if (!r || r.status !== 'requested') fail('InvalidTransition', 'Only a requested transfer can be acknowledged'); + if (r.leaseExpiresAt <= nowMs) fail('InvalidTransition', 'Acknowledgement lease has expired'); + if (p.index !== r.index || p.holder !== r.holder || p.manifestDigest !== s.manifest.manifestDigest + || p.fragmentDigest !== s.manifest.fragments.digests[r.index] || p.leaseExpiresAt !== r.leaseExpiresAt) { + fail('ReceiptMismatch', 'Acknowledgement is not bound to this request'); + } + await verifyFragment(s.manifest, { index: p.index, bytes }); + // A fresh checked receipt for the same physical holder/index renews that + // assertion, not an additional copy. Until this check the old assertion stays. + s.copies = s.copies.filter(c => !(c.index === r.index && c.holder === r.holder && c.status === 'superseded')); + if (s.copies.length >= CUSTODY_LIMITS.maxCopies) fail('CapacityLimit', 'Too many retained copies'); + r.status = 'acknowledged'; + s.copies.push({ index: r.index, holder: r.holder, requestId: r.requestId, status: 'acknowledged' }); + return finish(s); +} + +/** Commit only a checked acknowledgement; retain the source until this point. */ +export async function commitPlacement(state, requestId, nowMs) { + id(requestId); + clock(nowMs); + const s = await checkedState(state); + observeClock(s, nowMs); + const r = s.requests.find(r => r.requestId === requestId); + if (!r || r.status !== 'acknowledged') fail('InvalidTransition', 'Commit requires an acknowledged transfer'); + const active = s.copies.filter(c => c.status === 'committed'); + const old = active.find(c => c.index === r.index); + if ((old?.requestId ?? null) !== r.fromRequestId) fail('StaleRequest', 'Migration source changed or was lost'); + if (active.some(c => c.holder === r.holder && c.index !== r.index)) fail('HolderConflict', 'Target holder is already committed to another fragment'); + const target = s.copies.find(c => c.requestId === r.requestId && c.status === 'acknowledged'); + if (!target) fail('InvalidTransition', 'Acknowledged target missing'); + if (!custodyCommitAllowed(true, r.status === 'acknowledged', true, true, + target.holder === r.holder, r.leaseExpiresAt > nowMs, + (old?.requestId ?? null) === r.fromRequestId + && (!old || s.requests.find(v => v.requestId === old.requestId).leaseExpiresAt > nowMs), + !active.some(c => c.holder === r.holder && c.index !== r.index))) { + fail('InvalidTransition', 'Generated model refused an expired or unsafe commitment'); + } + if (old) old.status = 'superseded'; + target.status = 'committed'; + r.status = 'committed'; + return finish(s); +} + +/** A failed/uncertain action never removes the old committed source. */ +export async function failPlacement(state, requestId, outcome = 'failed') { + id(requestId); + if (!['failed', 'uncertain'].includes(outcome)) fail('InvalidSchema', 'Outcome must be failed or uncertain'); + const s = await checkedState(state); + const r = s.requests.find(r => r.requestId === requestId); + if (!r || !['requested', 'acknowledged'].includes(r.status)) fail('InvalidTransition', 'Transfer is not pending'); + r.status = outcome; + const copy = s.copies.find(c => c.requestId === requestId); + if (copy) copy.status = 'superseded'; // may still occupy storage; do not hide it + return finish(s); +} + +/** + * Record local observation of holder loss. It is not proof of global death or + * deletion. Supersedes reachable assertions while retaining possible physical + * copies for accounting. Expired leases use this same conservative transition. + */ +export async function observeHolderLoss(state, holder) { + id(holder); + const s = await checkedState(state); + for (const c of s.copies) if (c.holder === holder) c.status = 'superseded'; + for (const r of s.requests) { + if (r.holder === holder && ['requested', 'acknowledged'].includes(r.status)) r.status = 'uncertain'; + } + return finish(s); +} + +/** + * Host-observed release of a superseded copy, only after at least two active + * distinct-holder fragments remain. Does not issue or prove remote deletion. + */ +export async function retirePlacement(state, parameters, nowMs) { + clock(nowMs); + const p = snapshotRecord(parameters); + exactKeys(p, ['index', 'holder'], 'retirement'); + index(p.index); id(p.holder); + const s = await checkedState(state); + observeClock(s, nowMs); + const target = s.copies.find(c => c.index === p.index && c.holder === p.holder); + if (!target || target.status !== 'superseded') fail('InvalidTransition', 'Only superseded copies may be retired'); + const active = liveCommitted(s, nowMs); + const remaining = new Set(active.map(c => c.index)).size; + if (!custodyRetireAllowed(active.some(c => c.index === target.index), remaining, 2)) { + fail('UnsafeMigration', 'Retirement requires two live active fragments on distinct holders'); + } + s.copies = s.copies.filter(c => c !== target); + return finish(s); +} + +/** Summary of local assertions, not a network availability or durability proof. */ +export function placementStatus(state, nowMs) { + clock(nowMs); + const s = stateSnapshot(state); + if (nowMs < s.lastObservedMs) fail('ClockRegression', 'Placement clock observation regressed'); + const active = liveCommitted(s, nowMs); + return Object.freeze({ + committedFragments: active.length, + distinctHolders: new Set(active.map(c => c.holder)).size, + canRecoverFromCommitted: active.length >= 2, + toleratesOneHolderLoss: active.length === 3, + acknowledgedTransfers: s.requests.filter(r => r.status === 'acknowledged').length, + requestedTransfers: s.requests.filter(r => r.status === 'requested').length, + uncertainTransfers: s.requests.filter(r => r.status === 'uncertain').length, + assertedCopies: s.copies.length, + assertedStoredBytes: s.copies.length * s.manifest.fragments.byteLength, + evidence: 'digest-checked-peer-assertions', + conditions: 'exact-encoding-and-truthful-reachable-holders', + }); +} diff --git a/src/layer3-storage/index.js b/src/layer3-storage/index.js index 33131e6..a0edca8 100644 --- a/src/layer3-storage/index.js +++ b/src/layer3-storage/index.js @@ -10,6 +10,10 @@ import { mintContentAddress, Fnv1aHasher16 } from '../layer1-uor/index.js'; import { computeSurvivalProbability } from '../layer2-schedulers/index.js'; +import { ResourceAdmission, reserveNetwork, wireBytes } from '../layer2-schedulers/policy.js'; +import { CustodyError, verifyManifest, verifyFragment, copyBytes, snapshotRecord, exactKeys } from '../layer1-uor/custody.js'; +import { model } from '../layer1-uor/generated-model.js'; +import { createObject, recoverObject, createPlacement, requestPlacement, requestMigration, acknowledgePlacement, commitPlacement, failPlacement, observeHolderLoss, retirePlacement, placementStatus } from './custody.js'; /** * Split a Uint8Array payload into k = 2 even-length data shards + 1 XOR parity shard (n = 3). @@ -415,218 +419,579 @@ export function benchmarkStorageStrategies({ } /** - * Live Network-Backed UOR Content-Addressed Database (`LiveUorMeshDatabase`). - * Wires Layer 1 (UOR addressing) + Layer 2 (refresh scheduler) + Layer 3 (2-of-3 XOR parity) - * directly over Layer 5 (`WebRtcTransportNode` + warm relay ring-buffer) and syncs recovered - * objects into the in-browser v86 Linux VM `/mnt` 9p filesystem. + * Live SHA-256-bound object adapter. Distinct fragment placement is explicit; + * retrieval is separate and only returns fragments actually assigned here. + * Receipts are peer assertions, not authenticated retention guarantees. Local + * writer/recovery caches and an opted-in public relay are additional copies. */ export class LiveUorMeshDatabase { - /** - * @param {object} params - * @param {import('../layer5-transport/index.js').WebRtcTransportNode} params.transport - * @param {object} [params.scheduler] - Layer-2 scheduler instance - * @param {(ev: object) => void} [params.onUpdate] - * @param {object} [params.vmBridge] - Optional LinuxVmNode to mirror UOR blocks into `/mnt/` - */ - constructor({ transport, scheduler = null, onUpdate = () => {}, vmBridge = null }) { + constructor({ transport, scheduler = null, onUpdate = () => {}, vmBridge = null, admission = transport?.admission ?? new ResourceAdmission() }) { this.transport = transport; this.scheduler = scheduler; + this.admission = admission; this.onUpdate = onUpdate; this.vmBridge = vmBridge; - - /** - * addressHex -> { - * addressHex: string, - * fingerprintHex: string, - * originalLength: number, - * label: string, - * createdAtSec: number, - * shards: [Uint8Array | null, Uint8Array | null, Uint8Array | null], - * bytes: Uint8Array | null, - * verified: boolean, - * source: string - * } - */ this.objects = new Map(); + this.placements = new Map(); + this.pendingTransfers = new Map(); + this.pendingReleases = new Map(); + this.committedRoutes = new Map(); this.replicationsSent = 0; this.replicationsReceived = 0; this.warmRecoveries = 0; + this._sequence = 0; + this._mailbox = Promise.resolve(); + this._pendingWork = 0; + this.maxPendingWork = 256; + this.maxWireObjectBytes = 128 * 1024; + this.maxCachedBytes = 16 * 1024 * 1024; + this.maxObjects = 128; + this.releaseAckTimeoutMs = 15000; // local observation bound, never proof of remote deletion + this.demoPlacementLeaseMs = 60000; // declared host policy, not a retention guarantee + this.maxAcceptedLeaseMs = 120000; // bounded host policy for incoming assertions } - /** - * Handle incoming mesh messages from `WebRtcTransportNode`. - */ - async handleMeshMessage(fromPeerId, msg) { - if (!msg) return; - - if (msg.type === 'uor_shard') { - await this.ingestShardEnvelope(msg, `webrtc:${fromPeerId}`); - } else if (msg.type === 'uor_sync_req') { - // Newly joined peer requested all current UOR objects - for (const entry of this.objects.values()) { - if (!entry.bytes) continue; - const { shards } = encodeXorShards2of3(entry.bytes); - for (let sIdx = 0; sIdx < 3; sIdx++) { - this.transport.sendToPeer(fromPeerId, { - type: 'uor_shard', - addressHex: entry.addressHex, - fingerprintHex: entry.fingerprintHex, - originalLength: entry.originalLength, - label: entry.label, - shardIndex: sIdx, - shardBytes: Array.from(shards[sIdx]) - }); - this.replicationsSent++; - } - } + _enqueue(work) { + if (this._pendingWork >= this.maxPendingWork) return Promise.reject(new CustodyError('CapacityLimit', 'Ingress mailbox is full')); + this._pendingWork++; + const result = this._mailbox.then(work).finally(() => { this._pendingWork--; }); + this._mailbox = result.catch(() => {}); + return result; + } + + /** Useful to await all messages accepted by a fake transport in tests. */ + async flush() { await this._mailbox; } + + _reject(reason) { + this.onUpdate({ type: 'custody_rejected', reason: reason?.code || String(reason) }); + return false; + } + + _checkCapacity(key, addedBytes) { + if (!this.objects.has(key) && this.objects.size >= this.maxObjects) throw new CustodyError('CapacityLimit', 'Object cache is full'); + let stored = 0; + for (const pending of this.pendingTransfers.values()) stored += pending.bytes.length; + for (const e of this.objects.values()) { + stored += e.bytes?.length || 0; + for (const shard of e.shards) stored += shard?.length || 0; } + if (stored + addedBytes > this.maxCachedBytes) throw new CustodyError('CapacityLimit', 'Object byte cache is full'); } - async ingestShardEnvelope(env, sourceTag = 'remote') { - const { - addressHex, - fingerprintHex, - originalLength, - label = '', - shardIndex, - shardBytes - } = env; + _send(holder, packet) { + if (this.transport.admission !== this.admission) reserveNetwork(this.admission, 'place', packet); + return this.transport.sendToPeer(holder, packet); + } - if (!addressHex || typeof shardIndex !== 'number' || !Array.isArray(shardBytes)) { - return false; + _broadcast(packet) { + if (this.transport.admission !== this.admission) reserveNetwork(this.admission, 'retrieve', packet, (this.transport.openPeers?.() || []).length); + return this.transport.broadcast(packet); + } + + _publish(packet) { + if (this.transport.admission !== this.admission) reserveNetwork(this.admission, 'place', { ...packet, from: (this.transport.routingPeerId ?? this.transport.peerId), tsMs: Date.now() }); + return this.transport.publishWarmEnvelope(packet, { publicData: true }); + } + + _fetch(sinceWindow) { + if (this.transport.admission !== this.admission) this.admission.reserve('retrieve', { requests: 1, transferBytes: 2 * 1024 * 1024 }); + return this.transport.fetchWarmEnvelopes(sinceWindow, { publicData: true }); + } + + clearLocal() { + return this._enqueue(() => { + this.objects.clear(); this.placements.clear(); this.pendingTransfers.clear(); this.pendingReleases.clear(); this.committedRoutes.clear(); + // A wipe does not refund unknown remote effects or reset policy. + }); + } + + _label(label) { + if (typeof label !== 'string' || label.length > 256 || /[\u0000-\u001f\u007f/\\]/.test(label)) { + throw new CustodyError('InvalidSchema', 'Label must be bounded plain text without path separators'); } + return label; + } - let entry = this.objects.get(addressHex); + _packet(entry, index, bytes, { purpose = 'recovery', requestId = null, holder = null, leaseExpiresAt = 0 } = {}) { + return { + type: 'uor_shard', version: 1, manifest: entry.manifest, label: entry.label, + shardIndex: index, shardBytes: Array.from(bytes), purpose, requestId, holder, leaseExpiresAt, + }; + } + + _readPacket(env) { + if (!env || typeof env !== 'object' || Array.isArray(env) + || ![Object.prototype, null].includes(Object.getPrototypeOf(env))) throw new CustodyError('InvalidSchema'); + const d = Object.getOwnPropertyDescriptors(env); + const keys = ['type', 'version', 'manifest', 'label', 'shardIndex', 'shardBytes', 'purpose', 'requestId', 'holder', 'leaseExpiresAt']; + if (Reflect.ownKeys(env).length !== keys.length || keys.some(k => !d[k]?.enumerable || !Object.hasOwn(d[k], 'value'))) { + throw new CustodyError('InvalidSchema', 'Legacy or malformed fragment envelope'); + } + const p = snapshotRecord(Object.fromEntries(keys.filter(k => k !== 'shardBytes').map(k => [k, d[k].value]))); + if (p.type !== 'uor_shard' || p.version !== 1 || !['placement', 'recovery', 'public-relay'].includes(p.purpose) + || !Number.isInteger(p.shardIndex) || p.shardIndex < 0 || p.shardIndex > 2 + || !Number.isSafeInteger(p.leaseExpiresAt) || p.leaseExpiresAt < 0) throw new CustodyError('InvalidSchema'); + this._label(p.label); + const a = d.shardBytes.value; + if (!Array.isArray(a) || Object.getPrototypeOf(a) !== Array.prototype || a.length > this.maxWireObjectBytes / 2 + || Reflect.ownKeys(a).length !== a.length + 1) throw new CustodyError('SizeLimit', 'Invalid or oversized fragment bytes'); + const bytes = new Uint8Array(a.length); + for (let i = 0; i < a.length; i++) { + const byte = Object.getOwnPropertyDescriptor(a, String(i)); + if (!byte || !Object.hasOwn(byte, 'value') || !Number.isInteger(byte.value) || byte.value < 0 || byte.value > 255) { + throw new CustodyError('InvalidBytes', 'Wire bytes must be integers from zero through 255'); + } + bytes[i] = byte.value; + } + if (p.purpose === 'placement') { + if (typeof p.requestId !== 'string' || !/^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$/.test(p.requestId) + || p.holder !== (this.transport.routingPeerId ?? this.transport.peerId) || p.leaseExpiresAt <= Date.now() + || p.leaseExpiresAt > Date.now() + this.maxAcceptedLeaseMs) throw new CustodyError('InvalidSchema', 'Wrong holder or invalid lease claim'); + } else if (p.requestId !== null || p.leaseExpiresAt !== 0 + || (p.purpose === 'public-relay' ? p.holder !== 'public-relay' : p.holder !== null)) { + throw new CustodyError('InvalidSchema', 'Invalid retrieval metadata'); + } + return { ...p, bytes }; + } + + _snapshotEnvelope(env, publicData = false) { + // ntfy transport appends these two unauthenticated delivery metadata fields. + // They are never part of an object's commitment or used as peer authority. + if (publicData && env && (Object.hasOwn(env, 'from') || Object.hasOwn(env, 'tsMs'))) { + const d = Object.getOwnPropertyDescriptors(env); + if (!d.from?.enumerable || !d.tsMs?.enumerable || !Object.hasOwn(d.from, 'value') || !Object.hasOwn(d.tsMs, 'value') + || typeof d.from.value !== 'string' || d.from.value.length > 128 + || !Number.isSafeInteger(d.tsMs.value) || d.tsMs.value < 0) throw new CustodyError('InvalidSchema', 'Invalid relay metadata'); + const keys = Reflect.ownKeys(env).filter(k => k !== 'from' && k !== 'tsMs'); + if (keys.some(k => typeof k !== 'string' || !d[k].enumerable || !Object.hasOwn(d[k], 'value'))) throw new CustodyError('InvalidSchema'); + env = Object.fromEntries(keys.map(k => [k, d[k].value])); + } + const p = this._readPacket(env); + return this._packet(p, p.shardIndex, p.bytes, p); + } + + async _ingest(env, sourceTag, fromPeerId = null, publicData = false) { + const p = this._readPacket(env); + if (p.purpose === 'public-relay' && !publicData) throw new CustodyError('PublicDataRequired', 'Public relay access requires opt-in'); + if (p.purpose === 'placement' && !fromPeerId) throw new CustodyError('InvalidSchema', 'Placement must arrive through a peer channel'); + const manifest = await verifyManifest(p.manifest); + if (manifest.object.byteLength > this.maxWireObjectBytes) throw new CustodyError('SizeLimit', 'Object exceeds live wire limit'); + const f = await verifyFragment(manifest, { index: p.shardIndex, bytes: p.bytes }); + const key = manifest.object.contentDigest; + let entry = this.objects.get(key); + if (entry && entry.manifest.manifestDigest !== manifest.manifestDigest) throw new CustodyError('ManifestDigestMismatch', 'Conflicting manifest for object'); + const added = entry?.shards[f.index] ? 0 : f.bytes.length; + this._checkCapacity(key, added); if (!entry) { entry = { - addressHex, - fingerprintHex, - originalLength, - label, - createdAtSec: Math.floor(Date.now() / 1000), - shards: [null, null, null], - bytes: null, - verified: false, - source: sourceTag + addressHex: key, fingerprintHex: key, manifest, originalLength: manifest.object.byteLength, + label: p.label, createdAtSec: Math.floor(Date.now() / 1000), shards: [null, null, null], + heldIndices: new Set(), bytes: null, verified: false, source: sourceTag, }; - this.objects.set(addressHex, entry); - } - - entry.shards[shardIndex] = new Uint8Array(shardBytes); - this.replicationsReceived++; - - if (!entry.verified) { - const candidateBytes = decodeXorShards2of3(entry.originalLength, entry.shards); - if (candidateBytes) { - const { address, fingerprint } = mintContentAddress(candidateBytes, Fnv1aHasher16); - if (address.toHex() === addressHex && fingerprint.toHex() === fingerprintHex) { - entry.bytes = candidateBytes; - entry.verified = true; - entry.source = sourceTag; - // Regenerate all 3 parity shards now that object is verified - entry.shards = encodeXorShards2of3(candidateBytes).shards; - if (this.vmBridge) { - await this.vmBridge.mountUorObject(addressHex, candidateBytes, label); + } + if (!entry.shards[f.index]) { + this.admission.reserve('place', { storageBytes: f.bytes.length }); + this.objects.set(key, entry); + entry.shards[f.index] = f.bytes; + this.replicationsReceived++; + } + if (p.purpose === 'placement') { + entry.heldPlacements ??= new Map(); + const claimKey = `${fromPeerId}\0${f.index}`; + if (!entry.heldPlacements.has(claimKey) && entry.heldPlacements.size >= 256) throw new CustodyError('CapacityLimit', 'Holder claim history is full'); + entry.heldPlacements.set(claimKey, { requestId: p.requestId, index: f.index, status: 'held' }); + entry.heldIndices.add(f.index); + // The return channel associates the assertion with this connected peer; + // no application-authority or persistent-storage authentication is claimed. + this._send(fromPeerId, { + type: 'uor_shard_ack', version: 1, requestId: p.requestId, index: f.index, + holder: (this.transport.routingPeerId ?? this.transport.peerId), manifestDigest: manifest.manifestDigest, + fragmentDigest: manifest.fragments.digests[f.index], leaseExpiresAt: p.leaseExpiresAt, + }); + } + let newlyVerified = false; + if (!entry.verified && entry.shards.filter(Boolean).length >= 2) { + const available = entry.shards.flatMap((bytes, index) => bytes ? [{ index, bytes }] : []); + this.admission.reserve('retrieve', { storageBytes: manifest.object.byteLength }); + const recovered = await recoverObject(manifest, available); + this._checkCapacity(key, recovered.length); + entry.bytes = recovered; + entry.verified = true; + entry.source = sourceTag; + newlyVerified = true; + if (this.vmBridge) await this.vmBridge.mountUorObject(key, new Uint8Array(recovered), entry.label); + this.onUpdate({ type: 'object_verified', entry }); + } + this.onUpdate({ type: 'shard_ingested', addressHex: key, shardIndex: f.index, sourceTag }); + return newlyVerified; + } + + ingestShardEnvelope(env, sourceTag = 'remote', { publicData = false } = {}) { + try { env = this._snapshotEnvelope(env, publicData); } + catch (error) { return Promise.resolve(this._reject(error)); } + return this._enqueue(async () => { + try { return await this._ingest(env, sourceTag, null, publicData); } + catch (error) { return this._reject(error); } + }); + } + + handleMeshMessage(fromPeerId, msg) { + try { + const type = Object.getOwnPropertyDescriptor(msg ?? {}, 'type')?.value; + msg = type === 'uor_shard' ? this._snapshotEnvelope(msg) : snapshotRecord(msg); + } catch (error) { return Promise.resolve(this._reject(error)); } + return this._enqueue(async () => { + try { + if (!msg || typeof msg !== 'object') return false; + if (msg.type === 'uor_shard') return await this._ingest(msg, `webrtc:${fromPeerId}`, fromPeerId); + if (msg.type === 'uor_shard_ack') return await this._acknowledge(fromPeerId, msg); + if (msg.type === 'uor_shard_release') return await this._releaseHeld(fromPeerId, msg); + if (msg.type === 'uor_shard_release_ack') return await this._acknowledgeRelease(fromPeerId, msg); + if (msg.type === 'uor_sync_req') { + const p = snapshotRecord(msg); + exactKeys(p, ['type', 'version']); + if (p.version !== 1) throw new CustodyError('InvalidSchema'); + for (const entry of this.objects.values()) { + // Retrieval returns assigned fragments only, never regenerates and + // broadcasts all 3 fragments from a writer's full-object cache. + for (const index of entry.heldIndices) { + if (entry.shards[index] && this._send(fromPeerId, this._packet(entry, index, entry.shards[index]))) this.replicationsSent++; + } } - this.onUpdate({ type: 'object_verified', entry }); return true; } - } + return false; + } catch (error) { return this._reject(error); } + }); + } + + _openRoutes() { + const local = this.transport.routingPeerId ?? this.transport.peerId; + return new Map((this.transport.openPeers?.() || []).filter(p => typeof p.remoteId === 'string' + && /^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$/.test(p.remoteId) && p.remoteId !== local) + .sort((a, b) => a.remoteId.localeCompare(b.remoteId)).slice(0, 64) + .map(p => [p.remoteId, p.dc ?? p.pc ?? p.remoteId])); + } + + _reservationCurrent(pending) { + return Boolean(this.admission.reservationCurrent?.(pending.reservationId, pending.epoch)) + && (pending.networkReservationIds ?? []).every(id => this.admission.reservationCurrent(id, pending.epoch)); + } + + _sendReserved(holder, packet, pending) { + const before = this.admission.state; + const sent = this._send(holder, packet); + if (!sent) return false; + const after = this.admission.state; + // The synchronous transport admission belongs to this exact dispatch. Bind + // its real frame/envelope reservation, not merely an unrelated spare budget. + const reservations = after.reservations.slice(before.reservations.length); + if (after.epoch !== pending.epoch || !reservations.some(r => r.status === 'reserved' + && r.cost.requests >= 1 && r.cost.transferBytes >= wireBytes(packet))) { + throw new CustodyError('StaleRequest', 'Transport did not retain this dispatch reservation'); } - this.onUpdate({ type: 'shard_ingested', addressHex, shardIndex, sourceTag }); - return false; + pending.networkReservationIds = reservations.map(r => r.id); + return true; } - /** - * Store a byte payload or UTF-8 string into the live distributed UOR mesh database, - * split into 2-of-3 XOR parity shards, replicate over WebRTC, and publish to warm relay buffer. - */ - async put(payload, { label = 'data', persistWarm = true } = {}) { - const bytes = payload instanceof Uint8Array - ? payload - : new TextEncoder().encode(String(payload)); - - const { address, fingerprint } = mintContentAddress(bytes, Fnv1aHasher16); - const addressHex = address.toHex(); - const fingerprintHex = fingerprint.toHex(); - const { originalLength, shards } = encodeXorShards2of3(bytes); - - const entry = { - addressHex, - fingerprintHex, - originalLength, - label, - createdAtSec: Math.floor(Date.now() / 1000), - shards, - bytes: new Uint8Array(bytes), - verified: true, - source: `local:${this.transport.peerId}` - }; - this.objects.set(addressHex, entry); + _activationCurrent(pending, state, nowMs) { + const request = state.requests.find(r => r.requestId === pending.requestId); + const routes = this._openRoutes(); + const source = request?.fromRequestId == null ? null : state.copies.find(c => c.requestId === request.fromRequestId && c.status === 'committed'); + const sourceCurrent = request?.fromRequestId == null || Boolean(source + && state.requests.find(r => r.requestId === source.requestId).leaseExpiresAt > nowMs + && routes.has(source.holder) && routes.get(source.holder) === this.committedRoutes.get(source.requestId)); + return model['Stitch.Custody.activationAllowed']( + sourceCurrent && state.manifest.manifestDigest === pending.manifestDigest && request?.holder === pending.holder + && request?.index === pending.index && request?.leaseExpiresAt === pending.leaseExpiresAt, + this._reservationCurrent(pending), pending.leaseExpiresAt > nowMs, + routes.has(pending.holder) && routes.get(pending.holder) === pending.route); + } + + /** Current local route/lease observations, never a durability guarantee. */ + placementSummary(addressHex, nowMs = Date.now()) { + const state = this.placements.get(addressHex); + if (!state) return null; + const status = placementStatus(state, nowMs), routes = this._openRoutes(); + const active = state.copies.filter(c => c.status === 'committed' + && state.requests.find(r => r.requestId === c.requestId).leaseExpiresAt > nowMs + && routes.get(c.holder) === this.committedRoutes.get(c.requestId) && routes.has(c.holder)); + return { ...status, leaseQualifiedFragments: status.committedFragments, + committedFragments: active.length, distinctHolders: new Set(active.map(c => c.holder)).size, + canRecoverFromCommitted: active.length >= 2, toleratesOneHolderLoss: active.length === 3, + pendingReleases: [...this.pendingReleases.values()].filter(p => p.addressHex === addressHex).length }; + } - if (this.vmBridge) { - await this.vmBridge.mountUorObject(addressHex, bytes, label); + async _abandonTransfer(pending) { + const state = this.placements.get(pending.addressHex); + const request = state?.requests.find(r => r.requestId === pending.requestId); + if (request && ['requested', 'acknowledged'].includes(request.status)) { + this.placements.set(pending.addressHex, await failPlacement(state, pending.requestId, 'uncertain')); } + this.pendingTransfers.delete(pending.requestId); + // Neither an absent ACK nor expiry establishes remote deletion or a refund. + } - // Replicate all 3 XOR parity shards across connected WebRTC peers - for (let sIdx = 0; sIdx < 3; sIdx++) { - const shardPacket = { - type: 'uor_shard', - addressHex, - fingerprintHex, - originalLength, - label, - shardIndex: sIdx, - shardBytes: Array.from(shards[sIdx]) - }; - const sent = this.transport.broadcast(shardPacket); - this.replicationsSent += sent; + async _acknowledge(fromPeerId, message) { + const ack = snapshotRecord(message); + exactKeys(ack, ['type', 'version', 'requestId', 'index', 'holder', 'manifestDigest', 'fragmentDigest', 'leaseExpiresAt']); + if (ack.version !== 1 || ack.holder !== fromPeerId) throw new CustodyError('ReceiptMismatch'); + const pending = this.pendingTransfers.get(ack.requestId); + if (!pending || pending.holder !== fromPeerId) throw new CustodyError('ReceiptMismatch', 'Unknown or replayed acknowledgement'); + let state = this.placements.get(pending.addressHex); + if (!this._activationCurrent(pending, state, Date.now())) { + await this._abandonTransfer(pending); + throw new CustodyError('StaleRequest', 'Placement route, lease or reservation is no longer current'); + } + const { type, version, ...receipt } = ack; + state = await acknowledgePlacement(state, { ...receipt, bytes: pending.bytes }, Date.now()); + this.placements.set(pending.addressHex, state); + // Crypto checks can yield past an epoch, route replacement or lease boundary. + if (!this._activationCurrent(pending, state, Date.now())) { + await this._abandonTransfer(pending); + throw new CustodyError('StaleRequest', 'Placement changed during receipt verification'); + } + const acknowledgedState = state; + try { state = await commitPlacement(state, ack.requestId, Date.now()); } + catch (error) { await this._abandonTransfer(pending); throw error; } + if (!this._activationCurrent(pending, acknowledgedState, Date.now())) { + // Do not publish a tentative state after an asynchronous boundary. + await this._abandonTransfer(pending); + throw new CustodyError('StaleRequest'); + } + this.placements.set(pending.addressHex, state); + this.committedRoutes.set(ack.requestId, pending.route); + this.pendingTransfers.delete(ack.requestId); + const entry = this.objects.get(pending.addressHex); + entry.placementStatus = this.placementSummary(pending.addressHex); + this.onUpdate({ type: 'placement_committed', entry, holder: fromPeerId, shardIndex: ack.index }); + await this._releaseSuperseded(entry); + return true; + } - // Also push shards 0 and 1 (sufficient for 2-of-3 reconstruction) to warm relay cache - // so state survives even if all browser tabs close simultaneously (0 live peers) - if (persistWarm && sIdx < 2 && bytes.length <= 2048) { - await this.transport.publishWarmEnvelope(shardPacket); - } + /** Release only the exact sender's retained assignment, never a newer claim. */ + async _releaseHeld(fromPeerId, message) { + exactKeys(message, ['type', 'version', 'releaseId', 'requestId', 'index', 'holder', 'manifestDigest']); + const { releaseId, requestId, index, holder, manifestDigest } = message; + if (message.version !== 1 || holder !== (this.transport.routingPeerId ?? this.transport.peerId) + || !Number.isInteger(index) || index < 0 || index > 2 + || ![releaseId, requestId].every(id => typeof id === 'string' && /^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$/.test(id))) throw new CustodyError('InvalidSchema'); + const entry = [...this.objects.values()].find(e => e.manifest.manifestDigest === manifestDigest); + const claim = entry?.heldPlacements?.get(`${fromPeerId}\0${index}`); + if (!claim || claim.requestId !== requestId) throw new CustodyError('ReceiptMismatch', 'Release does not match the current assignment'); + claim.status = 'released'; // retained tombstone makes exact retries idempotent + if (![...entry.heldPlacements.values()].some(c => c.index === index && c.status === 'held')) { + entry.heldIndices.delete(index); + entry.shards[index] = null; } + this._send(fromPeerId, { ...message, type: 'uor_shard_release_ack' }); + this.onUpdate({ type: 'placement_released', entry, shardIndex: index }); + return true; + } - if (this.scheduler) { - this.scheduler.markRefreshed(Date.now() / 1000); + async _acknowledgeRelease(fromPeerId, message) { + exactKeys(message, ['type', 'version', 'releaseId', 'requestId', 'index', 'holder', 'manifestDigest']); + const pending = this.pendingReleases.get(message.releaseId); + if (!pending || message.version !== 1 || message.holder !== fromPeerId + || pending.holder !== fromPeerId || pending.requestId !== message.requestId || pending.index !== message.index + || pending.manifestDigest !== message.manifestDigest) throw new CustodyError('ReceiptMismatch'); + if (!this._reservationCurrent(pending) || pending.expiresAt <= Date.now() || this._openRoutes().get(fromPeerId) !== pending.route) throw new CustodyError('StaleRequest'); + if (!this.placements.get(pending.addressHex).copies.some(c => c.status === 'superseded' && c.requestId === pending.requestId + && c.holder === pending.holder && c.index === pending.index)) throw new CustodyError('StaleRequest'); + if (!this.placementSummary(pending.addressHex).canRecoverFromCommitted) throw new CustodyError('UnsafeMigration'); + const state = await retirePlacement(this.placements.get(pending.addressHex), { index: pending.index, holder: fromPeerId }, Date.now()); + if (!this._reservationCurrent(pending) || pending.expiresAt <= Date.now() || this._openRoutes().get(fromPeerId) !== pending.route + || !this.placementSummary(pending.addressHex).canRecoverFromCommitted) throw new CustodyError('StaleRequest'); + this.placements.set(pending.addressHex, state); + this.pendingReleases.delete(message.releaseId); + this.committedRoutes.delete(message.requestId); + const entry = this.objects.get(pending.addressHex); + entry.placementStatus = this.placementSummary(pending.addressHex); + this.onUpdate({ type: 'placement_retired', entry, holder: fromPeerId, shardIndex: pending.index }); + return true; + } + + async _releaseSuperseded(entry) { + if (!this.placementSummary(entry.addressHex)?.canRecoverFromCommitted) return; + const routes = this._openRoutes(), state = this.placements.get(entry.addressHex); + for (const [id, pending] of this.pendingReleases) { + if (!this._reservationCurrent(pending) || pending.expiresAt <= Date.now() || routes.get(pending.holder) !== pending.route) this.pendingReleases.delete(id); + } + for (const copy of state.copies.filter(c => c.status === 'superseded')) { + const replacement = state.copies.find(c => c.index === copy.index && c.status === 'committed'); + if (!replacement || state.requests.find(r => r.requestId === replacement.requestId).leaseExpiresAt <= Date.now() + || !routes.has(replacement.holder) || routes.get(replacement.holder) !== this.committedRoutes.get(replacement.requestId)) continue; + if (!routes.has(copy.holder) || state.requests.some(r => r.index === copy.index && r.holder === copy.holder + && ['requested', 'acknowledged'].includes(r.status)) + || [...this.pendingReleases.values()].some(p => p.addressHex === entry.addressHex && p.requestId === copy.requestId)) continue; + const releaseId = `release-${++this._sequence}`; + const packet = { type: 'uor_shard_release', version: 1, releaseId, requestId: copy.requestId, + index: copy.index, holder: copy.holder, manifestDigest: entry.manifest.manifestDigest }; + try { + const reservationId = this.admission.reserve('repair'); + const pending = { ...packet, addressHex: entry.addressHex, route: routes.get(copy.holder), + reservationId, epoch: this.admission.state.epoch, expiresAt: Date.now() + this.releaseAckTimeoutMs }; + this.pendingReleases.set(releaseId, pending); + if (!this._sendReserved(copy.holder, packet, pending)) this.pendingReleases.delete(releaseId); + } catch { this.pendingReleases.delete(releaseId); } } + } - this.onUpdate({ type: 'object_put', entry }); - return entry; + /** Explicit maintenance for one exact locally retained object, never a relay write. */ + repairPlacement(addressHex, { replaceHolder = null } = {}) { + return this._enqueue(async () => { + const entry = this.objects.get(addressHex); + if (!entry?.verified || !entry.bytes) throw new CustodyError('MissingObject', 'Repair needs exact verified bytes retained in this tab'); + if (replaceHolder !== null && (typeof replaceHolder !== 'string' || !/^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$/.test(replaceHolder))) throw new CustodyError('InvalidSchema'); + this.admission.reserve('repair', { storageBytes: 3 * Math.ceil(entry.bytes.length / 2) }); + const bundle = await createObject(entry.bytes); + if (bundle.manifest.manifestDigest !== entry.manifest.manifestDigest) throw new CustodyError('ManifestDigestMismatch'); + return this._repairPlacement(entry, bundle.fragments, replaceHolder); + }); } - get(addressHex) { - const entry = this.objects.get(addressHex); - if (!entry || !entry.verified || !entry.bytes) { - return { ok: false, bytes: null, text: null, entry: null }; + async _repairPlacement(entry, fragments, replaceHolder = null) { + const key = entry.addressHex, nowMs = Date.now(), routes = this._openRoutes(); + let state = this.placements.get(key) ?? await createPlacement(entry.manifest); + this.placements.set(key, state); + placementStatus(state, nowMs); // clock regression refuses before any dispatch + let replacementUnavailable = false; + for (const pending of [...this.pendingTransfers.values()].filter(p => p.addressHex === key)) { + if (!this._activationCurrent(pending, state, nowMs)) await this._abandonTransfer(pending); } - return { - ok: true, - bytes: entry.bytes, - text: new TextDecoder().decode(entry.bytes), - entry - }; + state = this.placements.get(key); + for (const copy of state.copies.filter(c => c.status === 'committed')) { + const request = state.requests.find(r => r.requestId === copy.requestId); + if (request.leaseExpiresAt <= nowMs || !routes.has(copy.holder) + || routes.get(copy.holder) !== this.committedRoutes.get(copy.requestId)) { + state = await observeHolderLoss(state, copy.holder); + this.placements.set(key, state); + } + } + for (let index = 0; index < 3; index++) { + const active = state.copies.filter(c => c.status === 'committed'); + const old = active.find(c => c.index === index); + if ((old && old.holder !== replaceHolder) || state.requests.some(r => r.index === index + && ['requested', 'acknowledged'].includes(r.status))) continue; + const occupied = new Set([...active.map(c => c.holder), ...state.requests.filter(r => + ['requested', 'acknowledged'].includes(r.status)).map(r => r.holder)]); + const holder = [...routes.keys()].find(id => !occupied.has(id)); + if (!holder) { if (old) replacementUnavailable = true; continue; } + const requestId = `placement-${++this._sequence}`, leaseExpiresAt = Date.now() + this.demoPlacementLeaseMs; + const parameters = { requestId, index, holder, leaseExpiresAt }; + state = await (old ? requestMigration : requestPlacement)(state, parameters); + this.placements.set(key, state); + let sent = false, outcome = 'failed'; + try { + this._checkCapacity(key, fragments[index].bytes.length); + const reservationId = this.admission.reserve('repair', { storageBytes: fragments[index].bytes.length }); + const pending = { addressHex: key, requestId, index, holder, leaseExpiresAt, + manifestDigest: entry.manifest.manifestDigest, bytes: fragments[index].bytes, + route: routes.get(holder), reservationId, epoch: this.admission.state.epoch }; + this.pendingTransfers.set(requestId, pending); + if (!this._activationCurrent(pending, state, Date.now())) throw new CustodyError('StaleRequest'); + sent = this._sendReserved(holder, this._packet(entry, index, fragments[index].bytes, { purpose: 'placement', requestId, holder, leaseExpiresAt }), pending); + } catch { outcome = 'uncertain'; } + if (sent) this.replicationsSent++; + else { + state = await failPlacement(state, requestId, outcome); + this.placements.set(key, state); + this.pendingTransfers.delete(requestId); + } + } + await this._releaseSuperseded(entry); + entry.placementStatus = this.placementSummary(key); + this.onUpdate({ type: 'placement_repair_requested', entry }); + return { ...entry.placementStatus, replacementUnavailable }; } - /** - * Request full shard synchronization from currently connected WebRTC peers - * AND poll the warm relay ring-buffer to recover objects after a 0-peer gap. - */ - async syncFromNetwork(sinceWindow = '30m') { - this.transport.broadcast({ type: 'uor_sync_req', from: this.transport.peerId }); - const envelopes = await this.transport.fetchWarmEnvelopes(sinceWindow); - let recovered = 0; - for (const env of envelopes) { - if (env && env.type === 'uor_shard') { - const newlyVerified = await this.ingestShardEnvelope(env, `warm-relay:${env.from || 'cache'}`); - if (newlyVerified) { - this.warmRecoveries++; - recovered++; + /** Defaults never transmit bytes to a public relay. */ + put(payload, { label = 'data', persistWarm = false, publicData = false } = {}) { + // Snapshot caller-owned bytes before queueing or yielding. + try { + if (typeof payload === 'string' && payload.length > this.maxWireObjectBytes) throw new CustodyError('SizeLimit'); + if (payload instanceof Uint8Array) payload = copyBytes(payload, this.maxWireObjectBytes); + } + catch (error) { return Promise.reject(error); } + return this._enqueue(async () => { + if (persistWarm && !publicData) throw new CustodyError('PublicDataRequired', 'Public warm relay needs explicit publicData:true'); + this._label(label); + if (typeof persistWarm !== 'boolean' || typeof publicData !== 'boolean') throw new CustodyError('InvalidSchema', 'Relay options must be explicit booleans'); + if (typeof payload === 'string' && payload.length > this.maxWireObjectBytes) throw new CustodyError('SizeLimit', 'Payload exceeds live wire limit'); + const bytes = payload instanceof Uint8Array ? copyBytes(payload, this.maxWireObjectBytes) + : typeof payload === 'string' ? new TextEncoder().encode(payload) : null; + if (!bytes) throw new CustodyError('InvalidBytes', 'Payload must be bytes or text'); + if (bytes.length > this.maxWireObjectBytes) throw new CustodyError('SizeLimit', 'Payload exceeds live wire limit'); + // Reserve the new local bytes and conservative fragment allocation ceiling + // before encoding or any placement/relay/VM effect. + this.admission.reserve('place', { storageBytes: bytes.length + 3 * Math.ceil(bytes.length / 2) }); + const { manifest, fragments } = await createObject(bytes); + const key = manifest.object.contentDigest; + const existing = this.objects.get(key); + if (existing && existing.manifest.manifestDigest !== manifest.manifestDigest) { + throw new CustodyError('ManifestDigestMismatch', 'Conflicting cached manifest for object'); + } + if (existing?.verified && this.placements.has(key)) { + this._checkCapacity(key, existing.bytes ? 0 : bytes.length); + existing.bytes = bytes; // the caller supplied a new complete checked copy + await this._repairPlacement(existing, fragments); + if (persistWarm) { + for (const f of fragments.slice(0, 2)) { + if (await this._publish(this._packet(existing, f.index, f.bytes, { purpose: 'public-relay', holder: 'public-relay' }))) existing.warmPublished = (existing.warmPublished || 0) + 1; + } } + return existing; } - } - return recovered; + this._checkCapacity(key, existing?.bytes ? 0 : bytes.length); + const entry = existing || { + addressHex: key, fingerprintHex: key, manifest, originalLength: bytes.length, label, + createdAtSec: Math.floor(Date.now() / 1000), shards: [null, null, null], heldIndices: new Set(), + bytes, verified: true, source: `local:${(this.transport.routingPeerId ?? this.transport.peerId)}`, warmPublished: 0, + }; + // A caller supplying complete bytes may promote a prior fragment/read + // cache. Preserve actually assigned fragments and begin explicit placement. + entry.bytes = bytes; + entry.verified = true; + entry.source = `local:${(this.transport.routingPeerId ?? this.transport.peerId)}`; + entry.warmPublished ??= 0; + this.objects.set(key, entry); + await this._repairPlacement(entry, fragments); + if (persistWarm) { + for (const f of fragments.slice(0, 2)) { + if (await this._publish(this._packet(entry, f.index, f.bytes, { purpose: 'public-relay', holder: 'public-relay' }))) entry.warmPublished++; + } + } + entry.placementStatus = this.placementSummary(key); + if (this.vmBridge) await this.vmBridge.mountUorObject(key, new Uint8Array(bytes), label); + // Storage writes are not discovery refreshes and do not advance its clock. + this.onUpdate({ type: 'object_put', entry }); + return entry; + }); + } + + get(addressHex) { + const entry = this.objects.get(addressHex); + if (!entry || !entry.verified || !entry.bytes) return { ok: false, bytes: null, text: null, entry: null }; + const bytes = new Uint8Array(entry.bytes); + return { ok: true, bytes, text: new TextDecoder().decode(bytes), entry }; + } + + /** Explicit retrieval may create read caches; placement state is separate. */ + syncFromNetwork(sinceWindow = '30m', { publicData = false } = {}) { + return this._enqueue(async () => { + this._broadcast({ type: 'uor_sync_req', version: 1 }); + if (!publicData) return 0; + const envelopes = await this._fetch(sinceWindow); + if (!Array.isArray(envelopes) || envelopes.length > this.maxObjects * 3) throw new CustodyError('CapacityLimit', 'Oversized relay result'); + let recovered = 0; + for (const env of envelopes) { + try { + if (env?.type === 'uor_shard' && await this._ingest(this._snapshotEnvelope(env, true), 'warm-relay:public', null, true)) { + this.warmRecoveries++; recovered++; + } + } catch (error) { this._reject(error); } + } + return recovered; + }); } } diff --git a/src/layer4-compute/index.js b/src/layer4-compute/index.js index 446225f..7e3f3d7 100644 --- a/src/layer4-compute/index.js +++ b/src/layer4-compute/index.js @@ -21,7 +21,13 @@ import { verifyTrace, Fnv1aHasher16 } from '../layer1-uor/index.js'; +import { createCheckpoint, verifyCheckpoint, demoProgram, identifyProgram, MAX_PROGRAM_STEPS } from './replay.js'; +import { validateStaticNetwork, networkChangeAllowed, networkSharingAllowed, shareAllowed, ethernetAllowed, commandAllowed, observationAllowed, administrationAllowed, forgetAllowed, validateCommand, vmLimits, VmBoundaryError, allocationAllowed, terminationRequired, installFilesystemControls, readBoundedVmFile } from './vm-administration.js'; +import { ResourceAdmission, reserveNetwork } from '../layer2-schedulers/policy.js'; +import { snapshotRecord } from '../layer1-uor/custody.js'; +import { record, identifier, natural, digest, refuse } from '../layer1-uor/contracts.js'; import { computeSurvivalProbability } from '../layer2-schedulers/index.js'; +import { vmCanBoot, vmIsBooting, vmCanExecute, vmCallbackCurrent, vmFailAllowed, startVm, failVm, readyVm } from '../layer1-uor/effects.js'; /** * Execute a full or partial sequence of UOR PrimitiveOp instructions on an initial Datum, @@ -64,7 +70,8 @@ export function finalizeAndVerifyExecution(datum, events) { return { datum, trace, - verified: verification.ok, + verified: verification.ok, // Legacy field means structure-only, not execution correctness. + verification: 'structure-only', certificate: verification.certificate ?? null }; } @@ -243,134 +250,464 @@ export function benchmarkComputeStrategies({ } /** - * In-Browser x86 Linux 5.6 VM Node (`v86` WebAssembly emulator) with: + * In-Browser x86 Linux 6.18.7 VM Node (`v86` WebAssembly emulator) with: * 1. 9p filesystem bridge (`/mnt`) synced with the Layer-3 UOR Database * 2. Virtual Ethernet NIC (`eth0`) bridged over Layer-5 WebRTC DataChannels * 3. Shell task execution producing UOR-addressed output artifacts */ export class LinuxVmNode { - constructor({ transport, screenContainer, onStatus = () => {} }) { + #network = null; + constructor({ transport, screenContainer, onStatus = () => {}, bootTimeoutMs = 60000, vmRuntimeMs = vmLimits.runtimeLimitMs, network = null }) { + if (!Number.isFinite(bootTimeoutMs) || bootTimeoutMs <= 0 || bootTimeoutMs > 2147483647) throw new Error('Invalid VM boot timeout'); + if (!Number.isFinite(vmRuntimeMs) || vmRuntimeMs < 1000 || vmRuntimeMs > vmLimits.runtimeLimitMs) throw new VmBoundaryError('vm-runtime-limit-invalid', 'Invalid VM runtime allowance (1000–300000ms).'); this.transport = transport; this.screenContainer = screenContainer; this.onStatus = onStatus; this.v86 = null; - this.booted = false; - this.booting = false; + this.vmPhase = 'Idle'; + this.bootTimeoutMs = bootTimeoutMs; + this.bootGeneration = 0; + this.vmRuntimeMs = vmRuntimeMs; + this.runtimeDeadline = null; + this.filesystemUsage = null; + this.boundaryReason = null; + this.boundaryStop = null; + this.bootPoll = null; + this.bootDeadline = null; + this.keyboardTail = Promise.resolve(); + this.bootProbe = null; + this.shareGeneration = 0; + this.objectSharing = false; + this.ethernetGeneration = 0; + this.ethernetSharing = false; + this.adminBlocked = false; + this.adminBusy = false; + this.terminationObservation = 'none'; + this.commandBusy = false; + this.commands = new Map(); + this.commandSequence = 0; + this.instanceId = globalThis.crypto.randomUUID(); this.ethFramesSent = 0; this.ethFramesReceived = 0; - this.ipAddress = `10.42.0.${(parseInt(this.transport.peerId.slice(-4), 36) % 250) + 2}`; + if (network !== null) this.setNetworkConfiguration(network.address, network.prefixLength); + } + + get networkConfiguration() { return this.#network; } + get ipAddress() { return this.#network?.address ?? null; } + setNetworkConfiguration(address, prefixLength) { + if (!networkChangeAllowed(this)) + throw new VmBoundaryError('vm-network-active', 'Destroy the current instance before changing its network configuration.'); + this.#network = address === null ? null : validateStaticNetwork(address, prefixLength); + if (this.#network === null) this.setEthernetSharing(false); + return this.#network; + } + + get booted() { return vmCanExecute(this); } + get booting() { return vmIsBooting(this); } + get lifecycle() { + return { phase: this.vmPhase.toLowerCase(), generation: this.bootGeneration, canBoot: !this.adminBlocked && !this.adminBusy && vmCanBoot(this), canExecute: vmCanExecute(this), instancePresent: !!this.v86, terminationObservation: this.terminationObservation, adminBusy: this.adminBusy, adminBlocked: this.adminBlocked, commandBusy: this.commandBusy, commandCapacity: this.commands.size < 128, + networkConfiguration: this.#network, canConfigureNetwork: networkChangeAllowed(this), runtimeAllowanceMs: this.vmRuntimeMs, filesystemUsage: this.filesystemUsage ? { ...this.filesystemUsage } : null, boundaryReason: this.boundaryReason, + canAdminister: administrationAllowed(this), ...this.commandLifecycle(this.lastCommandId) }; + } + + // The UI can inspect any retained handle without changing the latest command + // or inventing a second set of admission rules. + commandLifecycle(id) { + const command = this.commands.get(id); + return { + canCancelObservation: !!command && !command.cancelled && !this.adminBusy && !['completed', 'failed-before-dispatch', 'cancelled-before-dispatch'].includes(command.outcome) && (!command.dispatched || observationAllowed(this, command)), + canForgetCommand: forgetAllowed(this, command), + canReconcileCommand: !!command && (command.outcome === 'completed' || observationAllowed(this, command)) + }; + } + + setRuntimeAllowance(milliseconds) { + if (!Number.isFinite(milliseconds) || milliseconds < 1000 || milliseconds > vmLimits.runtimeLimitMs) + throw new VmBoundaryError('vm-runtime-limit-invalid', 'VM runtime allowance must be 1–300 seconds.'); + if (this.v86 || this.adminBusy) throw new VmBoundaryError('vm-runtime-active', 'Destroy the current instance before changing its runtime allowance.'); + this.vmRuntimeMs = milliseconds; + } + + clearBootTimers() { + if (this.bootPoll !== null) clearInterval(this.bootPoll); + if (this.bootDeadline !== null) clearTimeout(this.bootDeadline); + this.bootPoll = null; + this.bootDeadline = null; + } + + clearRuntimeDeadline() { + if (this.runtimeDeadline !== null) clearTimeout(this.runtimeDeadline); + this.runtimeDeadline = null; + } + + enforceBoundary(reason) { + if (this.boundaryStop || !this.v86) return this.boundaryStop; + this.boundaryReason = reason; + // administer synchronously fences grants and callbacks before its first await. + this.boundaryStop = this.stop(); + return this.boundaryStop; + } + + failBoot(generation, message) { + if (!vmFailAllowed(this, generation)) return; + // Invalidate listeners before cleanup, which may dispatch synchronous events. + failVm(this, generation); + this.clearBootTimers(); + this.clearRuntimeDeadline(); + const failed = this.v86; + this.objectSharing = false; + this.ethernetSharing = false; + if (!failed) { this.onStatus({ state: 'error', message }); return; } + // Retain the only handle while cleanup is pending or uncertain. Never allow + // a replacement VM to hide an emulator which may still be running. + this.adminBlocked = true; + this.adminBusy = true; + this.terminationObservation = 'pending'; + const cleaned = () => { + this.terminationObservation = 'destroyed'; + this.v86 = null; + this.adminBlocked = false; + this.adminBusy = false; + this.onStatus({ state: 'error', message }); + }; + const uncertain = error => { + this.terminationObservation = 'unknown'; + this.adminBusy = false; + this.onStatus({ state: 'error', message: `${message} Cleanup outcome unknown: ${error.message}. Instance retained; explicitly retry Destroy before Boot.` }); + }; + try { + if (typeof failed.destroy !== 'function') throw Error('VM destroy is unavailable'); + const result = failed.destroy(); + if (result && typeof result.then === 'function') Promise.resolve(result).then(cleaned, uncertain); + else cleaned(); + } catch (error) { uncertain(error); } + } + + sendGuestText(vm, generation, text) { + const send = this.keyboardTail.then(async () => { + if (this.v86 !== vm || this.bootGeneration !== generation || this.adminBlocked) + throw new VmBoundaryError('vm-keyboard-instance-unavailable', 'VM changed before keyboard dispatch; input was not sent.'); + const pending = vm.keyboard_send_text(text, 10); + // The shipped v86 method resolves after its last synthetic keystroke. + // Undefined-returning adapters do not supply this contract. + if (!pending || typeof pending.then !== 'function') + throw new VmBoundaryError('vm-keyboard-completion-unavailable', 'VM keyboard adapter did not provide typing completion; input outcome is unknown.'); + await pending; + if (this.v86 !== vm || this.bootGeneration !== generation || this.adminBlocked) + throw new VmBoundaryError('vm-keyboard-instance-unavailable', 'VM changed during keyboard dispatch; input outcome remains unknown.'); + }); + this.keyboardTail = send.catch(() => {}); + return send; } boot() { - if (this.v86 || this.booting) return; + if (this.adminBlocked || this.adminBusy || !vmCanBoot(this)) return; + const network = this.#network; + this.terminationObservation = 'none'; + this.boundaryReason = null; + this.boundaryStop = null; + this.filesystemUsage = null; + this.keyboardTail = Promise.resolve(); + this.bootProbe = null; + startVm(this); + const generation = this.bootGeneration; const V86Ctor = globalThis.V86 || globalThis.V86Starter; if (!V86Ctor) { - this.onStatus({ state: 'error', message: 'libv86.js not loaded' }); + this.failBoot(generation, 'libv86.js not loaded; retry Boot after the asset is available.'); return; } - this.booting = true; - this.onStatus({ state: 'booting', ip: this.ipAddress }); - - this.v86 = new V86Ctor({ - wasm_path: './v86/v86.wasm', - memory_size: 64 * 1024 * 1024, - vga_memory_size: 2 * 1024 * 1024, - screen_container: this.screenContainer, - bios: { url: './v86/seabios.bin' }, - vga_bios: { url: './v86/vgabios.bin' }, - bzimage: { url: './images/buildroot-bzimage.bin' }, - cmdline: 'tsc=reliable mitigations=off random.trust_cpu=on', - filesystem: {}, - net_device: { type: 'ne2k' }, - autostart: true - }); - - // Bridge outgoing Layer-2 Ethernet frames from Linux eth0 over WebRTC DataChannels - this.v86.add_listener('net0-send', frameBytes => { - this.ethFramesSent++; - this.transport.broadcast({ - type: 'eth_frame', - from: this.transport.peerId, - frame: Array.from(frameBytes) + this.onStatus({ state: 'booting', ip: network?.address ?? null, cidr: network?.cidr ?? null }); + try { + const vm = new V86Ctor({ + wasm_path: './v86/v86.wasm', + memory_size: 64 * 1024 * 1024, + vga_memory_size: 2 * 1024 * 1024, + screen_container: this.screenContainer, + bios: { url: './v86/seabios.bin' }, + vga_bios: { url: './v86/vgabios.bin' }, + bzimage: { url: './images/buildroot-bzimage.bin' }, + cmdline: 'console=tty0 console=ttyS0,115200 rdinit=/init nomodeset', + filesystem: {}, + net_device: { type: 'ne2k' }, + autostart: false }); - }); - - const checkInterval = setInterval(() => { - if (!this.v86) { - clearInterval(checkInterval); - return; - } - const text = Array.from(this.screenContainer.querySelectorAll('span')) - .map(s => s.innerText) - .join('') - .replace(/[\s\u00a0]+/g, ' ') - .trim(); - - if (text.includes('~%') || text.includes('# ')) { - clearInterval(checkInterval); - this.booted = true; - this.booting = false; - // Configure virtual Ethernet interface eth0 inside the Linux VM - const netInit = `ifconfig eth0 ${this.ipAddress} netmask 255.255.255.0 up 2>/dev/null\n`; - this.v86.keyboard_send_text(netInit, 10); - this.onStatus({ state: 'online', ip: this.ipAddress }); - } - }, 250); + this.v86 = vm; + const current = () => vmCallbackCurrent(this, generation, vm); + let vmStarted = false; + vm.add_listener('emulator-loaded', () => { + if (!current() || vmStarted) return; + try { + if (typeof vm.run !== 'function') throw new VmBoundaryError('vm-boundary-unavailable', 'VM run control is unavailable.'); + this.filesystemUsage = installFilesystemControls(vm, error => this.enforceBoundary(error.message)); + this.runtimeDeadline = setTimeout(() => { + if (current() && terminationRequired(false, true, false)) + this.enforceBoundary(`VM runtime allowance of ${this.vmRuntimeMs}ms elapsed. The whole VM is being stopped; guest effects remain unknown.`); + }, this.vmRuntimeMs); + vmStarted = true; + Promise.resolve(vm.run()).catch(error => this.failBoot(generation, `VM start failed: ${error.message}`)); + } catch (error) { this.failBoot(generation, error.message); } + }); + vm.add_listener('download-error', () => { + if (current()) this.failBoot(generation, 'VM asset download failed; retry Boot when assets are available.'); + }); + vm.add_listener('net0-send', frameBytes => { + if (!ethernetAllowed(this, current(), frameBytes)) return; + this.ethFramesSent++; + const grantGeneration = this.ethernetGeneration; + this.transport.broadcast({ type: 'eth_frame', from: this.transport.peerId, frame: Array.from(frameBytes) }, + { consentCurrent: () => grantGeneration === this.ethernetGeneration && ethernetAllowed(this, current(), frameBytes) }); + }); + if (!current()) return; + this.bootDeadline = setTimeout(() => { + if (current()) this.failBoot(generation, `VM readiness was not observed within ${this.bootTimeoutMs}ms; retry Boot explicitly.`); + }, this.bootTimeoutMs); + let pollBusy = false; + this.bootPoll = setInterval(async () => { + if (!current() || !this.booting || !vmStarted || pollBusy) return; + pollBusy = true; + try { + if (!this.bootProbe) { + const text = Array.from(this.screenContainer.querySelectorAll('span')) + .map(s => s.innerText).join('').replace(/[\s\u00a0]+/g, ' ').trim(); + // A prompt starts initialization; it never establishes readiness. + if (!(text.includes('~%') || /#(?:\s|$)/.test(text))) return; + const suffix = `${this.instanceId}_${generation}`; + const nonce = globalThis.crypto.randomUUID().replaceAll('-', ''); + const probe = this.bootProbe = { inputName: `boot_in_${suffix}`, responseName: `boot_ready_${suffix}`, nonce, typingCompleted: false }; + await vm.create_file(probe.inputName, new TextEncoder().encode(nonce)); + if (!current() || this.adminBlocked) return; + // A preexisting mount is normal for the shipped guest. If its init + // mount failed, retry only that setup step. The response can arrive + // only after the shell reads host input and writes back over 9p. + const setup = `mkdir -p /mnt; { grep -q '^host9p /mnt 9p ' /proc/mounts || mount -t 9p -o trans=virtio host9p /mnt; } && [ "$(cat /mnt/${probe.inputName})" = '${nonce}' ] && ${network ? `ifconfig eth0 ${network.address} netmask ${network.netmask} up` : 'true'} && printf '%s' '${nonce}' > /mnt/${probe.responseName}\n`; + await this.sendGuestText(vm, generation, setup); + probe.typingCompleted = true; + } + const probe = this.bootProbe; + const response = await readBoundedVmFile(vm, probe.responseName, 32); + const expected = new TextEncoder().encode(probe.nonce); + const exact = !!response && response.length === expected.length && response.every((byte, i) => byte === expected[i]); + if (current() && probe.typingCompleted && exact) { + this.clearBootTimers(); + readyVm(this, generation, vm, true); + this.onStatus({ state: 'online', ip: network?.address ?? null, cidr: network?.cidr ?? null }); + } + } catch (error) { + this.failBoot(generation, `VM boot failed: ${error.message}`); + } finally { pollBusy = false; } + }, 250); + } catch (error) { + this.failBoot(generation, `VM boot failed: ${error.message}`); + } } handleIncomingEthFrame(frameArray) { - if (!this.v86 || !this.booted || !Array.isArray(frameArray)) return; + if (!ethernetAllowed(this, !!this.v86, frameArray)) return false; this.ethFramesReceived++; this.v86.bus.send('net0-receive', new Uint8Array(frameArray)); } async mountUorObject(addressHex, bytes, label = '') { - if (!this.v86) return false; - const shortId = addressHex.replace('uor:ca:', '').slice(0, 12); - const filename = `uor_${shortId}.bin`; + const vm = this.v86, generation = this.bootGeneration, shareGeneration = this.shareGeneration; + if (!vm || !shareAllowed(this, true)) return false; + const current = () => shareAllowed(this, shareGeneration === this.shareGeneration && vmCallbackCurrent(this, generation, vm)); try { - await this.v86.create_file(filename, new Uint8Array(bytes)); + digest(addressHex); + if (!(bytes instanceof Uint8Array) || bytes.length > 16 * 1024 * 1024 || typeof label !== 'string') return false; + const snapshot = bytes.slice(), fullRoot = addressHex.slice('sha256:'.length); + const filename = `uor_sha256_${fullRoot}.bin`; + await vm.create_file(filename, snapshot); + if (!current()) return false; if (label) { - const safeLabel = label.replace(/[^a-zA-Z0-9._-]/g, '_'); - await this.v86.create_file(safeLabel, new Uint8Array(bytes)); + const safeLabel = label.replace(/[^a-zA-Z0-9._-]/g, '_').slice(0, 80); + // Labels are convenience aliases in a disjoint namespace, never object + // identity. Every alias retains the complete content digest. + await vm.create_file(`uor_label_${safeLabel}_sha256_${fullRoot}.bin`, snapshot.slice()); } - return true; + return current(); } catch { return false; } } /** - * Execute a shell command inside the booted Linux 5.6 VM, capture stdout via `/mnt/`, + * Execute a shell command inside the booted Linux 6.18.7 VM, capture stdout via `/mnt/`, * and return the resulting bytes so they can be stored and replicated as a UOR object. */ - async executeShellCommand(commandStr, timeoutMs = 6000) { - if (!this.v86 || !this.booted) { - throw new Error('Linux VM is not booted yet.'); - } - const runId = Math.random().toString(36).slice(2, 8); - const scriptName = `job_${runId}.sh`; - const outName = `out_${runId}.txt`; - const doneName = `done_${runId}.flag`; - - const scriptBody = `#!/bin/sh\n(${commandStr}) > /mnt/${outName} 2>&1\necho OK > /mnt/${doneName}\n`; - await this.v86.create_file(scriptName, new TextEncoder().encode(scriptBody)); - await this.v86.keyboard_send_text(`sh /mnt/${scriptName}\n`, 10); - - const t0 = performance.now(); - while (performance.now() - t0 < timeoutMs) { - try { - const doneBuf = await this.v86.read_file(doneName); - if (doneBuf && doneBuf.length > 0) { - const outBuf = await this.v86.read_file(outName); - return outBuf ? new Uint8Array(outBuf) : new Uint8Array(0); - } - } catch {} - await new Promise(r => setTimeout(r, 200)); + setObjectSharing(granted) { + if (typeof granted !== 'boolean') throw Error('Explicit Boolean grant required'); + this.shareGeneration++; + this.objectSharing = granted; + return granted; + } + + setEthernetSharing(granted) { + if (typeof granted !== 'boolean') throw Error('Explicit Boolean grant required'); + if (!networkSharingAllowed(granted, this.#network !== null)) + throw new VmBoundaryError('vm-network-required', 'Configure a unique static IPv4 address and compatible prefix before Boot to enable Ethernet sharing. Destroy any retained instance first.'); + this.ethernetGeneration++; + this.ethernetSharing = granted; + return granted; + } + + async administer(action) { + if (!['stop', 'destroy'].includes(action)) throw Error('Invalid VM administration action'); + if (!administrationAllowed(this)) return false; + const vm = this.v86; + this.adminBusy = true; + this.adminBlocked = true; + this.terminationObservation = 'pending'; + this.objectSharing = false; + this.ethernetSharing = false; + this.clearBootTimers(); + this.clearRuntimeDeadline(); + // Invalidate all pending callbacks BEFORE invoking a possibly reentrant host effect. + this.bootGeneration++; + this.vmPhase = 'Failed'; + for (const command of this.commands.values()) if (command.vm === vm && command.outcome !== 'completed') { + if (command.dispatched) { command.outcome = 'unknown'; command.termination = 'stop-pending'; } + else if (command.outcome === 'pending') command.outcome = 'cancelled-before-dispatch'; + command.interrupt?.(); } - throw new Error(`VM command timed out after ${timeoutMs}ms`); + try { + if (typeof vm[action] !== 'function') throw Error(`VM ${action} is unavailable`); + const pending = vm[action](); + try { this.onStatus({ state: 'stopping', message: `${this.boundaryReason ? this.boundaryReason + ' ' : ''}VM ${action} requested; awaiting emulator confirmation. Prior command evidence is unchanged.` }); } + catch { /* An observing UI callback must not prevent or abandon termination. */ } + await pending; + this.terminationObservation = action === 'stop' ? 'stopped' : 'destroyed'; + if (action === 'destroy') { + this.v86 = null; + this.vmPhase = 'Idle'; + this.adminBlocked = false; + } + for (const command of this.commands.values()) if (command.vm === vm && command.dispatched && command.outcome !== 'completed') command.termination = action === 'stop' ? 'vm-stopped' : 'vm-destroyed'; + try { this.onStatus({ state: 'offline', message: `${this.boundaryReason ? this.boundaryReason + ' ' : ''}${action === 'stop' ? 'VM stopped. Destroy before booting a fresh VM.' : 'VM destroyed. Guest effects are not rolled back.'}` }); } + catch { /* Observation callbacks cannot undo confirmed host termination. */ } + return true; + } catch (error) { + this.terminationObservation = 'unknown'; + for (const command of this.commands.values()) if (command.vm === vm && command.dispatched && command.outcome !== 'completed') command.termination = 'stop-unknown'; + this.onStatus({ state: 'error', message: `VM ${action} outcome unknown: ${error.message}. Grants revoked; instance retained for explicit destroy retry.` }); + return false; + } finally { this.adminBusy = false; } + } + + stop() { return this.administer('stop'); } + destroy() { return this.administer('destroy'); } + + async cancelCommand(id) { + const command = this.commands.get(id); + if (!command || command.cancelled || ['completed', 'failed-before-dispatch', 'cancelled-before-dispatch'].includes(command.outcome)) return false; + command.cancelled = true; + command.outcome = command.dispatched ? 'unknown' : 'cancelled-before-dispatch'; + command.interrupt?.(); + if (!command.dispatched) return true; + if (command.vm !== this.v86 || command.generation !== this.bootGeneration || this.adminBlocked) return false; + command.termination = 'stop-pending'; + if (terminationRequired(true, false, false)) + return await this.enforceBoundary('Command cancellation requested. Cancellation stops the whole VM, including other guest work. Prior effects are not rolled back.'); + return false; + } + + // Compatibility name retains the stronger whole-VM cancellation semantics. + cancelCommandObservation(id) { return this.cancelCommand(id); } + + forgetCommand(id) { + const command = this.commands.get(id); + if (!forgetAllowed(this, command)) return false; + // Explicit operator disposal only. Unknown effects remain observable. + this.commands.delete(id); + delete command.output; + command.vm = null; + if (this.lastCommandId === id) this.lastCommandId = [...this.commands.keys()].at(-1); + return true; + } + + commandEvidence(id) { + const command = this.commands.get(id); + return command ? { id, generation: command.generation, outcome: command.outcome, dispatched: command.dispatched, termination: command.termination ?? 'not-requested' } : null; + } + + async reconcileCommand(id) { + const command = this.commands.get(id); + if (!command) throw Error('Unknown VM command handle'); + if (command.outcome === 'completed') return command.output.slice(); + if (!observationAllowed(this, command)) throw Error('Command belongs to an unavailable VM instance; completion remains unknown.'); + if (command.reading) throw new VmBoundaryError('vm-observation-busy', 'This command result is already being observed.'); + command.reading = true; + try { + const observe = operation => command.interruption ? Promise.race([operation, command.interruption]) : operation; + const done = await observe(readBoundedVmFile(command.vm, command.doneName, 16)); + if (!observationAllowed(this, command)) throw Error('VM replaced during command observation; completion remains unknown.'); + if (!done?.length) return null; + const retained = [...this.commands.values()].reduce((sum, value) => sum + (value.output?.length ?? 0), 0); + const output = await observe(readBoundedVmFile(command.vm, command.outName, Math.max(0, Math.min(vmLimits.outputLimit, vmLimits.retainedOutputLimit - retained)))); + if (!observationAllowed(this, command)) throw Error('VM replaced during output read; completion remains unknown.'); + if (output === null) return null; + const retainedNow = [...this.commands.values()].reduce((sum, value) => sum + (value.output?.length ?? 0), 0); + if (!allocationAllowed(retainedNow, output.length, vmLimits.retainedOutputLimit)) + throw new VmBoundaryError('vm-output-limit', 'Retained output allowance reached.'); + command.output = output ?? new Uint8Array(0); + command.outcome = 'completed'; + return command.output.slice(); + } catch (error) { + if (['vm-output-limit', 'vm-boundary-unavailable'].includes(error.code)) { + command.outcome = 'unknown'; + await this.enforceBoundary(error.message); + } + throw error; + } finally { command.reading = false; } } + + async executeShellCommand(commandStr, timeoutMs = 6000) { + validateCommand(commandStr, timeoutMs); + if (!this.v86 || !commandAllowed(this)) throw Error('VM command refused: not ready, busy, quarantined, or command handle capacity reached.'); + this.commandBusy = true; + const vm = this.v86, generation = this.bootGeneration; + const id = `${this.instanceId}_${generation}_${++this.commandSequence}`; + const command = { id, vm, generation, dispatched: false, outcome: 'pending', cancelled: false, + outName: `out_${id}.txt`, doneName: `done_${id}.flag` }; + this.commands.set(id, command); + this.lastCommandId = id; + const failure = message => Object.assign(new Error(message), { commandId: id, outcome: command.outcome }); + command.interruption = new Promise((resolve, reject) => { + command.interrupt = () => reject(failure(command.dispatched + ? 'VM replaced or stopped during command observation; completion remains unknown.' : 'Command cancelled before shell dispatch.')); + }); + // A cancellation can arrive between host calls. Always observe its rejection. + command.interruption.catch(() => {}); + try { + const scriptName = `job_${id}.sh`; + const scriptBody = `#!/bin/sh\n(${commandStr}) > /mnt/${command.outName} 2>&1\necho OK > /mnt/${command.doneName}\n`; + await Promise.race([vm.create_file(scriptName, new TextEncoder().encode(scriptBody)), command.interruption]); + if (command.cancelled || this.v86 !== vm || this.bootGeneration !== generation || this.adminBlocked) { + command.outcome = 'cancelled-before-dispatch'; + throw failure('Command cancelled before shell dispatch.'); + } + // Even a throwing keyboard adapter may have dispatched input: retain unknown. + command.dispatched = true; + await Promise.race([this.sendGuestText(vm, generation, `sh /mnt/${scriptName}\n`), command.interruption]); + const t0 = performance.now(); + while (!command.cancelled && performance.now() - t0 < timeoutMs) { + if (!observationAllowed(this, command)) break; + const output = await this.reconcileCommand(id); + if (output !== null) return output; + await Promise.race([new Promise(resolve => setTimeout(resolve, 200)), command.interruption]); + } + command.outcome = 'unknown'; + throw failure(command.cancelled || this.adminBlocked + ? `Command observation ended; completion is unknown. VM termination: ${command.termination ?? 'stop-pending'}. Prior guest effects are not rolled back.` + : `VM command observation ended after ${timeoutMs}ms; completion is unknown and the guest command was not cancelled. Reconcile handle ${id}, or Cancel and stop VM; do not replay automatically. The VM runtime allowance continues independently.`); + } catch (error) { + if (error.code === 'vm-keyboard-completion-unavailable') await this.enforceBoundary(error.message); + if (command.outcome === 'pending') command.outcome = command.dispatched ? 'unknown' : 'failed-before-dispatch'; + error.commandId = id; error.outcome = command.outcome; + throw error; + } finally { this.commandBusy = false; } + } + } /** @@ -380,166 +717,157 @@ export class LinuxVmNode { * opened tab reading the warm cache) resumes execution from the last verified step! */ export class LiveDistributedComputeCoordinator { - constructor({ transport, liveDb, onJobUpdate = () => {} }) { + constructor({ transport, liveDb, onJobUpdate = () => {}, allowPublicRelay = false, maxJobs = 128, admission = liveDb?.admission ?? transport?.admission ?? new ResourceAdmission() }) { + natural(maxJobs, 4096); this.transport = transport; this.liveDb = liveDb; this.onJobUpdate = onJobUpdate; - /** @type {Map} */ + this.allowPublicRelay = allowPublicRelay; + this.maxJobs = maxJobs; + this.admission = admission; this.jobs = new Map(); + this.running = new Map(); + this.ingress = Promise.resolve(); + this.pendingIngress = 0; + this.maxPendingIngress = 128; + } + + async ownerIdentity() { + // Initialize the authenticated route before publishing an owner. Display labels + // may differ across peers and must not masquerade as reachability identities. + const session = this.transport.signaling; + await session?.identity?.(); + if (session !== this.transport.signaling) refuse('transport-session-changed'); + return this.transport.routingPeerId ?? this.transport.peerId; } async handleMeshMessage(fromPeerId, msg) { - if (!msg || msg.type !== 'compute_ckpt') return; - await this.ingestCheckpoint(msg, `webrtc:${fromPeerId}`); + if (!msg || msg.type !== 'compute_ckpt') return false; + return this.ingestCheckpoint(msg, `webrtc:${fromPeerId}`); } - async ingestCheckpoint(ckpt, sourceTag = 'remote') { - const existing = this.jobs.get(ckpt.jobId); - if (existing && existing.stepIndex >= ckpt.stepIndex && existing.status === 'completed') { - return; - } + ingestCheckpoint(packet, sourceTag = 'remote') { + // Serialize validation plus commit: two concurrent packets must not overwrite a newer head. + // Snapshot before queueing; later caller mutation cannot alter the admitted message. + if (this.pendingIngress >= this.maxPendingIngress) return Promise.resolve(false); + try { packet = snapshotRecord(packet); } catch { return Promise.resolve(false); } + this.pendingIngress++; + const task = this.ingress.then(() => this.acceptCheckpoint(packet, sourceTag)).finally(() => { this.pendingIngress--; }); + this.ingress = task.catch(() => {}); + return task; + } - const job = { - jobId: ckpt.jobId, - totalSteps: ckpt.totalSteps, - stepIndex: ckpt.stepIndex, - currentValueHex: ckpt.currentValueHex, - events: ckpt.events.map(e => new TraceEvent(e.stepIndex, e.op, { - isZero: () => false, - toHex: () => e.targetHex - })), - rawEvents: ckpt.events, - ownerPeerId: ckpt.ownerPeerId, - status: ckpt.status, - resultAddressHex: ckpt.resultAddressHex || null, - verified: ckpt.verified || false, - updatedAtMs: Date.now(), - sourceTag - }; - this.jobs.set(ckpt.jobId, job); - this.onJobUpdate(job); + async acceptCheckpoint(packet, sourceTag) { + try { + record(packet, ['type', 'jobId', 'program', 'checkpoint', 'ownerPeerId']); + if (packet.type !== 'compute_ckpt') refuse('unsupported-checkpoint'); + identifier(packet.jobId); identifier(packet.ownerPeerId); + const verification = await verifyCheckpoint(packet.program, packet.checkpoint, undefined, { admission: this.admission }); + const existing = this.jobs.get(packet.jobId); + if (existing) { + if (existing.checkpoint.jobId !== packet.checkpoint.jobId) refuse('job-conflict'); + if (packet.checkpoint.stepIndex <= existing.stepIndex) { + if (packet.checkpoint.stepIndex === existing.stepIndex && + packet.checkpoint.stateHex !== existing.currentValueHex) refuse('job-conflict'); + return false; + } + // Every accepted state is replayed independently. Missing network checkpoints are + // allowed, but a direct successor must bind the retained predecessor. + if (packet.checkpoint.stepIndex === existing.stepIndex + 1) { + await verifyCheckpoint(packet.program, packet.checkpoint, existing.checkpoint, { admission: this.admission }); + } + } else if (this.jobs.size >= this.maxJobs) refuse('job-capacity'); + this.admission.reserve('checkpoint', { storageBytes: new TextEncoder().encode(JSON.stringify(packet)).length }); + const job = { jobId: packet.jobId, program: structuredClone(packet.program), + checkpoint: structuredClone(packet.checkpoint), totalSteps: packet.program.instructions.length, + stepIndex: packet.checkpoint.stepIndex, currentValueHex: packet.checkpoint.stateHex, + ownerPeerId: packet.ownerPeerId, status: verification.complete ? 'completed' : 'running', + resultAddressHex: null, verified: true, verification: 'replayed', updatedAtMs: Date.now(), sourceTag }; + this.jobs.set(packet.jobId, job); + this.onJobUpdate(job); + return true; + } catch (error) { + this.onJobUpdate({ type: 'checkpoint_refused', code: error.code || 'invalid-checkpoint' }); + return false; + } } - /** - * Start or resume a multi-step UOR reduction job across the live network. - * Each step executes a Z/(2^64)Z ring operation, commits a checkpoint over WebRTC - * and to the warm relay cache, and pauses `stepDelayMs` so you can test closing the tab mid-job. - */ - async startOrResumeJob({ - jobId = 'job-' + Math.random().toString(36).slice(2, 7), - totalSteps = 12, - initialValue = 104729n, - stepDelayMs = 700 - } = {}) { - let job = this.jobs.get(jobId); - let step = job ? job.stepIndex : 0; - let curDatum = job ? Datum.w64(BigInt(job.currentValueHex)) : Datum.w64(BigInt(initialValue)); - let rawEvents = job ? [...job.rawEvents] : []; - - while (step < totalSteps) { - const op = step % 3 === 0 - ? PrimitiveOp.ADD - : step % 3 === 1 - ? PrimitiveOp.XOR - : PrimitiveOp.SUCC; - const arg = step % 3 === 0 - ? Datum.w64(BigInt((step + 1) * 257)) - : step % 3 === 1 - ? Datum.w64(0x9e3779b97f4a7c15n) - : null; - - curDatum = applyPrimitiveOp(op, curDatum, arg); - const { address } = mintContentAddress(curDatum.toBytes(), Fnv1aHasher16); - rawEvents.push({ - stepIndex: step, - op, - targetHex: address.toHex() - }); - step++; - - const isFinal = step >= totalSteps; - let resultAddressHex = null; - let verified = false; - - if (isFinal) { - const traceEvents = rawEvents.map(e => { - const hex = e.targetHex.replace('uor:ca:', ''); - return new TraceEvent(e.stepIndex, e.op, { - raw: BigInt('0x' + hex), - isZero: () => BigInt('0x' + hex) === 0n, - toHex: () => e.targetHex - }); - }); - const finalCheck = finalizeAndVerifyExecution(curDatum, traceEvents); - verified = finalCheck.verified; - - const stored = await this.liveDb.put( - JSON.stringify({ - jobId, - finalDatumHex: '0x' + curDatum.value.toString(16), - totalSteps, - verified, - certificateFingerprint: finalCheck.certificate?.fingerprint?.toHex() || null - }), - { label: `job_${jobId}_result.json`, persistWarm: true } - ); - resultAddressHex = stored.addressHex; - } + async startOrResumeJob({ jobId = 'job-' + crypto.randomUUID(), totalSteps = 12, + initialValue = 104729n, stepDelayMs = 700, program = null } = {}) { + identifier(jobId); natural(totalSteps, MAX_PROGRAM_STEPS); natural(stepDelayMs, 60000); + if (this.running.has(jobId)) return this.running.get(jobId); + const work = this.runJob({ jobId, totalSteps, initialValue, stepDelayMs, program }); + this.running.set(jobId, work); + try { return await work; } finally { this.running.delete(jobId); } + } - const ckptPacket = { - type: 'compute_ckpt', - jobId, - totalSteps, - stepIndex: step, - currentValueHex: '0x' + curDatum.value.toString(16), - events: rawEvents, - ownerPeerId: this.transport.peerId, - status: isFinal ? 'completed' : 'running', - resultAddressHex, - verified - }; - - await this.ingestCheckpoint(ckptPacket, `local:${this.transport.peerId}`); - this.transport.broadcast(ckptPacket); - if (step % 3 === 0 || isFinal) { - await this.transport.publishWarmEnvelope(ckptPacket); + async runJob({ jobId, totalSteps, initialValue, stepDelayMs, program }) { + const existing = this.jobs.get(jobId); + if (!existing && this.jobs.size >= this.maxJobs) refuse('job-capacity'); + program = structuredClone(existing?.program ?? program ?? demoProgram(totalSteps, initialValue)); + await identifyProgram(program); + let checkpoint = existing?.checkpoint ?? null; + let step = checkpoint?.stepIndex ?? 0; + if (checkpoint) await verifyCheckpoint(program, checkpoint, undefined, { admission: this.admission }); + // Empty jobs have a valid initial/final state and still emit a replayable checkpoint. + do { + if (step < program.instructions.length) step++; + else if (checkpoint !== null) break; + checkpoint = await createCheckpoint(program, step, checkpoint, { admission: this.admission }); + const packet = { type: 'compute_ckpt', jobId, program, checkpoint, ownerPeerId: await this.ownerIdentity() }; + if (!await this.ingestCheckpoint(packet, `local:${this.transport.peerId}`)) { + const head = this.jobs.get(jobId); + if (!head || head.checkpoint.jobId !== checkpoint.jobId || head.stepIndex < step) refuse('checkpoint-refused'); + checkpoint = head.checkpoint; step = head.stepIndex; + // An independently accepted newer head wins. Never publish our refused state. + continue; } - - if (!isFinal && stepDelayMs > 0) { - await new Promise(r => setTimeout(r, stepDelayMs)); + if (this.transport.admission !== this.admission) reserveNetwork(this.admission, 'checkpoint', packet, (this.transport.openPeers?.() || []).length); + this.transport.broadcast(packet); + // Explicit public-data opt-in. A relay is storage with an external retention policy. + if (this.allowPublicRelay && (step % 3 === 0 || step === program.instructions.length)) { + if (this.transport.admission !== this.admission) reserveNetwork(this.admission, 'checkpoint', { ...packet, from: this.transport.peerId, tsMs: Date.now() }); + await this.transport.publishWarmEnvelope(packet, { publicData: true, consentCurrent: () => this.allowPublicRelay }); } + if (step < program.instructions.length && stepDelayMs > 0) await new Promise(r => setTimeout(r, stepDelayMs)); + } while (step < program.instructions.length); + const job = this.jobs.get(jobId); + if (job?.status === 'completed') { + const stored = await this.liveDb.put(JSON.stringify({ jobId, program, checkpoint }), + { label: `job_${jobId}_result.json`, persistWarm: this.allowPublicRelay, publicData: this.allowPublicRelay }); + job.resultAddressHex = stored.addressHex; + this.onJobUpdate(job); } - - return this.jobs.get(jobId); + return job; } - /** - * Recover in-flight or completed jobs from the warm relay ring-buffer, - * and automatically take over any unfinished (`running`) job whose original owner died! - */ async syncAndTakeOverJobs(sinceWindow = '30m') { - const envelopes = await this.transport.fetchWarmEnvelopes(sinceWindow); - for (const env of envelopes) { - if (env && env.type === 'compute_ckpt') { - await this.ingestCheckpoint(env, `warm-relay:${env.ownerPeerId || 'cache'}`); + if (this.allowPublicRelay) { + if (this.transport.admission !== this.admission) this.admission.reserve('retrieve', { requests: 1, transferBytes: 2 * 1024 * 1024 }); + const envelopes = await this.transport.fetchWarmEnvelopes(sinceWindow, { publicData: true, consentCurrent: () => this.allowPublicRelay }); + if (!Array.isArray(envelopes) || envelopes.length > this.maxJobs * 4) refuse('job-capacity'); + for (const env of envelopes) { + if (env?.type !== 'compute_ckpt') continue; + // Transport delivery metadata is not authority or signed program state. + try { + const packet = snapshotRecord(env); + if (Object.hasOwn(packet, 'from') || Object.hasOwn(packet, 'tsMs')) { + identifier(packet.from); natural(packet.tsMs); + delete packet.from; delete packet.tsMs; + } + await this.ingestCheckpoint(packet, 'warm-relay'); + } catch { this.onJobUpdate({ type: 'checkpoint_refused', code: 'invalid-checkpoint' }); } } } - - const activePeerIds = new Set(this.transport.openPeers().map(p => p.remoteId)); + const ownIdentity = await this.ownerIdentity(); + const active = new Set(this.transport.openPeers().map(p => p.remoteId)); const resumed = []; for (const job of this.jobs.values()) { - if ( - job.status === 'running' && - job.stepIndex < job.totalSteps && - job.ownerPeerId !== this.transport.peerId && - !activePeerIds.has(job.ownerPeerId) - ) { + if (job.status === 'running' && job.ownerPeerId !== ownIdentity && !active.has(job.ownerPeerId)) { resumed.push(job.jobId); - this.startOrResumeJob({ - jobId: job.jobId, - totalSteps: job.totalSteps, - stepDelayMs: 400 - }); + // Reachability loss is an observation, not proof of death or exclusive ownership. + this.startOrResumeJob({ jobId: job.jobId, stepDelayMs: 0 }).catch(error => + this.onJobUpdate({ type: 'job_refused', code: error.code || 'host-effect-failed' })); } } return resumed; diff --git a/src/layer4-compute/replay.js b/src/layer4-compute/replay.js new file mode 100644 index 0000000..b0f3f7f --- /dev/null +++ b/src/layer4-compute/replay.js @@ -0,0 +1,158 @@ +/** Deterministic ring jobs. Replay proves agreement with this interpreter, not correctness of host effects. */ +import { PrimitiveOp } from '../layer1-uor/index.js'; +import { canonicalBytes, sha256Bytes } from '../layer1-uor/custody.js'; +import { record, natural, hexValue, digest, refuse } from '../layer1-uor/contracts.js'; + +import { checkpointLinkAllowed, model, modelExecutionDigest } from '../layer1-uor/generated-model.js'; +export const MAX_PROGRAM_STEPS = 1024; +// Local parsing/memory/work policy, not universal UOR/TermValue limits. +export const MAX_TERM_BITS = 32768; +export const MAX_PROGRAM_WORK = 1000000; +const unary = new Set([PrimitiveOp.NEG, PrimitiveOp.BNOT, PrimitiveOp.SUCC, PrimitiveOp.PRED]); +const binary = new Set([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17]); +const hex = value => '0x' + value.toString(16); +const hash = (value, domain) => sha256Bytes(canonicalBytes(value), domain); +const snapshot = value => JSON.parse(new TextDecoder().decode(canonicalBytes(value))); + +function byteWidth(bits) { + natural(bits, MAX_TERM_BITS); + if (bits % 8 !== 0) refuse('unsupported-width'); + return bits; +} +function termHex(value, bits) { + if (typeof value !== 'string' || value.length > 2 + Math.max(1, bits / 4) || !/^0x(?:0|[1-9a-f][0-9a-f]*)$/.test(value)) refuse('invalid-ring-value'); + if (BigInt(value) >> BigInt(bits)) refuse('invalid-ring-value'); + return value; +} +function planProgram(program) { + const typed = program?.version === 2; + record(program, typed ? ['version', 'bits', 'capacityBits', 'initialValueHex', 'instructions'] : ['version', 'bits', 'initialValueHex', 'instructions']); + if (typed) { + byteWidth(program.bits); byteWidth(program.capacityBits); + if (program.bits > program.capacityBits) refuse('term-capacity'); + termHex(program.initialValueHex, program.bits); + } else { + if (program.version !== 1 || ![8, 16, 32, 64, 128].includes(program.bits)) refuse('unsupported-program'); + hexValue(program.initialValueHex, program.bits); + } + if (!Array.isArray(program.instructions) || program.instructions.length > MAX_PROGRAM_STEPS) refuse('program-limit'); + const plan = []; let bits = program.bits, total = 0n; + for (const instruction of program.instructions) { + let argument = 0n, argumentBits = 0; + if (unary.has(instruction?.op)) record(instruction, ['op']); + else if (binary.has(instruction?.op) || typed && instruction?.op === PrimitiveOp.CONCAT) { + record(instruction, typed ? ['op', 'argHex', 'argBits'] : ['op', 'argHex']); + if (typed) { argumentBits = byteWidth(instruction.argBits); termHex(instruction.argHex, argumentBits); } + else { argumentBits = bits; hexValue(instruction.argHex, bits); } + argument = BigInt(instruction.argHex); + } else refuse('unsupported-operation'); + const source = typed ? { opcode: instruction.op, argument, argumentBits } : { opcode: instruction.op, argument }; + if (typed && !model['Stitch.Compute.typedInstructionAllowed'](source, bits, program.capacityBits)) refuse('invalid-typed-operation'); + const work = typed ? model['Stitch.Compute.typedInstructionWork'](source, bits) : model['Stitch.Compute.instructionWork'](source, bits); + total += work; + if (total > BigInt(MAX_PROGRAM_WORK)) refuse('program-work-limit'); + const nextBits = typed ? Number(model['Stitch.Compute.typedResultBits'](source, bits)) : bits; + plan.push({ source, bits, nextBits, work: Number(work) }); bits = nextBits; + } + return plan; +} +export function validateProgram(program) { planProgram(program); return program; } + +/** Deterministic abstract work units, not a wall-clock/BigInt implementation benchmark. */ +export function programWork(program, start = 0, end = program.instructions.length) { + const plan = planProgram(program); natural(start, plan.length); natural(end, plan.length); + if (start > end) refuse('invalid-step-range'); + return plan.slice(start, end).reduce((total, step) => total + step.work, 0); +} +function runPlan(program, plan, start, end, initial, admission) { + const computeSteps = plan.slice(start, end).reduce((total, step) => total + step.work, 0); + admission?.reserve('checkpoint', { computeSteps }); + let word = initial; + for (let i = start; i < end; i++) { + const step = plan[i]; + word = program.version === 2 ? model['Stitch.Compute.typedStep'](step.source, word) : { + bits: word.bits, + value: model['Stitch.Compute.ringStep'](step.source, word.value, 1n << BigInt(step.bits)) + }; + } + return word; +} + +export async function identifyProgram(program) { + validateProgram(program); + return hash(program, 'program'); +} + +export function replayProgram(program, endStep = program.instructions.length, admission = null) { + const plan = planProgram(program); natural(endStep, plan.length); + const word = runPlan(program, plan, 0, endStep, { bits: BigInt(program.bits), value: BigInt(program.initialValueHex) }, admission); + return { stepIndex: endStep, stateHex: hex(word.value), ...(program.version === 2 ? { stateBits: Number(word.bits) } : {}) }; +} + +export async function createCheckpoint(program, stepIndex, previous = null, { admission = null } = {}) { + program = snapshot(program); + if (previous !== null) previous = snapshot(previous); + const jobId = await identifyProgram(program); + if (previous !== null) { + await verifyCheckpoint(program, previous, undefined, { admission }); + if (previous.stepIndex >= stepIndex) refuse('checkpoint-order'); + } + const state = replayProgram(program, stepIndex, admission); + const body = { version: program.version, jobId, modelDigest: modelExecutionDigest, ...state, previousDigest: previous?.checkpointDigest ?? null }; + return { ...body, checkpointDigest: await hash(body, 'checkpoint') }; +} + +/** Full replay from identified input is required even when no predecessor was retained. + * modelDigest binds executable semantics and adapters, not unrelated proofs or + * product metadata. Exact whole-source provenance remains in MODEL_SOURCE. + * Legacy whole-source checkpoint roots are not implicitly accepted. + */ +export async function verifyCheckpoint(program, checkpoint, previous = undefined, { admission = null } = {}) { + program = snapshot(program); checkpoint = snapshot(checkpoint); + if (previous !== undefined && previous !== null) previous = snapshot(previous); + validateProgram(program); + record(checkpoint, ['version', 'jobId', 'modelDigest', 'stepIndex', 'stateHex', 'previousDigest', 'checkpointDigest', ...(program.version === 2 ? ['stateBits'] : [])]); + if (checkpoint.version !== program.version) refuse('unsupported-checkpoint'); + digest(checkpoint.jobId); digest(checkpoint.checkpointDigest); + if (checkpoint.modelDigest !== modelExecutionDigest) refuse('checkpoint-model'); + if (checkpoint.previousDigest !== null) digest(checkpoint.previousDigest); + natural(checkpoint.stepIndex, program.instructions.length); + if (program.version === 2) { byteWidth(checkpoint.stateBits); termHex(checkpoint.stateHex, checkpoint.stateBits); } + else hexValue(checkpoint.stateHex, program.bits); + if (checkpoint.jobId !== await identifyProgram(program)) refuse('program-mismatch'); + const { checkpointDigest, ...body } = checkpoint; + if (checkpointDigest !== await hash(body, 'checkpoint')) refuse('checkpoint-integrity'); + const replay = replayProgram(program, checkpoint.stepIndex, admission); + if (replay.stateHex !== checkpoint.stateHex || program.version === 2 && replay.stateBits !== checkpoint.stateBits) refuse('checkpoint-replay'); + if (previous === null && checkpoint.previousDigest !== null) refuse('checkpoint-predecessor'); + if (previous !== undefined && previous !== null) { + // Do not trust an unchecked predecessor supplied by a caller. + await verifyCheckpoint(program, previous, undefined, { admission }); + if (!checkpointLinkAllowed(true, true, true, true, checkpoint.previousDigest === previous.checkpointDigest, + true, previous.stepIndex, checkpoint.stepIndex, program.instructions.length)) { + refuse('checkpoint-predecessor'); + } + } + return { integrity: true, execution: 'replayed', predecessor: previous === undefined ? 'not-checked' : 'checked', + complete: checkpoint.stepIndex === program.instructions.length }; +} + +export async function resumeProgram(program, checkpoint, { admission = null } = {}) { + program = snapshot(program); checkpoint = snapshot(checkpoint); + await verifyCheckpoint(program, checkpoint, undefined, { admission }); + const plan = planProgram(program); + const word = runPlan(program, plan, checkpoint.stepIndex, program.instructions.length, + { bits: BigInt(program.version === 2 ? checkpoint.stateBits : program.bits), value: BigInt(checkpoint.stateHex) }, admission); + return { jobId: checkpoint.jobId, stateHex: hex(word.value), stepIndex: program.instructions.length, + ...(program.version === 2 ? { stateBits: Number(word.bits) } : {}), execution: 'replayed', effects: [] }; +} + +/** Existing demo workload, now carried in every checkpoint instead of inferred from labels. */ +export function demoProgram(totalSteps = 12, initialValue = 104729n) { + natural(totalSteps, MAX_PROGRAM_STEPS); + const program = { version: 1, bits: 64, initialValueHex: hex(BigInt(initialValue)), + instructions: Array.from({ length: totalSteps }, (_, step) => step % 3 === 0 + ? { op: PrimitiveOp.ADD, argHex: hex(BigInt((step + 1) * 257)) } + : step % 3 === 1 ? { op: PrimitiveOp.XOR, argHex: '0x9e3779b97f4a7c15' } : { op: PrimitiveOp.SUCC }) }; + return validateProgram(program); +} diff --git a/src/layer4-compute/vm-administration.js b/src/layer4-compute/vm-administration.js new file mode 100644 index 0000000..e0390d2 --- /dev/null +++ b/src/layer4-compute/vm-administration.js @@ -0,0 +1,138 @@ +/** Source-derived policy, with host identity/byte observations supplied explicitly. */ +import { model } from '../layer1-uor/generated-model.js'; +const call = (name, ...args) => model[`Stitch.VmAdministration.${name}`](...args); +export const shareAllowed = (node, current) => call('shareAllowed', node.objectSharing, current, node.adminBlocked); +export function validEthernet(frame) { + if (!(Array.isArray(frame) || frame instanceof Uint8Array) || frame.length < 14 || frame.length > 1518) return false; + for (let index = 0; index < frame.length; index++) { + const byte = frame[index]; + if (!Number.isInteger(byte) || byte < 0 || byte > 255) return false; + } + return true; +} +export const ethernetAllowed = (node, current, frame) => call('ethernetAllowed', node.ethernetSharing && networkSharingAllowed(true, Boolean(node.networkConfiguration)), node.booted, + current, !!node.transport && node.transport.closed !== true, validEthernet(frame), node.adminBlocked); +export const commandAllowed = node => call('commandAllowed', node.booted, node.commandBusy, node.adminBlocked, node.commands.size < 128); +export const observationAllowed = (node, command) => call('observationAllowed', node.bootGeneration, command.generation, + node.v86 === command.vm, command.dispatched, node.adminBlocked); +export const administrationAllowed = node => call('administrationAllowed', !!node.v86, node.adminBusy); +export function validateCommand(command, timeout) { + if (typeof command !== 'string' || !command.trim() || command.includes('\0') || new TextEncoder().encode(command).length > 16384) + throw Error('VM command must be nonempty, contain no NUL, and fit 16384 UTF-8 bytes.'); + if (!Number.isFinite(timeout) || timeout < 0 || timeout > 300000) throw Error('Invalid VM command observation timeout (0–300000ms).'); +} + +export const forgetAllowed = (node, command) => call('forgetAllowed', !!command, ['completed', 'failed-before-dispatch', 'cancelled-before-dispatch'].includes(command?.outcome), node.commandBusy); + +export class VmBoundaryError extends Error { + constructor(code, message) { super(message); this.name = 'VmBoundaryError'; this.code = code; } +} +export const vmLimits = Object.freeze(Object.fromEntries([ + 'filesystemAllocationLimit', 'filesystemFileLimit', 'filesystemMetadataLimit', 'outputLimit', 'retainedOutputLimit', 'runtimeLimitMs' +].map(name => [name, Number(call(name))]))); +export const allocationAllowed = (used, requested, limit) => call('allocationAllowed', used, requested, limit); +export const terminationRequired = (cancelled, expired, exceeded) => call('terminationRequired', cancelled, expired, exceeded); + +/** + * Adapter for the bundled v86 local 9p implementation, not a generic sandbox. + * It is installed before the emulator starts. Cumulative allocation charging is + * intentionally conservative: shrinking/unlinking never refunds the instance. + * In particular fs.total_size is only statfs information and is NOT a quota. + */ +export function installFilesystemControls(vm, onViolation) { + const fs = vm.fs9p; + const methods = ['SearchPath', 'GetInode', 'Read', 'ChangeSize', 'CreateBinaryFile', 'CreateTextFile', + 'CreateInode', 'FillDirectory', 'link_under_dir']; + if (!fs || !Array.isArray(fs.inodes) || !fs.inodedata || !Array.isArray(fs.mounts) || fs.mounts.length || + methods.some(name => typeof fs[name] !== 'function')) { + throw new VmBoundaryError('vm-boundary-unavailable', 'Required bundled v86 filesystem controls are unavailable; guest execution refused.'); + } + const state = { allocatedBytes: 0, createdInodes: fs.inodes.length, linkedEntries: 0, exceeded: false }; + const violate = message => { + const error = new VmBoundaryError('vm-filesystem-limit', message); + if (!state.exceeded) { state.exceeded = true; onViolation(error); } + throw error; + }; + const validSize = size => Number.isSafeInteger(size) && size >= 0; + const reserve = size => { + if (state.exceeded) violate('Guest filesystem is quarantined after a resource limit.'); + if (!validSize(size) || size > vmLimits.filesystemFileLimit || + !allocationAllowed(state.allocatedBytes, size, vmLimits.filesystemAllocationLimit)) { + violate('Guest 9p allocation refused before allocation: 16 MiB per buffer, 64 MiB cumulative per VM. Stop requested; guest effects remain unknown.'); + } + state.allocatedBytes += size; + }; + for (const data of Object.values(fs.inodedata)) reserve(data.byteLength); + for (const name of ['ChangeSize', 'CreateBinaryFile', 'CreateTextFile']) { + const original = fs[name]; + fs[name] = function (...args) { + reserve(name === 'ChangeSize' ? args[1] : args[2]?.length); + return original.apply(this, args); + }; + } + const createInode = fs.CreateInode; + fs.CreateInode = function (...args) { + if (state.exceeded || !call('metadataAllowed', state.createdInodes, vmLimits.filesystemMetadataLimit)) + violate('Guest 9p inode limit reached. Stop requested; guest effects remain unknown.'); + state.createdInodes++; + return createInode.apply(this, args); + }; + const link = fs.link_under_dir; + fs.link_under_dir = function (...args) { + if (state.exceeded || typeof args[2] !== 'string' || new TextEncoder().encode(args[2]).length > 255 || + !call('metadataAllowed', state.linkedEntries, vmLimits.filesystemMetadataLimit)) + violate('Guest 9p directory-entry limit reached. Stop requested; guest effects remain unknown.'); + state.linkedEntries++; + return link.apply(this, args); + }; + const fillDirectory = fs.FillDirectory; + fs.FillDirectory = function (id) { + const inode = this.GetInode(id); + let size = 0; + for (const name of inode.direntries.keys()) size += 24 + new TextEncoder().encode(name).length; + reserve(size); + return fillDirectory.call(this, id); + }; + // This value makes the guest's statfs report match the configured allowance, + // but the wrappers above, rather than statfs, enforce allocation admission. + fs.total_size = vmLimits.filesystemAllocationLimit; + return state; +} + +/** Never ask read_file() to allocate a guest-selected file length. */ +export async function readBoundedVmFile(vm, name, limit) { + const fs = vm.fs9p; + if (!fs || ['SearchPath', 'GetInode', 'Read'].some(key => typeof fs[key] !== 'function')) + throw new VmBoundaryError('vm-boundary-unavailable', 'Bounded v86 file reads are unavailable.'); + const path = fs.SearchPath(name); + if (path.id === -1) return null; + const inode = fs.GetInode(path.id), size = inode?.size; + if (!Number.isSafeInteger(size) || size < 0 || + !call('resultReadAllowed', size, limit, (inode?.mode & 0xf000) === 0x8000)) + throw new VmBoundaryError('vm-output-limit', `Guest result must be a regular file of at most ${limit} bytes; unbounded read refused.`); + // Capture a bounded range even if the guest changes its file while Read awaits. + const bytes = await fs.Read(path.id, 0, size); + if (bytes !== null && bytes !== undefined && (!(bytes instanceof Uint8Array) || bytes.length > size)) + throw new VmBoundaryError('vm-boundary-unavailable', 'v86 returned an invalid bounded file range.'); + return bytes ? bytes.slice() : new Uint8Array(0); +} + +// Parsing and subnet arithmetic are host observations; admission is source-owned. +// Canonical decimal input avoids shell syntax, ambiguous octal, NaN and coercion. +export function validateStaticNetwork(address, prefixLength) { + if (typeof address !== 'string' || !/^(0|[1-9][0-9]{0,2})(\.(0|[1-9][0-9]{0,2})){3}$/.test(address) || + !Number.isInteger(prefixLength) || prefixLength < 0 || prefixLength > 32) + throw new VmBoundaryError('vm-network-invalid', 'Enter a canonical IPv4 host address and prefix length 0–32.'); + const octets = address.split('.').map(Number); + if (octets.some(value => value > 255)) + throw new VmBoundaryError('vm-network-invalid', 'IPv4 octets must be 0–255.'); + const numeric = octets.reduce((value, octet) => value * 256 + octet, 0); + const size = 2 ** (32 - prefixLength), hostPart = numeric % size; + if (!call('staticAddressAllowed', octets[0], prefixLength, hostPart, size - 1)) + throw new VmBoundaryError('vm-network-invalid', 'Use a unicast host address, not unspecified, loopback, multicast, reserved, or the subnet network/broadcast address.'); + const mask = 2 ** 32 - size; + const netmask = [24, 16, 8, 0].map(shift => Math.floor(mask / 2 ** shift) % 256).join('.'); + return Object.freeze({ address, prefixLength, netmask, cidr: `${address}/${prefixLength}` }); +} +export const networkChangeAllowed = node => call('networkChangeAllowed', !!node.v86, Boolean(node.adminBusy || node.adminBlocked), node.booting); +export const networkSharingAllowed = (granted, configured) => call('networkSharingAllowed', granted, configured); diff --git a/src/layer5-transport/channel-flow.js b/src/layer5-transport/channel-flow.js new file mode 100644 index 0000000..1373cb6 --- /dev/null +++ b/src/layer5-transport/channel-flow.js @@ -0,0 +1,162 @@ +/** Reliable ordered DataChannel application adapter. Browser SCTP/DTLS owns + * transport integrity. Application commitments remain the object authority. + * Local queue acceptance and SCTP submission are NOT peer acknowledgements. */ +import { model } from '../layer1-uor/generated-model.js'; +import { refuse } from '../layer1-uor/contracts.js'; +import { parseCanonicalJson } from '../layer1-uor/custody.js'; +const call = (name, ...args) => model[`Stitch.ChannelFlow.${name}`](...args); +const encoder = new TextEncoder(); +const HEADER = 16, MAGIC = 0x53544331; +export const CHANNEL_PROTOCOL = 'stitch.channel/1'; +export const CHANNEL_LIMITS = Object.freeze({ message: 524288, queuedBytes: 2097152, queuedMessages: 64, + buffered: 1048576, low: 524288, frame: 65536, age: 30000, assemblies: 16 }); +const jsonLimits = { maxBytes: CHANNEL_LIMITS.message, maxEntries: CHANNEL_LIMITS.message, maxStringLength: CHANNEL_LIMITS.message }; +export function channelMaximum(pc) { + // RFC8841 absent max-message-size default is 64KiB. Zero/unbounded is limited + // by our explicit scheduling quantum, not by a smaller logical message cap. + const value = pc?.sctp?.maxMessageSize; + if (value === undefined || value === null) return CHANNEL_LIMITS.frame; + if (value === 0 || value === Infinity) return CHANNEL_LIMITS.frame; + if (!Number.isSafeInteger(value) || value < 1) refuse('channel-negotiated-size'); + return Math.min(value, CHANNEL_LIMITS.frame); +} +export class ChannelFlow { + constructor({ channel, pc, current = () => true, admission, onMessage = () => {}, onResult = () => {}, + onSent = () => {}, pool = { queued: 0, messages: 0, receiving: 0, assemblies: 0 }, clock = () => performance.now() }) { + Object.assign(this, { channel, pc, current, admission, onMessage, onResult, onSent, pool, clock }); + this.queue = []; this.sequence = 0; this.receivedSequence = 0; this.assembly = null; this.disposed = false; this.timer = null; + channel.binaryType = 'arraybuffer'; channel.bufferedAmountLowThreshold = CHANNEL_LIMITS.low; + channel.onbufferedamountlow = () => this.drain(); + } + result(value) { try { this.onResult(value); } catch { /* Observers cannot retain queue reservations. */ } } + get state() { return { queued: this.queue.length, retained: this.queue.reduce((n, q) => n + q.bytes.length, 0), + receiving: this.assembly?.total ?? 0, disposed: this.disposed }; } + schedule() { + clearTimeout(this.timer); this.timer = null; + if (this.disposed) return; + const times = this.queue.map(q => q.started + CHANNEL_LIMITS.age); + if (this.assembly) times.push(this.assembly.started + CHANNEL_LIMITS.age); + if (!times.length) return; + this.timer = setTimeout(() => { + if (!this.current()) return this.dispose('generation-changed'); + if (this.clock() >= Math.min(...times)) this.fail('channel-timeout'); else this.schedule(); + }, Math.max(1, Math.min(...times) - this.clock())); + this.timer.unref?.(); + } + enqueue(value, { onSubmitted = () => {}, consentCurrent = () => true } = {}) { + if (this.disposed || !this.current() || !consentCurrent() || this.channel.readyState !== 'open') return false; + const raw = JSON.stringify(value); + if (typeof raw !== 'string') refuse('channel-envelope'); + const bytes = encoder.encode(raw); + if (!call('queueAllowed', this.pool.messages, this.pool.queued, bytes.length)) refuse('channel-queue-capacity'); + const snapshot = parseCanonicalJson(raw, jsonLimits); + const maximum = channelMaximum(this.pc), framed = bytes.length > maximum; + if (framed && this.channel.protocol !== undefined && this.channel.protocol !== CHANNEL_PROTOCOL) refuse('channel-peer-framing-unsupported'); + if (framed && (this.channel.ordered === false || this.channel.maxRetransmits != null || this.channel.maxPacketLifeTime != null)) refuse('channel-framing-requires-reliable-ordered'); + if (framed && maximum <= HEADER) refuse('channel-framing-size-unsupported'); + if (framed && this.sequence === 0xffffffff) refuse('channel-sequence-exhausted'); + const frames = framed ? Math.ceil(bytes.length / (maximum - HEADER)) : 1; + // Atomic resource charge includes every wire header; no refunds after failure. + this.admission?.reserve('place', { requests: frames, transferBytes: bytes.length + (framed ? HEADER * frames : 0) }); + const state = this.admission?.state; + const budget = state ? { endMs: state.endMs, lastObservedMs: state.lastObservedMs } : null; + const job = { consentCurrent, budget, raw: framed ? null : raw, bytes, maximum, framed, id: framed ? ++this.sequence : 0, + offset: 0, submitted: 0, started: this.clock(), onSubmitted: () => onSubmitted(snapshot), attempted: false }; + this.queue.push(job); this.pool.queued += bytes.length; this.pool.messages++; + this.schedule(); this.drain(); return true; + } + release(job) { this.pool.queued -= job.bytes.length; this.pool.messages--; } + drain() { + if (this.disposed) return; + if (!this.current()) return this.dispose('generation-changed'); + if (this.channel.readyState !== 'open') return this.dispose('channel-not-open'); + try { + while (this.queue.length) { + const job = this.queue[0]; + if (!job.consentCurrent()) return this.fail('channel-consent-withdrawn'); + if (job.budget && this.admission?.clock) { + const now = this.admission.clock(); + if (now < job.budget.lastObservedMs || now >= job.budget.endMs) return this.fail('channel-budget-expired'); + } + if (this.clock() - job.started >= CHANNEL_LIMITS.age) return this.fail('channel-timeout'); + const remaining = job.bytes.length - job.offset; + const length = job.framed ? Math.min(remaining, job.maximum - HEADER) : remaining; + const wireLength = length + (job.framed ? HEADER : 0); + const buffered = this.channel.bufferedAmount ?? 0; + if (!Number.isSafeInteger(buffered) || buffered < 0) return this.fail('channel-buffer-invalid'); + const maximum = channelMaximum(this.pc); + if (wireLength > maximum) return this.fail('channel-negotiated-size-changed'); + if (!call('sendAllowed', this.current(), this.channel.readyState === 'open', buffered, wireLength, maximum)) break; + let wire = job.raw; + if (job.framed) { + wire = new ArrayBuffer(wireLength); const view = new DataView(wire); + [MAGIC, job.id, job.bytes.length, job.offset].forEach((v, i) => view.setUint32(i * 4, v)); + new Uint8Array(wire, HEADER).set(job.bytes.subarray(job.offset, job.offset + length)); + } + // send() success only proves browser acceptance. A throw may leave the + // remote outcome unknown; never automatically replay a partially sent job. + job.attempted = true; this.channel.send(wire); job.attempted = false; job.offset += length; job.submitted++; + this.onSent(wireLength); + if (job.offset === job.bytes.length) { + this.queue.shift(); this.release(job); job.onSubmitted(); + this.result({ outcome: 'submitted', frames: job.submitted, bytes: job.bytes.length, delivered: false }); + } + } + this.schedule(); + } catch (error) { this.fail(error.code || 'channel-send-unknown'); } + } + receive(data) { + if (this.disposed || !this.current()) return; + try { + const length = typeof data === 'string' ? encoder.encode(data).length : data?.byteLength; + if (!Number.isSafeInteger(length) || length > CHANNEL_LIMITS.message) refuse('channel-wire-size'); + this.admission?.reserve('retrieve', { transferBytes: length, computeSteps: length }); + if (typeof data === 'string') { + if (this.assembly) refuse('channel-interleaved-message'); + this.onMessage(parseCanonicalJson(data, jsonLimits)); return; + } + if (this.channel.protocol !== undefined && this.channel.protocol !== CHANNEL_PROTOCOL) refuse('channel-peer-framing-unsupported'); + if (this.channel.ordered === false || this.channel.maxRetransmits != null || this.channel.maxPacketLifeTime != null) refuse('channel-framing-requires-reliable-ordered'); + if (!(data instanceof ArrayBuffer) || length <= HEADER || length > CHANNEL_LIMITS.frame) refuse('channel-frame'); + const view = new DataView(data), [magic, id, total, offset] = Array.from({ length: 4 }, (_, i) => view.getUint32(i * 4)); + if (magic !== MAGIC || !id || !total || total > CHANNEL_LIMITS.message) refuse('channel-frame'); + if (!this.assembly) { + if (offset !== 0 || id !== this.receivedSequence + 1) refuse('channel-frame-order'); + if (this.pool.assemblies >= CHANNEL_LIMITS.assemblies || this.pool.receiving + total > CHANNEL_LIMITS.queuedBytes) refuse('channel-receive-capacity'); + this.admission?.reserve('retrieve', { storageBytes: total }); + this.assembly = { id, total, received: 0, bytes: new Uint8Array(total), started: this.clock() }; + this.pool.receiving += total; this.pool.assemblies++; + } + const a = this.assembly, payload = new Uint8Array(data, HEADER); + if (a.id !== id || a.total !== total || this.clock() - a.started >= CHANNEL_LIMITS.age + || !call('appendAllowed', a.received, offset, payload.length, total)) refuse('channel-frame-order'); + a.bytes.set(payload, offset); a.received = Number(call('append', a.received, offset, payload.length, total)); + if (a.received === total) { + const raw = new TextDecoder('utf-8', { fatal: true }).decode(a.bytes); + const msg = parseCanonicalJson(raw, jsonLimits); + this.receivedSequence = id; this.releaseAssembly(); + if (this.current()) this.onMessage(msg); + } + this.schedule(); + } catch (error) { + // Invalid standalone JSON is ignored as before; binary/partial protocol + // failures poison the stream rather than silently lose a logical message. + if (typeof data !== 'string' || this.assembly) this.fail(error.code || 'channel-frame-invalid'); + } + } + releaseAssembly() { + if (!this.assembly) return; + this.pool.receiving -= this.assembly.total; this.pool.assemblies--; this.assembly = null; + } + fail(reason) { this.dispose(reason); this.channel.close?.(); } + dispose(reason = 'channel-closed') { + if (this.disposed) return; + this.disposed = true; clearTimeout(this.timer); this.timer = null; + const jobs = this.queue.splice(0); + for (const job of jobs) { this.release(job); this.result({ outcome: job.submitted ? 'partial' : job.attempted ? 'unknown' : 'cancelled', reason, + frames: job.submitted, bytes: job.bytes.length, delivered: false }); } + if (this.assembly) this.result({ outcome: 'incomplete-receive', reason, bytes: this.assembly.received, expected: this.assembly.total }); + this.releaseAssembly(); + this.result({ outcome: 'closed', reason, delivered: false }); + } +} diff --git a/src/layer5-transport/dns-wire.js b/src/layer5-transport/dns-wire.js new file mode 100644 index 0000000..2ca0b0d --- /dev/null +++ b/src/layer5-transport/dns-wire.js @@ -0,0 +1,131 @@ +/** RFC8484 application/dns-message client boundary. DNSSEC validation and TLS, + * HTTP negotiation/cache storage remain resolver/browser responsibilities. */ +import { refuse } from '../layer1-uor/contracts.js'; +import { wireBytes } from '../layer2-schedulers/policy.js'; +const types = Object.freeze({ A:1, NS:2, CNAME:5, SOA:6, PTR:12, MX:15, TXT:16, AAAA:28, SRV:33, DS:43, RRSIG:46, DNSKEY:48, TLSA:52, SVCB:64, HTTPS:65, ANY:255, CAA:257 }); +const enc = new TextEncoder(), dec = new TextDecoder('utf-8', {fatal:true,ignoreBOM:true}); +export function dnsQueryName(input) { + if (typeof input !== 'string' || !input || /[\s/@:#?%\\]/.test(input)) refuse('dns-invalid-name'); + if (input === '.') return '.'; + let name = input.endsWith('.') ? input.slice(0,-1) : input; + if (/[^\x00-\x7f]/.test(name)) { + try { name = new URL('https://'+name).hostname; } catch { refuse('dns-invalid-name'); } + } + name=name.toLowerCase(); + if (name.length>253 || name.split('.').some(label=>!label || label.length>63 || !/^[a-z0-9_-]+$/.test(label))) refuse('dns-invalid-name'); + return name; +} +export function dnsTypeCode(type) { + const value = types[String(type).toUpperCase()] ?? (/^\d+$/.test(String(type)) ? Number(type) : 0); + if (!Number.isSafeInteger(value) || value<1 || value>65535) refuse('dns-query-type'); + return value; +} +export function encodeDnsQuery(name, type='TXT') { + name=dnsQueryName(name);type=dnsTypeCode(type); + const labels=name==='.'?[]:name.split('.'), size=12+labels.reduce((n,l)=>n+1+l.length,1)+4; + const bytes=new Uint8Array(size), view=new DataView(bytes.buffer); + view.setUint16(2,0x0100);view.setUint16(4,1); // ID0 improves DoH cache reuse; recursion desired. + let at=12; + for(const label of labels){bytes[at++]=label.length;bytes.set(enc.encode(label),at);at+=label.length;} + bytes[at++]=0;view.setUint16(at,type);view.setUint16(at+2,1); + return {bytes,name,type,id:0}; +} +const hex = bytes => Array.from(bytes,b=>b.toString(16).padStart(2,'0')).join(''); +const labelText = bytes => Array.from(bytes,b=>b>=33&&b<=126&&b!==46&&b!==92?String.fromCharCode(b):'\\'+String(b).padStart(3,'0')).join('').toLowerCase(); +const txtText = bytes => { try{return JSON.stringify(dec.decode(bytes));}catch{return '"'+Array.from(bytes,b=>b>=32&&b<=126&&b!==34&&b!==92?String.fromCharCode(b):'\\'+String(b).padStart(3,'0')).join('')+'"';} }; +export function decodeDnsResponse(input, expected, {ageSeconds=0}={}) { + if (!(input instanceof Uint8Array)||input.length<12||input.length>65535) refuse('dns-message-size'); + if (!Number.isSafeInteger(ageSeconds)||ageSeconds<0) refuse('dns-http-age'); + const bytes=new Uint8Array(input), view=new DataView(bytes.buffer), length=bytes.length; + const need=(at,n,end=length)=>{if(at<0||at+n>end)refuse('dns-message-truncated');}; + const u16=at=>{need(at,2);return view.getUint16(at);}, u32=at=>{need(at,4);return view.getUint32(at);}; + function nameAt(start,end=length,allowCompression=true){ + let at=start,next=null,wireLength=1;const parts=[],seen=new Set(); + for(;;){ + need(at,1,next===null?end:length);if(seen.has(at))refuse('dns-compression-cycle');seen.add(at); + const n=bytes[at]; + if((n&0xc0)===0xc0){if(!allowCompression)refuse('dns-name-compression-forbidden');need(at,2,next===null?end:length);const target=((n&63)<<8)|bytes[at+1];if(target<12||target>=at)refuse('dns-compression-pointer');if(next===null)next=at+2;at=target;continue;} + if(n&0xc0)refuse('dns-label-kind');at++; + if(n===0)return {name:parts.length?parts.join('.'):'.',next:next??at}; + need(at,n,next===null?end:length);wireLength+=n+1;if(wireLength>255)refuse('dns-name-size'); + parts.push(labelText(bytes.subarray(at,at+n)));at+=n; + } + } + const id=u16(0),flags=u16(2),qd=u16(4),counts=[u16(6),u16(8),u16(10)]; + if(id!==(expected.id??0)||!(flags&0x8000)||(flags&0x7800)||(flags&0x0040)||qd!==1)refuse('dns-response-header'); + if(flags&0x0200)refuse('dns-response-truncated'); + let at=12;const question=nameAt(at);at=question.next;need(at,4); + if(question.name!==dnsQueryName(expected.name)||u16(at)!==dnsTypeCode(expected.type)||u16(at+2)!==1)refuse('dns-question-mismatch');at+=4; + function record(){ + const owner=nameAt(at);at=owner.next;need(at,10); + const type=u16(at),klass=u16(at+2),wireTtl=u32(at+4),size=u16(at+8);at+=10; + const start=at,end=at+size;need(at,size); + const r={name:owner.name,type,class:klass,TTL:wireTtl>0x7fffffff?0:wireTtl,rdata:new Uint8Array(bytes.subarray(start,end))}; + const exact=p=>{if(p!==end)refuse('dns-rdata-length');}; + if(type===16){const strings=[];let p=start;while(pn+p.length,0),joined=new Uint8Array(total);let offset=0;for(const part of strings){joined.set(part,offset);offset+=part.length;}r.text=dec.decode(joined);}catch{r.text=null;}} + else if([2,3,4,5,7,8,9,12].includes(type)){const n=nameAt(start,end);exact(n.next);r.data=n.name;} + else if(type===33){need(start,6,end);const target=nameAt(start+6,end,false);exact(target.next);r.srv={priority:u16(start),weight:u16(start+2),port:u16(start+4),target:target.name};r.data=`${r.srv.priority} ${r.srv.weight} ${r.srv.port} ${r.srv.target}`;} + else if(type===6){const primary=nameAt(start,end),mailbox=nameAt(primary.next,end);need(mailbox.next,20,end);exact(mailbox.next+20);r.soa={primary:primary.name,mailbox:mailbox.name,serial:u32(mailbox.next),refresh:u32(mailbox.next+4),retry:u32(mailbox.next+8),expire:u32(mailbox.next+12),minimum:u32(mailbox.next+16)};r.data=Object.values(r.soa).join(' ');} + else if(type===14){const first=nameAt(start,end),second=nameAt(first.next,end);exact(second.next);r.data=first.name+' '+second.name;} + else if(type===15){need(start,2,end);const exchange=nameAt(start+2,end);exact(exchange.next);r.data=`${u16(start)} ${exchange.name}`;} + else if(type===1){if(size!==4)refuse('dns-rdata-length');r.data=Array.from(r.rdata).join('.');} + else if(type===28){if(size!==16)refuse('dns-rdata-length');r.data=Array.from({length:8},(_,i)=>u16(start+i*2).toString(16)).join(':');} + else if(type===41){if(owner.name!=='.')refuse('dns-opt-owner');r.extendedRcode=wireTtl>>>24;r.ednsVersion=(wireTtl>>>16)&255;let p=start;while(p{const records=[];for(let i=0;ir.type===41); + if([...answers,...authority].some(r=>r.type===41))refuse('dns-opt-section'); + if(opts.length>1||opts.some(r=>r.ednsVersion!==0))refuse('dns-edns-version'); + const status=(flags&15)|((opts[0]?.extendedRcode??0)<<4); + if(status!==0&&status!==3)refuse('dns-response-status',`DNS response code ${status}`); + let terminal=question.name;const chain=[],visited=new Set([terminal]); + if(![5,255].includes(dnsTypeCode(expected.type))){for(;;){ + const aliases=answers.filter(r=>r.class===1&&r.name===terminal&&r.type===5); + if(!aliases.length)break;const targets=new Set(aliases.map(r=>r.data));if(targets.size!==1)refuse('dns-cname-conflict'); + if(answers.some(r=>r.class===1&&r.name===terminal&&r.type!==5&&r.type!==46))refuse('dns-cname-conflict'); + terminal=aliases[0].data;if(visited.has(terminal))refuse('dns-cname-cycle');visited.add(terminal);chain.push(...aliases); + }} + const type=dnsTypeCode(expected.type),selected=status===3?[]:answers.filter(r=>r.class===1&&r.name===terminal&&(type===255||r.type===type)); + const relevant=selected.length?[...chain,...selected]:authority.filter(r=>r.class===1&&r.type===6&&(r.name==='.'||terminal===r.name||terminal.endsWith('.'+r.name))); + const lifetimeRecords=selected.length?relevant:[...chain,...relevant]; + const ttl=relevant.length?Math.min(...lifetimeRecords.map(r=>r.type===6?Math.min(r.TTL,r.soa.minimum):r.TTL)):0; + return {status,question:{name:question.name,type},answers,authority,additional,selected, + ttlSeconds:Math.max(0,ttl-ageSeconds),negative:status===3||!selected.length, + authenticatedData:!!(flags&0x20),dnssecValidatedByClient:false}; +} +export async function readBoundedDnsBytes(response,maximum=65535){ + const advertised=response.headers?.get?.('content-length'); + if(advertised!==null&&advertised!==undefined&&(!/^\d+$/.test(advertised)||Number(advertised)>maximum))refuse('response-limit'); + if(!response.body?.getReader){const bytes=new Uint8Array(await response.arrayBuffer());if(bytes.length>maximum)refuse('response-limit');return bytes;} + const reader=response.body.getReader(),parts=[];let size=0; + try{for(;;){const {value,done}=await reader.read();if(done)break;size+=value.byteLength;if(size>maximum)refuse('response-limit');parts.push(value);}const result=new Uint8Array(size);let at=0;for(const p of parts){result.set(p,at);at+=p.length;}return result;} + finally{await reader.cancel().catch(()=>{});reader.releaseLock();} +} +export async function queryDnsMessage({name,type='TXT',endpoint='https://cloudflare-dns.com/dns-query',method='POST',fetchImpl=globalThis.fetch?.bind(globalThis),admission}){ + if(!fetchImpl)refuse('dns-fetch-unavailable'); + if(method!=='GET'&&method!=='POST')refuse('dns-http-method'); + const query=encodeDnsQuery(name,type);let url; + // Configured URI template has one variable, dns. Literal HTTPS URLs are also + // supported and expanded with that query parameter for GET. + let configured=String(endpoint),template=/\{(?:[?&+])?dns\}/g; + if(method==='POST')configured=configured.replace(template,''); + else {const encoded=btoa(String.fromCharCode(...query.bytes)).replace(/\+/g,'-').replace(/\//g,'_').replace(/=+$/,''); + if(template.test(configured)){template.lastIndex=0;configured=configured.replace(template,part=>part==='\{?dns\}'?'?dns='+encoded:part==='\{&dns\}'?'&dns='+encoded:encoded);} + else {try{url=new URL(configured);url.searchParams.set('dns',encoded);configured=url.href;}catch{refuse('dns-endpoint');}} + } + try{url=new URL(configured);}catch{refuse('dns-endpoint');} + if(url.protocol!=='https:'||url.username||url.password||url.hash||/[{}]/.test(configured))refuse('dns-endpoint'); + if(method==='POST')url.searchParams.delete('dns'); + admission?.reserve('retrieve',{requests:1,transferBytes:wireBytes(url.href)+(method==='POST'?query.bytes.length:0)+65535}); + const start=performance.now(); + const response=await fetchImpl(url.href,{method,headers:{accept:'application/dns-message',...(method==='POST'?{'content-type':'application/dns-message'}:{})},...(method==='POST'?{body:query.bytes}:{}),credentials:'omit',referrerPolicy:'no-referrer',redirect:'error'}); + if(!response.ok)refuse('dns-http-status',`DoH HTTP ${response.status}`); + if(response.headers?.get?.('content-type')?.split(';')[0].trim().toLowerCase()!=='application/dns-message')refuse('dns-media-type'); + const observedAge=response.headers?.get?.('age');const age=observedAge??'0';if(!/^\d+$/.test(age)||!Number.isSafeInteger(Number(age)))refuse('dns-http-age'); + const result=decodeDnsResponse(await readBoundedDnsBytes(response),query,{ageSeconds:Number(age)}); + if(response.type==='cors'&&observedAge===null)result.ttlSeconds=0; + return {...result,httpAgeObserved:observedAge!==null,rttMs:Number((performance.now()-start).toFixed(1)),httpAgeSeconds:Number(age),endpoint:url.origin+url.pathname}; +} diff --git a/src/layer5-transport/index.js b/src/layer5-transport/index.js index 65f7eb9..f7af5d8 100644 --- a/src/layer5-transport/index.js +++ b/src/layer5-transport/index.js @@ -1,15 +1,72 @@ +import { SignalSession } from './signaling.js'; /** * @file src/layer5-transport/index.js * @description Layer 5: Live Multi-Peer WebRTC DataChannel Mesh, Warm Relay Ring-Buffer, * Layer-2 Ethernet Frame Bridge (for v86 Linux VMs), and RFC 8484 DoH + Lightweight DNS TXT Writer. */ +import { ResourceAdmission, wireBytes } from '../layer2-schedulers/policy.js'; +import { refuse } from '../layer1-uor/contracts.js'; +import { parseCanonicalJson } from '../layer1-uor/custody.js'; +import { queryDnsMessage } from './dns-wire.js'; +import { captureTransport, transportCanSend, transportSessionCurrent, transportPeerCurrent, transportChannelCurrent, + transportSignalAllowed, transportPeerAllocationAllowed, closeTransport, openTransport, + observeC1Probe, c1ConnectionQualified, c1DirectSuccess, c1SampleQualified, c1SampleStructurallyValid } from '../layer1-uor/effects.js'; + +import { ChannelFlow, CHANNEL_PROTOCOL } from './channel-flow.js'; + +import { RELAY_EVENT_BYTES, RELAY_LIMITS, RelayReassembler, snapshotRelayMessage, frameRelayMessage, + newRelaySession, relayCapacity, relayAdmissionAllowed, relayEffectAllowed } from './relay-framing.js'; + +/** Bounded application response body, not a bound on browser/network overhead. */ +export async function readBoundedText(response, maxBytes) { + const advertised = response.headers?.get?.('content-length'); + if (advertised && Number(advertised) > maxBytes) refuse('response-limit'); + if (!response.body?.getReader) { + const text = await response.text(); + if (wireBytes(text) > maxBytes) refuse('response-limit'); + return text; + } + const reader = response.body.getReader(), decoder = new TextDecoder(); + let total = 0, text = ''; + try { + for (;;) { + const { done, value } = await reader.read(); + if (done) break; + total += value.byteLength; + if (total > maxBytes) refuse('response-limit'); + text += decoder.decode(value, { stream: true }); + } + return text + decoder.decode(); + } finally { await reader.cancel().catch(() => {}); reader.releaseLock(); } +} + const DEFAULT_DOH_ENDPOINT = 'https://cloudflare-dns.com/dns-query'; const DEFAULT_ICE_SERVERS = [ { urls: 'stun:stun.l.google.com:19302' }, { urls: 'stun:stun.cloudflare.com:3478' } ]; +// Snapshot a bounded, ordinary RTCIceServer list before asynchronous connection +// setup. An explicit empty list supports a host-only local mesh. Credentials are +// passed only to the browser's RTC implementation, never emitted as events. +function iceServerConfiguration(servers) { + if (!Array.isArray(servers) || servers.length > 16) throw new TypeError('Invalid ICE server configuration'); + return servers.map(server => { + if (!server || typeof server !== 'object' || Array.isArray(server) + || Object.keys(server).some(key => !['urls', 'username', 'credential'].includes(key))) throw new TypeError('Invalid ICE server configuration'); + const urls = typeof server.urls === 'string' ? [server.urls] : server.urls; + if (!Array.isArray(urls) || urls.length < 1 || urls.length > 16 + || urls.some(url => typeof url !== 'string' || url.length > 2048 || !/^(stun|stuns|turn|turns):[^\s]+$/.test(url))) throw new TypeError('Invalid ICE server configuration'); + const result = { urls: [...urls] }; + for (const key of ['username', 'credential']) if (server[key] !== undefined) { + if (typeof server[key] !== 'string' || server[key].length > 2048) throw new TypeError('Invalid ICE server configuration'); + result[key] = server[key]; + } + return result; + }); +} + export function parsePointerTxt(rawTxt) { const cleaned = String(rawTxt).replace(/^"+|"+$/g, '').trim(); const out = {}; @@ -113,43 +170,109 @@ export async function verifyPointerTxt(rawTxt, publicKeyOrB64Url) { }; } +const DNS_TYPES = Object.freeze({ A: 1, NS: 2, CNAME: 5, SOA: 6, PTR: 12, MX: 15, TXT: 16, AAAA: 28, SRV: 33, DS: 43, RRSIG: 46, DNSKEY: 48, TLSA: 52, SVCB: 64, HTTPS: 65, ANY: 255, CAA: 257 }); +const dnsName = value => { + if (typeof value !== 'string' || value.length === 0 || value.length > 254 || /[^A-Za-z0-9_.-]/.test(value)) refuse('dns-invalid-name'); + if (value === '.') return '.'; + const name = value.endsWith('.') ? value.slice(0, -1) : value; + if (name.length > 253 || name.split('.').some(label => label.length === 0 || label.length > 63)) refuse('dns-invalid-name'); + return name.toLowerCase(); +}; export function parseSrvRecord(srvData) { - const parts = String(srvData).trim().split(/\s+/); - if (parts.length < 4) return null; - return { - priority: Number(parts[0]), - weight: Number(parts[1]), - port: Number(parts[2]), - target: parts[3].replace(/\.$/, '') - }; + if (typeof srvData !== 'string') return null; + const parts = srvData.trim().split(/\s+/); + if (parts.length !== 4 || parts.slice(0, 3).some(part => !/^\d+$/.test(part) || Number(part) > 65535)) return null; + let target; + try { target = dnsName(parts[3]); } catch { return null; } + // RFC2782 root target means the service is unavailable, not an empty host. + if (target !== '.' && target.split('.').some(label => !/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(label))) return null; + return { priority: Number(parts[0]), weight: Number(parts[1]), port: Number(parts[2]), target }; +} + +/** Validate and associate the provider's JSON projection. This does not decode + * RFC8484 DNS wire messages or establish DNSSEC authentication/cache semantics. + */ +export function associateDnsJson(body, name, typeCode) { + const query = dnsName(name); + if (!body || typeof body !== 'object' || !Number.isSafeInteger(body.Status) || body.Status !== 0) refuse('dns-response-status'); + if (body.TC !== undefined && body.TC !== false) refuse('dns-response-truncated'); + if (body.Question !== undefined && (!Array.isArray(body.Question) || body.Question.length !== 1 + || dnsName(body.Question[0]?.name) !== query || body.Question[0]?.type !== typeCode)) refuse('dns-question-mismatch'); + if (body.Answer !== undefined && !Array.isArray(body.Answer)) refuse('dns-invalid-answer'); + const answers = body.Answer ?? []; + for (const answer of answers) { + if (!answer || typeof answer !== 'object' || !Number.isSafeInteger(answer.type) || answer.type < 1 || answer.type > 65535 + || !Number.isSafeInteger(answer.TTL) || answer.TTL < 0 || answer.TTL > 2147483647 || typeof answer.data !== 'string' + || (answer.class !== undefined && answer.class !== 1) || (answer.Class !== undefined && answer.Class !== 1)) refuse('dns-invalid-answer'); + dnsName(answer.name); + } + let terminal = query; + const path = new Set([query]), chain = []; + if (typeCode !== DNS_TYPES.CNAME) { + for (;;) { + const aliases = answers.filter(answer => answer.type === DNS_TYPES.CNAME && dnsName(answer.name) === terminal); + if (aliases.length === 0) break; + const targets = new Set(aliases.map(answer => dnsName(answer.data))); + if (targets.size !== 1 || aliases.length !== 1) refuse('dns-cname-conflict'); + terminal = [...targets][0]; + if (path.has(terminal)) refuse('dns-cname-cycle'); + path.add(terminal); chain.push(aliases[0]); + } + } + const selected = answers.filter(answer => dnsName(answer.name) === terminal && (typeCode === DNS_TYPES.ANY || answer.type === typeCode)); + // Do not turn unrelated owners/types or an alias/data conflict into evidence + // of absence. Additional-section processing is a separate DNS wire concern. + if (answers.some(answer => !chain.includes(answer) && !selected.includes(answer))) refuse('dns-answer-mismatch'); + return { selected, ttlSeconds: answers.length ? Math.min(...answers.map(answer => answer.TTL)) : 0 }; } /** - * RFC 8484 DNS-over-HTTPS Resolver + Lightweight Public Dynamic DNS TXT Writer. + * RFC8484 DNS-message lookup + scoped Cloudflare TXT writer. + * Explicit format:"json" retains the separate provider-specific legacy API. */ export class DohResolver { constructor(options = {}) { this.endpoint = options.endpoint ?? DEFAULT_DOH_ENDPOINT; + this.format = options.format ?? "wire"; + this.method = options.method ?? "POST"; + if (!["wire", "json"].includes(this.format)) refuse("dns-query-format"); this.fetchImpl = options.fetchImpl ?? globalThis.fetch?.bind(globalThis); this.history = []; + this.admission = options.admission ?? new ResourceAdmission(); + this.maxResponseBytes = 128 * 1024; } async resolve(name, type = 'SRV') { + if (this.format === 'wire') { + const result = await queryDnsMessage({ name, type, endpoint: this.endpoint, + method: this.method, fetchImpl: this.fetchImpl, admission: this.admission }); + const record = { name, type, status: result.status, ttl_seconds: result.ttlSeconds, + rtt_ms: result.rttMs, cache_hit_inferred: false, http_age_seconds: result.httpAgeSeconds, + negative: result.negative, authenticated_data: result.authenticatedData, + dnssec_validated_by_client: false, + rawRecords: result.selected.map(r => r.text ?? r.data), + records: result.selected.map(r => r.srv ?? (r.type === 16 ? parsePointerTxt(r.text ?? r.data) : r.data)) }; + this.history.push(record); if (this.history.length > 128) this.history.shift(); + return record; + } if (!this.fetchImpl) { throw new Error('fetch is not available in this runtime'); } + const queryName = dnsName(name); + const typeName = typeof type === 'string' ? type.toUpperCase() : type; + const typeCode = DNS_TYPES[typeName] ?? (/^\d+$/.test(String(typeName)) ? Number(typeName) : 0); + if (!Number.isSafeInteger(typeCode) || typeCode < 1 || typeCode > 65535) refuse('dns-query-type'); const t0 = performance.now(); - const url = `${this.endpoint}?name=${encodeURIComponent(name)}&type=${encodeURIComponent(type)}`; + const url = `${this.endpoint}?name=${encodeURIComponent(queryName)}&type=${encodeURIComponent(typeCode)}`; + this.admission.reserve('retrieve', { requests: 1, transferBytes: wireBytes(url) + this.maxResponseBytes }); const res = await this.fetchImpl(url, { headers: { accept: 'application/dns-json' } }); if (!res.ok) { throw new Error(`HTTP ${res.status}`); } - const body = await res.json(); + const body = res.body?.getReader || res.text + ? JSON.parse(await readBoundedText(res, this.maxResponseBytes)) : await res.json(); const rttMs = Number((performance.now() - t0).toFixed(1)); - const answers = Array.isArray(body.Answer) ? body.Answer : []; - const ttlSeconds = answers.length > 0 - ? Math.min(...answers.map(a => Number(a.TTL) || 30)) - : 0; + const { selected: answers, ttlSeconds } = associateDnsJson(body, queryName, typeCode); const prev = this.history.length > 0 ? this.history[this.history.length - 1] : null; const cacheHitInferred = Boolean( @@ -157,21 +280,23 @@ export class DohResolver { ); const parsedRecords = answers.map(a => { - if (type === 'SRV') return parseSrvRecord(a.data); - if (type === 'TXT') return parsePointerTxt(a.data); + if (typeCode === DNS_TYPES.SRV) { const record = parseSrvRecord(a.data); if (!record) refuse('dns-invalid-srv'); return record; } + if (typeCode === DNS_TYPES.TXT) return parsePointerTxt(a.data); return a.data; }).filter(Boolean); const record = { name, type, - status: body.Status ?? 0, + status: body.Status, ttl_seconds: ttlSeconds, rtt_ms: rttMs, cache_hit_inferred: cacheHitInferred, + rawRecords: answers.map(a => a.data), records: parsedRecords }; this.history.push(record); + if (this.history.length > 128) this.history.shift(); return record; } @@ -186,11 +311,32 @@ export class DohResolver { async writeDuckDnsTxt({ subdomain, token, txtValue }) { if (!this.fetchImpl) throw new Error('fetch unavailable'); const url = `https://www.duckdns.org/update?domains=${encodeURIComponent(subdomain)}&token=${encodeURIComponent(token)}&txt=${encodeURIComponent(txtValue)}`; + this.admission.reserve('refresh', { requests: 1, transferBytes: wireBytes(url) + this.maxResponseBytes }); const res = await this.fetchImpl(url); - const text = (await res.text()).trim(); + const text = (await readBoundedText(res, this.maxResponseBytes)).trim(); return { ok: text === 'OK', response: text, fqdn: `${subdomain}.duckdns.org` }; } + /** Exact scoped lookup. An incomplete listing is never evidence of absence. */ + async listCloudflareRecords({ zoneId, apiToken, name, apiBase = 'https://api.cloudflare.com/client/v4' }) { + if (!this.fetchImpl) throw new Error('fetch unavailable'); + const url = `${apiBase}/zones/${encodeURIComponent(zoneId)}/dns_records?type=TXT&name=${encodeURIComponent(name)}&match=all&page=1&per_page=100`; + this.admission.reserve('retrieve', { requests: 1, transferBytes: wireBytes(url) + this.maxResponseBytes }); + const res = await this.fetchImpl(url, { headers: { authorization: `Bearer ${apiToken}` } }); + const json = JSON.parse(await readBoundedText(res, this.maxResponseBytes)); + if (!res.ok || json?.success !== true || !Array.isArray(json.result)) refuse('dns-lookup-failed'); + const info = json.result_info; + if (!info || info.page !== 1 || !Number.isSafeInteger(info.total_count) || info.total_count < 0 + || !Number.isSafeInteger(info.total_pages) || info.total_pages < 0 || info.total_pages > 1 + || info.count !== json.result.length || info.total_count !== json.result.length) refuse('dns-listing-incomplete'); + if (json.result.length > 1) refuse('dns-record-conflict'); + for (const record of json.result) { + if (record.type !== 'TXT' || record.name !== name || typeof record.content !== 'string' + || typeof record.id !== 'string' || !/^[A-Za-z0-9_-]{1,128}$/.test(record.id)) refuse('dns-record-conflict'); + } + return json.result.map(({ id, name, type, content }) => ({ id, name, type, content })); + } + /** * Objective O2 & Claim C2: Publish or update a low-TTL Cloudflare DNS SRV or TXT record * (supports epoch-prefixed subdomains `._stitch._udp.` to bypass local cache opacity). @@ -216,42 +362,55 @@ export class DohResolver { ttl = 60, apiBase = 'https://api.cloudflare.com/client/v4' }) { - if (!this.fetchImpl) throw new Error('fetch unavailable'); - const url = recordId - ? `${apiBase}/zones/${encodeURIComponent(zoneId)}/dns_records/${encodeURIComponent(recordId)}` - : `${apiBase}/zones/${encodeURIComponent(zoneId)}/dns_records`; - const body = { - type, - name, - ttl: Math.max(30, Number(ttl) || 60) - }; - if (type === 'SRV' && srvData) { - body.data = { - priority: Number(srvData.priority ?? 10), - weight: Number(srvData.weight ?? 10), - port: Number(srvData.port ?? 443), - target: String(srvData.target) + let url, body; + try { + if (!this.fetchImpl) throw new Error('fetch unavailable'); + url = recordId + ? `${apiBase}/zones/${encodeURIComponent(zoneId)}/dns_records/${encodeURIComponent(recordId)}` + : `${apiBase}/zones/${encodeURIComponent(zoneId)}/dns_records`; + body = { + type, + name, + ttl: Math.max(30, Number(ttl) || 60) }; - } else { - body.content = String(content); + if (type === 'SRV' && srvData) { + body.data = { + priority: Number(srvData.priority ?? 10), + weight: Number(srvData.weight ?? 10), + port: Number(srvData.port ?? 443), + target: String(srvData.target) + }; + } else { + body.content = String(content); + } + this.admission.reserve('refresh', { requests: 1, transferBytes: wireBytes(url) + wireBytes(body) + this.maxResponseBytes }); + } catch (cause) { + const error = new Error(cause.message, { cause }); + error.code = cause.code; + // A host adapter fact, set only before fetch invocation. No provider + // failure, timeout or lost response is classified as definite non-dispatch. + error.effectDispatched = false; + throw error; + } + // Only pre-dispatch validation/admission errors throw. Once attempted, a lost + // or malformed response is uncertainty, never evidence that no write occurred. + try { + const res = await this.fetchImpl(url, { + method: recordId ? 'PUT' : 'POST', + headers: { authorization: `Bearer ${apiToken}`, 'content-type': 'application/json' }, + body: JSON.stringify(body) + }); + const json = res.body?.getReader || res.text + ? JSON.parse(await readBoundedText(res, this.maxResponseBytes)) : await res.json(); + if (json?.success === false && [400, 401, 403, 404, 422].includes(res.status)) return { ok: false, outcome: 'refused', errors: json.errors || [] }; + if (json?.success === false) return { ok: false, outcome: 'unknown' }; + if (!res.ok || json?.success !== true || typeof json?.result?.id !== 'string' + || !/^[A-Za-z0-9_-]{1,128}$/.test(json.result.id) + || (recordId && json.result.id !== recordId)) return { ok: false, outcome: 'unknown' }; + return { ok: true, outcome: 'published', id: json.result.id, name, type, ttl: body.ttl, errors: [] }; + } catch { + return { ok: false, outcome: 'unknown' }; } - const res = await this.fetchImpl(url, { - method: recordId ? 'PUT' : 'POST', - headers: { - authorization: `Bearer ${apiToken}`, - 'content-type': 'application/json' - }, - body: JSON.stringify(body) - }); - const json = await res.json(); - return { - ok: Boolean(json?.success), - id: json?.result?.id || recordId, - name, - type, - ttl: body.ttl, - errors: json?.errors || [] - }; } /** @@ -305,7 +464,7 @@ export class DohResolver { * Objective O5: Pre-registered JSONL Experiment Trial Logger for C1-C8 falsification runs. */ export class ExperimentTrialLogger { - constructor({ contractVersion = '1.0.0' } = {}) { + constructor({ contractVersion = '1.1.0' } = {}) { this.contractVersion = contractVersion; this.entries = []; } @@ -322,26 +481,27 @@ export class ExperimentTrialLogger { } summarizeC1(networkPairClass = null) { - const c1 = this.entries.filter( - e => e.claim_id === 'C1' && (!networkPairClass || e.network_pair_class === networkPairClass) + const rows = this.entries.filter( + e => e.claim_id === 'C1' && e.contract_version === '1.1.0' && (!networkPairClass || e.network_pair_class === networkPairClass) ); + const c1 = rows.filter(c1SampleStructurallyValid), invalidSamples = rows.length - c1.length; if (c1.length === 0) { - return { trials: 0, direct_success_rate: 0, median_ice_setup_sec: 0, c1_status: 'UNTESTED' }; + return { trials: 0, invalid_samples: invalidSamples, direct_success_rate: 0, median_ice_setup_sec: null, + c1_status: invalidSamples ? 'INSUFFICIENT_EVIDENCE' : 'UNTESTED' }; } - const successes = c1.filter(e => e.success && !e.used_turn).length; + const successes = c1.filter(e => e.success === true && c1SampleQualified(e)).length; const directSuccessRate = Number((successes / c1.length).toFixed(3)); - const sortedIce = c1 - .filter(e => typeof e.ice_setup_sec === 'number') - .map(e => e.ice_setup_sec) - .sort((a, b) => a - b); - const medianIce = sortedIce.length > 0 ? sortedIce[Math.floor(sortedIce.length / 2)] : 0; - const c1Status = c1.length < 30 - ? 'INCOMPLETE_N_LT_30' - : (directSuccessRate >= 0.60 && medianIce <= 10.0 ? 'VERIFIED' : 'REFUTED'); + const sortedIce = c1.map(e => e.ice_setup_sec === null ? Infinity : e.ice_setup_sec).sort((a, b) => a - b); + const middle = Math.floor(sortedIce.length / 2); + const median = sortedIce.length % 2 ? sortedIce[middle] : (sortedIce[middle - 1] + sortedIce[middle]) / 2; + const medianIce = Number.isFinite(median) ? Number(median.toFixed(2)) : null; + const c1Status = c1.length < 30 ? invalidSamples ? 'INSUFFICIENT_EVIDENCE' : 'INCOMPLETE_N_LT_30' + : (directSuccessRate >= 0.60 && medianIce !== null && medianIce <= 10.0 ? 'THRESHOLDS_MET' : 'THRESHOLDS_NOT_MET'); return { trials: c1.length, + invalid_samples: invalidSamples, direct_success_rate: directSuccessRate, - median_ice_setup_sec: Number(medianIce.toFixed(2)), + median_ice_setup_sec: medianIce, c1_status: c1Status }; } @@ -351,21 +511,51 @@ export class ExperimentTrialLogger { } } +/** Local identities must fit the same strict JSON profile used on the wire. + * Validate before closing a previous live session or allocating a provider. + */ +function validateTransportIdentity(peerId, channelKey) { + if (typeof peerId !== 'string' || typeof channelKey !== 'string') throw new TypeError('Transport identities must be strings'); + if (peerId.length === 0 || peerId.length > 128) refuse('relay-peer-identity'); + snapshotRelayMessage({ kind: 'announce', from: peerId, channelKey }); +} + /** * Multi-Peer WebRTC DataChannel Mesh + Warm Relay Cache (`ntfy.sh` ring buffer). * Supports N concurrent peers, binary/JSON replication, and raw Ethernet frame bridging for v86. */ export class WebRtcTransportNode { constructor(options = {}) { + this.admission = options.admission ?? new ResourceAdmission(); + this.channelPool = { queued: 0, messages: 0, receiving: 0, assemblies: 0 }; + this.relayPending = new Map(); + this.relayVerificationPool = new Map(); + this.relaySession = null; + this.signalAssembler = null; + this.warmPollBusy = null; + this.publicRelayConsent = options.publicRelayConsent ?? (() => true); + if (typeof this.publicRelayConsent !== 'function') throw new TypeError('Relay consent must be a callback'); + this.maxRelayResponseBytes = 2 * 1024 * 1024; + this.maxDataMessageBytes = 512 * 1024; + this.maxPeers = 64; this.peerId = options.peerId || ('node-' + Math.random().toString(36).slice(2, 8)); this.channelKey = options.channelKey ?? 'syntra-uor-bus-01'; + validateTransportIdentity(this.peerId, this.channelKey); + this.signaling = new SignalSession(this.channelKey, { maxPeers: this.maxPeers }); + this.signalSigning = new Map(); + this.signalTail = Promise.resolve(); this.heartbeatIntervalMs = options.heartbeatIntervalMs ?? 5000; + this.iceServers = iceServerConfiguration(options.iceServers ?? DEFAULT_ICE_SERVERS); + this.publicSignaling = options.publicSignaling ?? true; + if (typeof this.publicSignaling !== 'boolean') throw new TypeError('Public signaling requires an explicit Boolean'); this.networkPairClass = options.networkPairClass ?? 'declared-pair'; this.trialLogger = options.trialLogger ?? null; this.onEvent = options.onEvent ?? (() => {}); /** @type {Map} */ this.peers = new Map(); + this.generation = 0; + this.closed = false; this.bc = null; this.ws = null; this.hbTimer = null; @@ -375,6 +565,13 @@ export class WebRtcTransportNode { this.bytesReceived = 0; } + // Display labels are not authenticated routing identities. + get routingPeerId() { return this.signaling.id ?? this.peerId; } + + get lifecycle() { + return { generation: this.generation, closed: this.closed, canConnect: true, canSend: transportCanSend(this) }; + } + emit(type, data = {}) { this.onEvent({ type, @@ -404,12 +601,22 @@ export class WebRtcTransportNode { } getOrCreatePeer(remoteId, initiator = false) { + if (this.closed) refuse('transport-closed'); let entry = this.peers.get(remoteId); if (entry && entry.pc && entry.pc.connectionState !== 'closed' && entry.pc.connectionState !== 'failed') { return entry; } - const pc = new RTCPeerConnection({ iceServers: DEFAULT_ICE_SERVERS }); + if (entry) { + const previousSession = captureTransport(this); + this.disposePeer(remoteId, entry, 'peer-replaced'); + if (!transportSessionCurrent(this, previousSession)) refuse('transport-session-changed'); + // Disposal observers may have installed a replacement synchronously. + if (this.peers.has(remoteId)) return this.getOrCreatePeer(remoteId, initiator); + } + if (!transportPeerAllocationAllowed(this)) refuse('peer-capacity'); + this.admission.reserve('refresh', { requests: 1 }); + const pc = new RTCPeerConnection({ iceServers: this.iceServers }); entry = { pc, dc: null, @@ -419,11 +626,23 @@ export class WebRtcTransportNode { iceSetupSec: null, usedTurn: false, heartbeatsPassed: 0, + lastHeartbeatSeq: null, + pendingHeartbeats: new Map(), + c1Deadline: null, + statsDeadline: null, + c1Finalizing: false, c1Logged: false }; this.peers.set(remoteId, entry); + const callback = captureTransport(this, remoteId); + const current = () => transportPeerCurrent(this, callback, remoteId, entry); + entry.c1Deadline = setTimeout(() => { + if (current()) this.finishConnectionTrial(remoteId, entry, performance.now(), false, false, 'heartbeat-deadline'); + }, 10000); + entry.c1Deadline?.unref?.(); pc.onicecandidate = e => { + if (!current()) return; if (e.candidate) { const raw = e.candidate.candidate || ''; const candidateType = raw.includes(' typ relay ') @@ -433,69 +652,97 @@ export class WebRtcTransportNode { : 'host'; if (candidateType === 'relay') entry.usedTurn = true; this.emit('ice_candidate', { remoteId, candidateType }); + if (!current()) return; this.sendSignal({ kind: 'ice', to: remoteId, candidate: e.candidate }); } }; pc.oniceconnectionstatechange = () => { + if (!current()) return; const state = pc.iceConnectionState || 'closed'; this.emit('ice_state', { remoteId, state }); + if (!current()) return; if (state === 'disconnected' || state === 'failed' || state === 'closed') { - if (!entry.c1Logged && this.trialLogger) { - entry.c1Logged = true; - this.trialLogger.logTrial('C1', { - remote_peer: remoteId, - network_pair_class: this.networkPairClass, - success: false, - used_turn: entry.usedTurn, - ice_setup_sec: entry.iceSetupSec ?? Number(((performance.now() - entry.startedAtMs) / 1000).toFixed(2)), - heartbeats_passed: entry.heartbeatsPassed, - reason: `ice_${state}` - }); - } - this.peers.delete(remoteId); - this.emit('peer_disconnected', { remoteId, state }); + this.disposePeer(remoteId, entry, `ice_${state}`, true); + if (transportSessionCurrent(this, callback) && !this.peers.has(remoteId)) this.emit('peer_disconnected', { remoteId, state }); } }; pc.ondatachannel = e => { + if (!current()) { e.channel.close(); return; } this.bindDataChannel(remoteId, e.channel); }; if (initiator) { - const dc = pc.createDataChannel('uor-mesh', { ordered: true }); + const dc = pc.createDataChannel('uor-mesh', { ordered: true, protocol: CHANNEL_PROTOCOL }); this.bindDataChannel(remoteId, dc); } return entry; } + disposePeer(remoteId, entry, reason, recordTrial = false) { + if (entry.disposed) return; + // Fence callbacks before any close/dispose observer can run synchronously. + // A late cleanup owns only its captured entry, never a newer replacement. + if (this.peers.get(remoteId) === entry) this.peers.delete(remoteId); + entry.disposed = true; + if (entry.c1Deadline != null) clearTimeout(entry.c1Deadline); + if (entry.statsDeadline != null) clearTimeout(entry.statsDeadline); + entry.c1Deadline = entry.statsDeadline = null; + entry.pendingHeartbeats?.clear(); + try { + if (recordTrial) this.finishConnectionTrial(remoteId, entry, performance.now(), false, false, reason); + } finally { + entry.c1Logged = true; + try { entry.flow?.dispose(reason); } + finally { + try { entry.dc?.close(); } + finally { entry.pc?.close(); } + } + } + } + bindDataChannel(remoteId, channel) { const entry = this.peers.get(remoteId); - if (entry) entry.dc = channel; + if (!entry || this.closed) { channel.close(); return; } + entry.flow?.dispose('channel-replaced'); + entry.dc = channel; + entry.pendingHeartbeats ??= new Map(); + entry.pendingHeartbeats.clear(); + entry.lastHeartbeatSeq = null; + entry.heartbeatsPassed = 0; + const callback = captureTransport(this, remoteId); + const current = () => transportChannelCurrent(this, callback, remoteId, entry, channel); + const flow = new ChannelFlow({ channel, pc: entry.pc, current, admission: this.admission, pool: this.channelPool, + onMessage: msg => { if (current()) this.handleDataMessage(remoteId, msg); }, + onSent: bytes => { this.bytesSent += bytes; }, + onResult: result => { this.emit('channel_send_result', { remoteId, generation: callback.generation, ...result }); } }); + entry.flow = flow; channel.onopen = () => { + if (!current()) return; + flow.drain(); if (entry && entry.iceSetupSec === null) { - entry.iceSetupSec = Number(((performance.now() - entry.startedAtMs) / 1000).toFixed(2)); + entry.iceSetupSec = (performance.now() - entry.startedAtMs) / 1000; } this.emit('channel_open', { remoteId, label: channel.label, iceSetupSec: entry?.iceSetupSec ?? 0 }); - this.startHeartbeat(); + if (current()) this.startHeartbeat(); }; channel.onclose = () => { - this.peers.delete(remoteId); - this.emit('channel_close', { remoteId }); + if (!current()) return; + this.disposePeer(remoteId, entry, 'channel-closed', true); + if (transportSessionCurrent(this, callback) && !this.peers.has(remoteId)) this.emit('channel_close', { remoteId }); }; + channel.onerror = () => { if (current()) flow.fail('channel-error-unknown'); }; + channel.onmessage = e => { - const rawLen = typeof e.data === 'string' ? e.data.length : (e.data?.byteLength || 0); + if (!current()) return; + const rawLen = typeof e.data === 'string' ? wireBytes(e.data) : (e.data?.byteLength || 0); this.bytesReceived += rawLen; - try { - const msg = JSON.parse(e.data); - this.handleDataMessage(remoteId, msg); - } catch { - // Ignore malformed frame - } + flow.receive(e.data); }; } @@ -504,20 +751,26 @@ export class WebRtcTransportNode { const entry = this.peers.get(remoteId); if (entry) entry.lastSeenSec = nowMs / 1000; + if (!msg || typeof msg !== 'object') return; if (msg.type === 'ping') { - this.sendToPeer(remoteId, { - type: 'pong', - seq: msg.seq, - sentAtMs: msg.sentAtMs, - from: this.peerId - }); + if (msg.from !== remoteId || !Number.isSafeInteger(msg.seq) || msg.seq < 0 || !Number.isFinite(msg.sentAtMs)) return; + this.sendToPeer(remoteId, { type: 'pong', seq: msg.seq, sentAtMs: msg.sentAtMs, from: this.routingPeerId }); this.recordHeartbeat(remoteId, nowMs, null); } else if (msg.type === 'pong') { - const rttMs = msg.sentAtMs ? nowMs - msg.sentAtMs : null; - if (entry && rttMs !== null) entry.rttMs = rttMs; - this.recordHeartbeat(remoteId, nowMs, rttMs); + const probe = entry?.pendingHeartbeats.get(msg.seq), observedAt = performance.now(); + const correlated = !!probe && msg.from === remoteId && probe.sentAtMs === msg.sentAtMs + && probe.generation === this.generation && probe.channel === entry.dc && probe.monotonicAt <= observedAt; + if (probe) entry.pendingHeartbeats.delete(msg.seq); + if (correlated) { + const rttMs = observedAt - probe.monotonicAt; + entry.rttMs = rttMs; + observeC1Probe(entry, msg.seq, observedAt, true); + this.recordHeartbeat(remoteId, nowMs, rttMs); + if (!entry.c1Logged && !entry.c1Finalizing && c1ConnectionQualified(entry, observedAt)) { + this.observeConnectionPath(remoteId, entry, observedAt); + } + } } else { - // Forward application payload (uor_shard, uor_sync_req, compute_task, compute_ckpt, eth_frame) this.emit('mesh_message', { from: remoteId, msg }); } } @@ -526,37 +779,70 @@ export class WebRtcTransportNode { const nowSec = nowMs / 1000; this.heartbeatTimestampsSec.push(nowSec); if (this.heartbeatTimestampsSec.length > 64) this.heartbeatTimestampsSec.shift(); - const entry = this.peers.get(remoteId); - if (entry) { - entry.heartbeatsPassed++; - if (!entry.c1Logged && entry.heartbeatsPassed >= 10) { - entry.c1Logged = true; - const c1Payload = { - remote_peer: remoteId, - network_pair_class: this.networkPairClass, - success: (entry.iceSetupSec ?? 0) <= 10.0 && !entry.usedTurn, - used_turn: entry.usedTurn, - ice_setup_sec: entry.iceSetupSec ?? 0, - heartbeats_passed: entry.heartbeatsPassed - }; - if (this.trialLogger) this.trialLogger.logTrial('C1', c1Payload); - this.emit('c1_trial_complete', c1Payload); - } + this.emit('heartbeat', { remoteId, count: this.heartbeatTimestampsSec.length, rttMs, timestampSec: nowSec }); + } + + rememberHeartbeatProbe(entry, payload) { + if (!(entry.pendingHeartbeats instanceof Map) || payload.type !== 'ping' || !Number.isSafeInteger(payload.seq) || payload.seq < 0 || !Number.isFinite(payload.sentAtMs)) return; + entry.pendingHeartbeats.set(payload.seq, { sentAtMs: payload.sentAtMs, monotonicAt: performance.now(), generation: this.generation, channel: entry.dc }); + while (entry.pendingHeartbeats.size > 64) entry.pendingHeartbeats.delete(entry.pendingHeartbeats.keys().next().value); + } + + finishConnectionTrial(remoteId, entry, observedAt, selectedPathObserved, usedRelay, reason) { + if (entry.c1Logged) return; + entry.c1Logged = true; + if (entry.c1Deadline !== null) clearTimeout(entry.c1Deadline); + if (entry.statsDeadline !== null) clearTimeout(entry.statsDeadline); + entry.c1Deadline = entry.statsDeadline = null; + const payload = { remote_peer: remoteId, network_pair_class: this.networkPairClass, + success: c1DirectSuccess(entry, observedAt, selectedPathObserved, usedRelay), + connection_qualified: c1ConnectionQualified(entry, observedAt), selected_path_observed: selectedPathObserved, + ordered_channel: entry.dc?.ordered === true, used_turn: usedRelay, + ice_setup_sec: entry.iceSetupSec, + qualification_elapsed_sec: (observedAt - entry.startedAtMs) / 1000, + heartbeats_passed: entry.heartbeatsPassed, reason }; + this.trialLogger?.logTrial('C1', payload); + this.emit('c1_trial_complete', payload); + } + + async observeConnectionPath(remoteId, entry, qualifiedAt) { + entry.c1Finalizing = true; + if (entry.c1Deadline !== null) clearTimeout(entry.c1Deadline); + entry.c1Deadline = null; + const callback = captureTransport(this, remoteId); + const current = () => transportPeerCurrent(this, callback, remoteId, entry) && !entry.c1Logged; + // Local RTC stats observation adds no traffic. A bounded missing observation + // cannot turn an unobserved path into a direct-connect success. + entry.statsDeadline = setTimeout(() => { + if (current()) this.finishConnectionTrial(remoteId, entry, qualifiedAt, false, false, 'selected-path-unobserved'); + }, 1000); + entry.statsDeadline?.unref?.(); + try { + const reports = await entry.pc.getStats(); + if (!current()) return; + const rows = [...reports.values()]; + const selected = new Set(rows.filter(row => row.type === 'transport' && typeof row.selectedCandidatePairId === 'string').map(row => row.selectedCandidatePairId)); + const pair = selected.size === 1 ? reports.get([...selected][0]) : null; + const local = pair && reports.get(pair.localCandidateId), remote = pair && reports.get(pair.remoteCandidateId); + const validType = value => ['host', 'srflx', 'prflx', 'relay'].includes(value); + const observed = pair?.type === 'candidate-pair' && pair.state === 'succeeded' + && local?.type === 'local-candidate' && remote?.type === 'remote-candidate' + && validType(local.candidateType) && validType(remote.candidateType); + const relay = observed && (local.candidateType === 'relay' || remote.candidateType === 'relay'); + this.finishConnectionTrial(remoteId, entry, qualifiedAt, observed, relay, observed ? relay ? 'relay-path-observed' : 'direct-path-observed' : 'selected-path-unobserved'); + } catch { + if (current()) this.finishConnectionTrial(remoteId, entry, qualifiedAt, false, false, 'selected-path-unobserved'); } - this.emit('heartbeat', { - remoteId, - count: this.heartbeatTimestampsSec.length, - rttMs, - timestampSec: nowSec - }); } startHeartbeat() { - if (this.hbTimer) return; + if (this.closed || this.hbTimer) return; + const callback = captureTransport(this); this.hbTimer = setInterval(() => { + if (!transportSessionCurrent(this, callback)) return; this.seq++; const now = Date.now(); - this.broadcast({ type: 'ping', seq: this.seq, sentAtMs: now, from: this.peerId }); + this.broadcast({ type: 'ping', seq: this.seq, sentAtMs: now, from: this.routingPeerId }); }, this.heartbeatIntervalMs); } @@ -567,125 +853,265 @@ export class WebRtcTransportNode { } } - sendToPeer(remoteId, payloadObj) { + sendToPeer(remoteId, payloadObj, options = {}) { const entry = this.peers.get(remoteId); if (!entry || !entry.dc || entry.dc.readyState !== 'open') return false; - const raw = JSON.stringify(payloadObj); - entry.dc.send(raw); - this.bytesSent += raw.length; - return true; + if (!entry.flow) this.bindDataChannel(remoteId, entry.dc); + return entry.flow.enqueue(payloadObj, { ...options, onSubmitted: snapshot => this.rememberHeartbeatProbe(entry, snapshot) }); } - broadcast(payloadObj) { - const raw = JSON.stringify(payloadObj); - let sentCount = 0; - for (const { dc } of this.openPeers()) { - try { - dc.send(raw); - this.bytesSent += raw.length; - sentCount++; - } catch {} + /** Count means accepted into bounded local queues, never delivered. */ + broadcast(payloadObj, options = {}) { + let accepted = 0; + for (const { remoteId } of this.openPeers()) { + try { if (this.sendToPeer(remoteId, payloadObj, options)) accepted++; } + catch (error) { this.emit('policy_refused', { remoteId, code: error.code || 'channel-send-refused' }); } } - return sentCount; + return accepted; } - /** - * Publish a state/shard envelope into the public warm relay ring-buffer (`ntfy.sh`) - * so newly opened browsers can recover state even after a 0-peer gap (all tabs closed). - */ - async publishWarmEnvelope(envelopeObj) { - if (typeof fetch === 'undefined') return false; + /** Queue is an in-flight memory bound, not a second resource ledger. */ + _queueRelay(snapshot, scope, consentCurrent, localBroadcast = null) { + const callback = captureTransport(this); + if (!transportSessionCurrent(this, callback) || !consentCurrent()) refuse('relay-not-authorized'); + const retained = [...this.relayPending.values()].reduce((sum, job) => sum + job.snapshot.byteLength, 0); + if (!relayAdmissionAllowed(relayCapacity(this.relayPending.size, retained), snapshot.byteLength)) refuse('relay-outbound-capacity'); + this.relaySession ??= newRelaySession(); + const job = { snapshot, scope, callback, session: this.relaySession, channelKey: this.channelKey, + consentCurrent, localBroadcast, + fetchImpl: scope === 'signal' && !this.publicSignaling ? null : globalThis.fetch?.bind(globalThis), + controller: new AbortController(), timedOut: false, + url: `https://ntfy.sh/${scope === 'warm' ? this.warmCacheTopic() : this.signalTopic()}` }; + this.relayPending.set(job, job); + job.deadline = setTimeout(() => { job.timedOut = true; job.controller.abort(); }, RELAY_LIMITS.requestTimeout); + job.deadline.unref?.(); + job.completion = this._dispatchRelay(job).finally(() => { clearTimeout(job.deadline); this.relayPending.delete(job); }); + return job.completion; + } + + async _dispatchRelay(job) { + const current = () => relayEffectAllowed(this, job.callback.generation, + !job.controller.signal.aborted && this.relaySession === job.session && transportSessionCurrent(this, job.callback), job.consentCurrent()); + let planned = 0, attempted = 0, acknowledged = 0, httpStatus = null, outcome = 'cancelled'; try { - const raw = JSON.stringify({ ...envelopeObj, from: this.peerId, tsMs: Date.now() }); - this.bytesSent += raw.length; - const res = await fetch(`https://ntfy.sh/${this.warmCacheTopic()}`, { - method: 'POST', - body: raw - }); - return res.ok; - } catch { + const framed = job.fetchImpl ? await frameRelayMessage(job.snapshot, { + channelKey: job.channelKey, session: job.session, scope: job.scope }) : { frames: [], bytes: 0 }; + planned = framed.frames.length; + if (!current()) { outcome = job.timedOut ? 'timeout' : 'cancelled'; return false; } + const local = !!job.localBroadcast && this.bc === job.localBroadcast; + // One atomic reservation includes every serialized frame's metadata and + // every actual destination. A failed/partial batch never receives a refund. + const requests = planned + (local ? 1 : 0); + if (!requests) { outcome = 'unavailable'; return false; } + this.admission.reserve(job.scope === 'warm' ? 'place' : 'refresh', { requests, + transferBytes: framed.bytes + (local ? job.snapshot.byteLength : 0) }); + if (local && current() && this.bc === job.localBroadcast) { + job.localBroadcast.postMessage(JSON.parse(job.snapshot.raw)); + this.bytesSent += job.snapshot.byteLength; + } + for (const body of framed.frames) { + if (!current()) { outcome = acknowledged ? 'partial' : (job.timedOut ? 'timeout' : 'cancelled'); return false; } + attempted++; + this.bytesSent += wireBytes(body); + let response; + try { + response = await job.fetchImpl(job.url, { method: 'POST', body, signal: job.controller.signal, + headers: { 'Content-Type': 'text/plain; charset=utf-8', Cache: job.scope === 'signal' ? 'no' : 'yes' } }); + } catch { + outcome = acknowledged ? 'partial' : 'unknown'; return false; + } + httpStatus = response.status ?? null; + if (!response.ok) { outcome = acknowledged ? 'partial' : 'refused'; return false; } + acknowledged++; + } + if (!current()) { outcome = acknowledged ? 'partial' : (job.timedOut ? 'timeout' : 'cancelled'); return false; } + outcome = planned ? 'acknowledged' : 'local-only'; + return planned > 0 && acknowledged === planned; + } catch (error) { + outcome = acknowledged ? 'partial' : 'refused'; + if (transportSessionCurrent(this, job.callback)) this.emit('policy_refused', { code: error.code || 'relay-failed' }); return false; + } finally { + // HTTP acknowledgement is not recipient delivery or a retention receipt. + if (transportSessionCurrent(this, job.callback)) this.emit('relay_publish_result', { + scope: job.scope, outcome, planned, attempted, acknowledged, httpStatus, timedOut: job.timedOut }); } } - /** - * Poll the warm relay ring-buffer (`?poll=1&since=30m`) to recover shards/checkpoints - * that were published before all previous browsers closed. + /** All frames must be HTTP-acknowledged. This is not a durability receipt. */ + async publishWarmEnvelope(envelopeObj, { publicData = false, consentCurrent = () => publicData } = {}) { + if (publicData !== true || !consentCurrent() || !this.publicRelayConsent() || !transportCanSend(this) || typeof fetch === 'undefined') return false; + try { + const snapshot = snapshotRelayMessage({ ...envelopeObj, from: this.peerId, tsMs: Date.now() }); + return await this._queueRelay(snapshot, 'warm', () => publicData === true && consentCurrent() && this.publicRelayConsent()); + } catch (error) { + this.emit('policy_refused', { code: error.code || 'relay-failed' }); + return false; + } + } + + /** One bounded poll snapshot. Incomplete messages are never exposed, and are + * released at the end of this poll. A later poll may recover a complete copy. + * The 30-minute application window does not promise provider retention. */ - async fetchWarmEnvelopes(sinceWindow = '30m') { - if (typeof fetch === 'undefined') return []; + async fetchWarmEnvelopes(sinceWindow = '30m', { publicData = false, consentCurrent = () => publicData } = {}) { + if (publicData !== true || !consentCurrent() || !this.publicRelayConsent() || !transportCanSend(this) || typeof fetch === 'undefined') return []; + if (this.warmPollBusy) { this.emit('policy_refused', { code: 'relay-poll-busy' }); return []; } + const token = { controller: new AbortController() }, callback = captureTransport(this); + const current = () => !token.controller.signal.aborted && transportSessionCurrent(this, callback) && publicData === true && consentCurrent() && this.publicRelayConsent(); + const assembler = new RelayReassembler({ channelKey: this.channelKey, scope: 'warm', admission: this.admission, + current, consentCurrent, chargeIngress: false, verificationPool: this.relayVerificationPool }); + token.assembler = assembler; + token.deadline = setTimeout(() => token.controller.abort(), RELAY_LIMITS.requestTimeout); + token.deadline.unref?.(); + this.warmPollBusy = token; try { - const res = await fetch(`https://ntfy.sh/${this.warmCacheTopic()}/json?poll=1&since=${encodeURIComponent(sinceWindow)}`); - if (!res.ok) return []; - const text = await res.text(); - const lines = text.split('\n').filter(Boolean); + if (typeof sinceWindow !== 'string' || !/^(?:[1-9][0-9]{0,5}[smh]|all)$/.test(sinceWindow)) refuse('relay-poll-window'); + const url = `https://ntfy.sh/${this.warmCacheTopic()}/json?poll=1&since=${encodeURIComponent(sinceWindow)}`; + this.admission.reserve('retrieve', { requests: 1, transferBytes: wireBytes(url) + this.maxRelayResponseBytes }); + if (!current()) return []; + const res = await fetch(url, { signal: token.controller.signal }); + if (!current() || !res.ok) return []; + const text = await readBoundedText(res, this.maxRelayResponseBytes); const envelopes = []; - for (const line of lines) { + let offset = 0, refused = 0; + while (offset < text.length && current()) { + let end = text.indexOf('\n', offset); + if (end < 0) end = text.length; + const line = text.slice(offset, end); offset = end + 1; + if (!line) continue; try { + if (line.length > RELAY_EVENT_BYTES || wireBytes(line) > RELAY_EVENT_BYTES) refuse('relay-event-limit'); const outer = JSON.parse(line); - if (outer.event === 'message' && outer.message) { - const inner = JSON.parse(outer.message); - envelopes.push(inner); - } - } catch {} + if (outer.event !== 'message' || typeof outer.message !== 'string' || outer.attachment) continue; + const envelope = await assembler.accept(outer.message); + if (envelope) envelopes.push(envelope); + } catch { refused++; } } + if (!current()) return []; + this.emit('relay_poll_result', { completed: envelopes.length, refused, incomplete: assembler.state.entries }); return envelopes; - } catch { + } catch (error) { + if (transportSessionCurrent(this, callback)) this.emit('policy_refused', { code: error.code || 'relay-poll-failed' }); return []; + } finally { + clearTimeout(token.deadline); assembler.dispose(); + if (this.warmPollBusy === token) this.warmPollBusy = null; } } connect(channelKey = this.channelKey) { - this.channelKey = channelKey; - if (this.bc) this.bc.close(); - if (this.ws) this.ws.close(); + validateTransportIdentity(this.peerId, channelKey); + // Invalidate callbacks before closing: close events may run synchronously. + // Rejoining the same topic is also a new signaling session. + this.close(); + openTransport(this, channelKey); + this.signaling = new SignalSession(channelKey, { maxPeers: this.maxPeers }); + const callback = captureTransport(this); + const current = () => transportSessionCurrent(this, callback); + this.signalAssembler = new RelayReassembler({ channelKey: this.channelKey, scope: 'signal', + admission: this.admission, current, verificationPool: this.relayVerificationPool }); + const signalAssembler = this.signalAssembler; + const receive = msg => { + if (!current()) return; + this.handleSignal(msg).catch(error => { + if (current()) this.emit('signal_error', { code: error.code || 'signaling-failed' }); + }); + }; if (typeof BroadcastChannel !== 'undefined') { this.bc = new BroadcastChannel(`uor:${this.channelKey}`); this.bc.onmessage = e => { - if (e.data && e.data.from !== this.peerId) this.handleSignal(e.data); + if (current() && e.data && e.data.from !== this.peerId) receive(e.data); }; + // Same-origin peers must not wait for the public signaling provider to + // become reachable. Public discovery still announces when its socket opens. + this.sendSignal({ kind: 'announce' }); } - if (typeof WebSocket !== 'undefined') { + if (this.publicSignaling && typeof WebSocket !== 'undefined') { const topic = this.signalTopic(); try { + this.admission.reserve('refresh', { requests: 1 }); this.ws = new WebSocket(`wss://ntfy.sh/${topic}/ws`); this.ws.onopen = () => { + if (!current()) return; this.emit('signaling_ready', { topic, channelKey: this.channelKey }); + if (!current()) return; this.sendSignal({ kind: 'announce' }); }; - this.ws.onmessage = e => { + this.ws.onmessage = async e => { + if (!current()) return; try { + if (typeof e.data !== 'string' || e.data.length > RELAY_EVENT_BYTES || wireBytes(e.data) > RELAY_EVENT_BYTES) return; const env = JSON.parse(e.data); - if (env.event !== 'message' || !env.message) return; - const msg = JSON.parse(env.message); - if (msg && msg.from !== this.peerId) this.handleSignal(msg); - } catch {} + if (env.event !== 'message' || typeof env.message !== 'string' || env.attachment) return; + const msg = await signalAssembler.accept(env.message); + if (current() && msg && msg.from !== this.peerId) receive(msg); + } catch (error) { + if (current()) this.emit('relay_frame_refused', { scope: 'signal', code: error.code || 'relay-frame' }); + } }; } catch { this.sendSignal({ kind: 'announce' }); } - } else { + } else if (!this.bc) { this.sendSignal({ kind: 'announce' }); } } - sendSignal(payload) { - const frame = { ...payload, from: this.peerId, channelKey: this.channelKey }; - if (this.bc) this.bc.postMessage(frame); - if (typeof fetch !== 'undefined') { - fetch(`https://ntfy.sh/${this.signalTopic()}`, { - method: 'POST', - body: JSON.stringify(frame) - }).catch(() => {}); + /** True means locally queued, not published or delivered. Result events + * distinguish local-only, HTTP acknowledgements, partial and unknown batches. + */ + sendSignal(payload) { return this.enqueueSignal(payload) !== null; } + + enqueueSignal(payload) { + if (!transportCanSend(this)) return null; + try { + // Snapshot caller-owned browser records before asynchronous cryptography. + const input = snapshotRelayMessage(payload); + const retained = [...this.signalSigning.values()].reduce((n, job) => n + job.bytes, 0) + + [...this.relayPending.values()].reduce((n, job) => n + job.snapshot.byteLength, 0); + if (this.signalSigning.size + this.relayPending.size >= RELAY_LIMITS.entries + || retained + input.byteLength > RELAY_LIMITS.retainedBytes) refuse('signal-queue-limit'); + if (!this.bc && typeof fetch === 'undefined') return null; + const callback = captureTransport(this), session = this.signaling; + const job = { bytes: input.byteLength, completion: null }; + this.signalSigning.set(job, job); + job.completion = this.signalTail.then(async () => { + const signed = await session.sign(JSON.parse(input.raw)); + if (!transportSessionCurrent(this, callback) || session !== this.signaling) return null; + this.signalSigning.delete(job); + return await this._queueRelay(snapshotRelayMessage(signed), 'signal', () => true, this.bc); + }).catch(error => { + if (transportSessionCurrent(this, callback)) this.emit('policy_refused', { code: error.code || error.message || 'signal-failed' }); + return null; + }).finally(() => this.signalSigning.delete(job)); + this.signalTail = job.completion; + return job.completion; + } catch (error) { + this.emit('policy_refused', { code: error.code || 'relay-failed' }); + return null; } } async handleSignal(msg) { - if (msg.to && msg.to !== this.peerId) return; + const session = this.signaling, invocation = captureTransport(this); + return session.receive(msg, async authenticated => { + if (!authenticated || !transportSessionCurrent(this, invocation) || this.signaling !== session) return; + if (authenticated.reply) await this.enqueueSignal(authenticated.reply); + if (!transportSessionCurrent(this, invocation) || this.signaling !== session) return; + if (!authenticated.message) return; + msg = { ...authenticated.message, to: this.peerId }; + if (!msg || msg.channelKey !== this.channelKey || typeof msg.from !== 'string' || msg.from.length === 0 || msg.from.length > 128) return; + try { + parseCanonicalJson(JSON.stringify(msg.from), { maxBytes: 1024, maxDepth: 0, maxEntries: 1, maxStringLength: 128 }); + if (msg.to != null) parseCanonicalJson(JSON.stringify(msg.to), { maxBytes: 1024, maxDepth: 0, maxEntries: 1, maxStringLength: 128 }); + } catch { return; } + if (!transportSignalAllowed(this, msg)) return; const remoteId = msg.from; - if (!remoteId || remoteId === this.peerId) return; + const callback = captureTransport(this, remoteId); + const current = entry => transportPeerCurrent(this, callback, remoteId, entry); const existing = this.peers.get(remoteId); if (existing && existing.dc && existing.dc.readyState === 'open') { @@ -693,18 +1119,27 @@ export class WebRtcTransportNode { } if (msg.kind === 'announce') { + // Both authenticated handshake endpoints discover each other. Only one + // key may offer/create the application channel: two crossing channels + // make each ondatachannel replace the other's still-live receive flow. + if (this.routingPeerId >= remoteId || existing?.pc.localDescription) return; const entry = this.getOrCreatePeer(remoteId, true); const offer = await entry.pc.createOffer(); + if (!current(entry)) return; await entry.pc.setLocalDescription(offer); + if (!current(entry)) return; this.sendSignal({ kind: 'offer', to: remoteId, sdp: entry.pc.localDescription }); } else if (msg.kind === 'offer') { - if (existing && existing.pc.signalingState === 'have-local-offer' && this.peerId < remoteId) { + if (existing && existing.pc.signalingState === 'have-local-offer' && (this.routingPeerId) < remoteId) { return; // Deterministic glare resolution } const entry = this.getOrCreatePeer(remoteId, false); await entry.pc.setRemoteDescription(new RTCSessionDescription(msg.sdp)); + if (!current(entry)) return; const answer = await entry.pc.createAnswer(); + if (!current(entry)) return; await entry.pc.setLocalDescription(answer); + if (!current(entry)) return; this.sendSignal({ kind: 'answer', to: remoteId, sdp: entry.pc.localDescription }); } else if (msg.kind === 'answer') { if (existing && existing.pc.signalingState === 'have-local-offer') { @@ -717,16 +1152,28 @@ export class WebRtcTransportNode { } catch {} } } + }); } close() { + closeTransport(this); + const broadcast = this.bc, socket = this.ws; + this.bc = null; this.ws = null; + this.signaling?.close(); + this.signalSigning?.clear(); + this.signalTail = Promise.resolve(); + this.relaySession = null; + for (const job of this.relayPending.values()) job.controller.abort(); + this.warmPollBusy?.controller.abort(); + this.warmPollBusy?.assembler.dispose(); + this.signalAssembler?.dispose(); + this.signalAssembler = null; this.stopHeartbeat(); - for (const { dc, pc } of this.peers.values()) { - if (dc) dc.close(); - if (pc) pc.close(); - } + const peers = [...this.peers.entries()]; this.peers.clear(); - if (this.bc) this.bc.close(); - if (this.ws) this.ws.close(); + for (const [remoteId, entry] of peers) this.disposePeer(remoteId, entry, 'transport-closed'); + // Close only captured providers: disposal observers may reconnect. + if (broadcast) broadcast.close(); + if (socket) socket.close(); } } diff --git a/src/layer5-transport/relay-framing.js b/src/layer5-transport/relay-framing.js new file mode 100644 index 0000000..b8e6d85 --- /dev/null +++ b/src/layer5-transport/relay-framing.js @@ -0,0 +1,262 @@ +/** Stitch application framing over ntfy's bounded text-message API. + * No attachment URLs are followed. SHA-256 binds reconstructed bytes, not a + * publisher identity, availability, durable retention, or delivery to a peer. + */ +import { model } from '../layer1-uor/generated-model.js'; +import { parseCanonicalJson, sha256Bytes } from '../layer1-uor/custody.js'; +import { natural, record, refuse } from '../layer1-uor/contracts.js'; +import { wireBytes } from '../layer2-schedulers/policy.js'; + +const call = (name, ...args) => model[`Stitch.Relay.${name}`](...args); +const utf8 = new TextEncoder(); +const ascii = value => utf8.encode(value); +const limits = call('limits'); +export const RELAY_LIMITS = Object.freeze(Object.fromEntries(Object.entries(limits).map(([key, value]) => [key, Number(value)]))); +export const RELAY_LIFETIMES = Object.freeze({ signal: Number(call('signalLifetime')), warm: Number(call('warmLifetime')) }); +export const RELAY_EVENT_BYTES = 16 * 1024; +const KEYS = ['v', 'p', 'c', 's', 'm', 't', 'b', 'n', 'i', 'x']; +const JSON_LIMITS = Object.freeze({ maxBytes: RELAY_LIMITS.messageBytes, maxDepth: 32, + maxEntries: Math.floor(RELAY_LIMITS.messageBytes / 2) + 1, maxStringLength: RELAY_LIMITS.messageBytes }); +const hexDigest = value => typeof value === 'string' && /^sha256:[0-9a-f]{64}$/.test(value); +const validPurpose = value => typeof value === 'string' && Object.hasOwn(RELAY_LIFETIMES, value); +const purpose = value => { if (!validPurpose(value)) refuse('relay-purpose'); return value; }; +const objectEnvelope = value => value && typeof value === 'object' && !Array.isArray(value); + +export const relayCapacity = (entries = 0, retainedBytes = 0, tombstones = 0) => ({ entries, retainedBytes, tombstones }); +export const relayAdmissionAllowed = (capacity, bytes) => call('admissionAllowed', limits, capacity, bytes); +export const relayEffectAllowed = (node, capturedGeneration, sessionMatches, consentCurrent) => + call('effectAllowed', node.closed, node.generation, capturedGeneration, sessionMatches, consentCurrent); + +export function newRelaySession() { + if (!globalThis.crypto?.getRandomValues) refuse('relay-crypto-unavailable'); + return Array.from(globalThis.crypto.getRandomValues(new Uint8Array(16)), byte => byte.toString(16).padStart(2, '0')).join(''); +} + +/** JSON is snapshotted before any await; a digest never binds a mutable object. */ +export function snapshotRelayMessage(value) { + const raw = JSON.stringify(value); + if (typeof raw !== 'string') refuse('relay-envelope'); + const bytes = utf8.encode(raw); + if (!bytes.length || bytes.length > RELAY_LIMITS.messageBytes) refuse('relay-message-limit'); + if (!objectEnvelope(parseCanonicalJson(raw, JSON_LIMITS))) refuse('relay-envelope'); + return Object.freeze({ raw, byteLength: bytes.length }); +} + +export async function relayChannel(channelKey) { + if (typeof channelKey !== 'string') refuse('relay-channel'); + // JSON escapes lone UTF-16 surrogates, preserving exact browser topic identity. + const raw = JSON.stringify(channelKey); + if (wireBytes(raw) > RELAY_LIMITS.messageBytes) refuse('relay-channel-limit'); + return sha256Bytes(utf8.encode(raw), 'relay-channel'); +} + +export function encodeBase64Url(bytes) { + let binary = ''; + for (const byte of bytes) binary += String.fromCharCode(byte); + return btoa(binary).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); +} + +export function decodeBase64Url(value) { + if (typeof value !== 'string' || !/^[A-Za-z0-9_-]+$/.test(value) || value.length % 4 === 1 + || value.length > Math.ceil(RELAY_LIMITS.chunkBytes * 4 / 3)) refuse('relay-base64'); + let binary; + try { binary = atob(value.replace(/-/g, '+').replace(/_/g, '/') + '='.repeat((4 - value.length % 4) % 4)); } + catch { refuse('relay-base64'); } + const bytes = Uint8Array.from(binary, character => character.charCodeAt(0)); + // Reject nonzero pad bits, padding and alternate encodings (RFC4648 section3.5). + if (encodeBase64Url(bytes) !== value) refuse('relay-base64'); + return bytes; +} + +export async function frameRelayMessage(snapshot, { channelKey, session, scope, createdAtMs = Date.now() }) { + purpose(scope); natural(createdAtMs); + if (!/^[0-9a-f]{32}$/.test(session)) refuse('relay-session'); + const { raw } = snapshot; + const bytes = utf8.encode(raw); + if (typeof raw !== 'string' || bytes.length !== snapshot.byteLength + || !bytes.length || bytes.length > RELAY_LIMITS.messageBytes) refuse('relay-message-limit'); + // The caller owns this immutable snapshot until framing completes. + const [channel, digest] = await Promise.all([relayChannel(channelKey), sha256Bytes(bytes, 'relay-message')]); + const count = Math.ceil(bytes.length / RELAY_LIMITS.chunkBytes); + if (count > RELAY_LIMITS.frames) refuse('relay-frame-limit'); + const frames = []; + for (let index = 0; index < count; index++) { + const frame = { v: 'stitch/1', p: scope, c: channel, s: session, m: digest, t: createdAtMs, + b: bytes.length, n: count, i: index, + x: encodeBase64Url(bytes.subarray(index * RELAY_LIMITS.chunkBytes, (index + 1) * RELAY_LIMITS.chunkBytes)) }; + const serialized = JSON.stringify(frame); + if (wireBytes(serialized) > RELAY_LIMITS.wireBytes) refuse('relay-wire-limit'); + frames.push(serialized); + } + return { frames, digest, bytes: frames.reduce((sum, frame) => sum + wireBytes(frame), 0) }; +} + +const identity = frame => ({ channel: ascii(frame.c), session: ascii(frame.s), digest: ascii(frame.m), purpose: ascii(frame.p), + created: frame.t, messageBytes: frame.b, frames: frame.n }); +const frameState = (frame, payloadBytes, length) => ({ identity: identity(frame), index: frame.i, payloadBytes, wireBytes: length }); +const keyOf = frame => `${frame.p}:${frame.c}:${frame.s}:${frame.m}`; + +/** Bounded session-local assembler. Active payload buffers, pending inputs and + * completed/rejected tombstones all have independent, explicit ceilings. + * Cleanup uses the local monotonic clock, never a sender-controlled extension. + */ +export class RelayReassembler { + #entries = new Map(); + #tombstones = new Map(); + #capacity = relayCapacity(); + #pendingInputs = 0; + #lastNow = 0; + #generation = 0; + #disposed = false; + #timer = null; + constructor({ channelKey, scope, admission, clock = () => Math.floor(performance.now()), wallClock = Date.now, + current = () => true, consentCurrent = () => true, chargeIngress = true, automaticCleanup = true, verificationPool = new Map() } = {}) { + this.scope = purpose(scope); this.channelKey = channelKey; + this.channel = relayChannel(channelKey); + // A constructor's rejected promise must not become an unhandled rejection. + this.channel.catch(() => {}); + this.admission = admission; + this.clock = clock; this.wallClock = wallClock; + this.current = current; this.consentCurrent = consentCurrent; + this.chargeIngress = chargeIngress; this.automaticCleanup = automaticCleanup; + this.verificationPool = verificationPool; + } + get state() { + this.#prune(this.#now()); + return { entries: Number(this.#capacity.entries), retainedBytes: Number(this.#capacity.retainedBytes), + tombstones: this.#tombstones.size, pendingInputs: this.#pendingInputs, disposed: this.#disposed }; + } + #now() { + const now = this.clock(); natural(now); + if (now < this.#lastNow) refuse('relay-clock-regression'); + this.#lastNow = now; return now; + } + #schedule(now) { + if (this.#timer !== null) clearTimeout(this.#timer); + this.#timer = null; + if (!this.automaticCleanup || this.#disposed) return; + const deadlines = [...this.#entries.values()].filter(entry => !entry.cancelled).map(entry => Math.min(entry.started + RELAY_LIMITS.assemblyAge, entry.expires)) + .concat([...this.#tombstones.values()]); + if (!deadlines.length) return; + this.#timer = setTimeout(() => { + this.#timer = null; + try { this.#prune(this.#now()); } catch { this.dispose(); } + }, Math.max(1, Math.min(...deadlines) - now)); + this.#timer.unref?.(); + } + #retire(key, entry, now) { + if (this.#entries.get(key) !== entry) return; + // A pending host digest still owns the immutable input buffer. Cancellation + // may fence delivery, but cannot release its resident-memory reservation. + if (entry.verificationPending) { entry.cancelled = true; this.#schedule(now); return; } + this.#entries.delete(key); + entry.buffer = null; entry.seen = null; + this.#capacity = call('release', this.#capacity, entry.header.b); + this.#tombstones.set(key, entry.expires); + this.#schedule(now); + } + #prune(now) { + for (const [key, entry] of this.#entries) { + if (now >= entry.started + RELAY_LIMITS.assemblyAge || now >= entry.expires) this.#retire(key, entry, now); + } + for (const [key, expires] of this.#tombstones) if (now >= expires) this.#tombstones.delete(key); + this.#capacity = { ...this.#capacity, tombstones: this.#tombstones.size }; + this.#schedule(now); + } + dispose() { + this.#disposed = true; this.#generation++; + if (this.#timer !== null) clearTimeout(this.#timer); + this.#timer = null; + for (const [key, entry] of this.#entries) this.#retire(key, entry, this.#lastNow); + this.#tombstones.clear(); + this.#capacity = { ...this.#capacity, tombstones: 0 }; + } + /** Returns one complete verified logical envelope, or null. Refusals throw a + * bounded machine-readable error; a corrupt assembly is tombstoned, not retried. + */ + async accept(raw) { + if (this.#disposed || !this.current() || !this.consentCurrent()) return null; + if (typeof raw !== 'string' || raw.length > RELAY_LIMITS.wireBytes) refuse('relay-wire-limit'); + const length = wireBytes(raw); + if (length > RELAY_LIMITS.wireBytes) refuse('relay-wire-limit'); + if (this.#pendingInputs >= RELAY_LIMITS.frames) refuse('relay-input-capacity'); + this.admission?.reserve('retrieve', { computeSteps: 1, ...(this.chargeIngress ? { transferBytes: length } : {}) }); + this.#pendingInputs++; + const generation = this.#generation; + try { + const frame = parseCanonicalJson(raw, { maxBytes: RELAY_LIMITS.wireBytes, maxDepth: 2, maxEntries: 16, + maxStringLength: RELAY_LIMITS.wireBytes }); + record(frame, KEYS); + if (frame.v !== 'stitch/1' || frame.p !== this.scope || !hexDigest(frame.c) || !hexDigest(frame.m) + || typeof frame.s !== 'string' || !/^[0-9a-f]{32}$/.test(frame.s)) refuse('relay-frame'); + for (const field of ['t', 'b', 'n', 'i']) natural(frame[field]); + // Reject count/length before decoding or allocating message-sized buffers. + if (!frame.b || frame.b > RELAY_LIMITS.messageBytes || !frame.n || frame.n > RELAY_LIMITS.frames + || frame.i >= frame.n) refuse('relay-frame-limit'); + const chunk = decodeBase64Url(frame.x); + const state = frameState(frame, chunk.length, length); + const channel = await this.channel; + if (this.#disposed || generation !== this.#generation || !this.current() || !this.consentCurrent()) return null; + const now = this.#now(), wallNow = this.wallClock(); natural(wallNow); + this.#prune(now); + if (!call('frameAllowed', limits, state, ascii(channel), ascii(this.scope), wallNow, RELAY_LIFETIMES[this.scope])) refuse('relay-frame'); + const key = keyOf(frame); + if (this.#tombstones.has(key)) return null; + let entry = this.#entries.get(key); + if (entry && !call('sameIdentity', entry.state.identity, state.identity)) { + this.#retire(key, entry, now); refuse('relay-mixed-message'); + } + if (!entry) { + // Include verification work retained by older transport generations. + const older = [...this.verificationPool.values()].filter(item => item.owner !== this); + const capacity = relayCapacity(Number(this.#capacity.entries) + older.length, + Number(this.#capacity.retainedBytes) + older.reduce((sum, item) => sum + item.bytes, 0), this.#tombstones.size); + if (!relayAdmissionAllowed(capacity, frame.b)) refuse('relay-reassembly-capacity'); + this.admission?.reserve('retrieve', { storageBytes: frame.b, computeSteps: frame.b + frame.n }); + const expires = now + Math.min(RELAY_LIFETIMES[this.scope], Math.max(0, frame.t + RELAY_LIFETIMES[this.scope] - wallNow)); + entry = { header: { b: frame.b }, cancelled: false, verificationPending: false, buffer: new Uint8Array(frame.b), seen: new Uint8Array(frame.n), started: now, expires, + state: { identity: state.identity, receivedFrames: 0, receivedBytes: 0, started: now, last: now, verifying: false } }; + this.#entries.set(key, entry); + this.#capacity = call('admitCapacity', limits, this.#capacity, frame.b); + } + if (entry.cancelled) return null; + const offset = frame.i * RELAY_LIMITS.chunkBytes; + if (entry.seen[frame.i]) { + if (chunk.some((byte, index) => entry.buffer[offset + index] !== byte)) { + this.#retire(key, entry, now); refuse('relay-conflicting-duplicate'); + } + return null; + } + if (!call('appendAllowed', limits, entry.state, state, now, false)) refuse('relay-assembly-state'); + entry.buffer.set(chunk, offset); entry.seen[frame.i] = 1; + entry.state = call('append', limits, entry.state, state, now, false); + this.#schedule(now); + if (!call('ready', entry.state)) return null; + entry.state = call('beginVerification', entry.state); + const bytes = entry.buffer; + let result = null; + try { + const pendingBytes = [...this.verificationPool.values()].reduce((sum, item) => sum + item.bytes, 0); + if (!relayAdmissionAllowed(relayCapacity(this.verificationPool.size, pendingBytes), frame.b)) refuse('relay-verification-capacity'); + entry.verificationPending = true; + this.verificationPool.set(entry, { owner: this, bytes: frame.b }); + const digestVerified = await sha256Bytes(bytes, 'relay-message') === frame.m; + if (!digestVerified) refuse('relay-integrity'); + const decoded = new TextDecoder('utf-8', { fatal: true }).decode(bytes); + const envelope = parseCanonicalJson(decoded, JSON_LIMITS); + const envelopeValid = objectEnvelope(envelope) && typeof envelope.from === 'string' && envelope.from.length > 0 && envelope.from.length <= 128 + && (this.scope !== 'signal' || envelope.channelKey === this.channelKey); + const stillCurrent = !entry.cancelled && !this.#disposed && generation === this.#generation && this.#entries.get(key) === entry && this.current(); + const currentConsent = this.consentCurrent(); + const finishedAt = this.#now(); + if (finishedAt >= entry.started + RELAY_LIMITS.assemblyAge || finishedAt >= entry.expires) return null; + if (call('deliveryAllowed', entry.state, digestVerified, true, !!envelopeValid, stillCurrent, currentConsent)) result = envelope; + else if (!envelopeValid) refuse('relay-envelope'); + return result; + } finally { + entry.verificationPending = false; this.verificationPool.delete(entry); + this.#retire(key, entry, this.#now()); + } + } finally { this.#pendingInputs--; } + } +} diff --git a/src/layer5-transport/signaling.js b/src/layer5-transport/signaling.js new file mode 100644 index 0000000..47c5ca8 --- /dev/null +++ b/src/layer5-transport/signaling.js @@ -0,0 +1,126 @@ +/** Authenticated, session-bound signaling. Key ownership is not human identity. + * Discovery is public; a key is bound to one remote incarnation until reconnect. + */ +import { canonicalBytes, exactKeys } from '../layer1-uor/custody.js'; +import { model } from '../layer1-uor/generated-model.js'; +const PROFILE = 'stitch.signal/1'; +const b64 = bytes => btoa(String.fromCharCode(...bytes)).replaceAll('+', '-').replaceAll('/', '_').replace(/=+$/, ''); +function bytes(value, length) { + if (typeof value !== 'string' || !/^[A-Za-z0-9_-]+$/.test(value)) throw Error('signal-encoding'); + const out = Uint8Array.from(atob(value.replaceAll('-', '+').replaceAll('_', '/')), c => c.charCodeAt(0)); + if (out.length !== length || b64(out) !== value) throw Error('signal-encoding'); + return out; +} +const token = () => b64(crypto.getRandomValues(new Uint8Array(24))); +const encode = value => canonicalBytes(value, { maxBytes: 524288, maxStringLength: 524288 }); +const snapshot = value => JSON.parse(new TextDecoder().decode(encode(value))); +const allowed = new Set(['announce', 'hello', 'ready', 'offer', 'answer', 'ice']); +async function keyId(raw) { return 'key-' + b64(new Uint8Array(await crypto.subtle.digest('SHA-256', raw))); } + +export class SignalSession { + constructor(channelKey, { maxPeers = 64, maxVerifications = 8 } = {}) { + this.channelKey = channelKey; + this.session = token(); + this.maxPeers = maxPeers; + this.maxVerifications = maxVerifications; + this.active = true; + this.verifying = 0; + this.queuedBytes = 0; + this.receiveTail = Promise.resolve(); + this.sequence = 0; + this.peers = new Map(); + this.pending = new Map(); + // Lazy key generation avoids unhandled promises on unused transport nodes. + this.identityPromise = null; + } + identity() { + return this.identityPromise ??= (async () => { + const pair = await crypto.subtle.generateKey({ name: 'Ed25519' }, false, ['sign', 'verify']); + const raw = new Uint8Array(await crypto.subtle.exportKey('raw', pair.publicKey)); + this.id = await keyId(raw); + return { ...pair, publicKeyText: b64(raw), id: this.id }; + })(); + } + close() { this.active = false; this.peers.clear(); this.pending.clear(); } + async sign(payload) { + const copy = snapshot(payload); + if (!allowed.has(copy.kind)) throw Error('signal-kind'); + const identity = await this.identity(); + if (!this.active || this.sequence === Number.MAX_SAFE_INTEGER) throw Error('signal-closed'); + const to = copy.to ?? null; + const targetSession = copy.targetSession ?? (to ? this.peers.get(to)?.session : null); + if (copy.kind !== 'announce' && (!to || !targetSession)) throw Error('signal-unbound-peer'); + delete copy.to; delete copy.targetSession; + const body = { profile: PROFILE, channelKey: this.channelKey, from: identity.id, + publicKey: identity.publicKeyText, session: this.session, sequence: ++this.sequence, + to, targetSession, payload: copy }; + const signature = b64(new Uint8Array(await crypto.subtle.sign('Ed25519', identity.privateKey, encode(body)))); + if (!this.active) throw Error('signal-closed'); + return { ...body, signature }; + } + receive(input, consume = null) { + // One bounded FIFO owns verification AND its RTC continuation. Crypto + // completion order must never masquerade as wire replay/reordering. + if (!this.active || this.verifying >= this.maxVerifications) return Promise.resolve(null); + let m, size; + try { + const serialized = encode(input); size = serialized.byteLength; + if (this.queuedBytes + size > 2097152) return Promise.resolve(null); + m = JSON.parse(new TextDecoder().decode(serialized)); + } catch { return Promise.resolve(null); } + this.verifying++; this.queuedBytes += size; + const work = this.receiveTail.then(async () => { + const result = this.active ? await this.verifyReceived(m) : null; + if (consume) await consume(result); + return result; + }).finally(() => { this.verifying--; this.queuedBytes -= size; }); + this.receiveTail = work.catch(() => {}); + return work; + } + async verifyReceived(m) { + try { + exactKeys(m, ['profile','channelKey','from','publicKey','session','sequence','to','targetSession','payload','signature']); + if (m.profile !== PROFILE || m.channelKey !== this.channelKey || !allowed.has(m.payload?.kind) + || !Number.isSafeInteger(m.sequence) || m.sequence < 1) return null; + bytes(m.session, 24); + const kind = m.payload.kind; + const identity = await this.identity(); + if (m.from === identity.id) return null; + if (kind === 'announce' ? m.to !== null || m.targetSession !== null + : m.to !== identity.id || m.targetSession !== this.session) return null; + const raw = bytes(m.publicKey, 32), signature = bytes(m.signature, 64); + if (await keyId(raw) !== m.from) return null; + const key = await crypto.subtle.importKey('raw', raw, 'Ed25519', false, ['verify']); + const { signature: _, ...body } = m; + const verified = await crypto.subtle.verify('Ed25519', key, signature, encode(body)); + if (!this.active || !verified) return null; + // FIFO verification commits replay state before the next admission. + // Never evict a replay record during the live session. + let peer = this.peers.get(m.from); + if (peer && peer.session !== m.session) return null; + if (peer && m.sequence <= peer.sequence) return null; + if (kind === 'announce') { + if (peer || this.pending.has(m.from) || this.pending.size + this.peers.size >= this.maxPeers) return null; + this.pending.set(m.from, { session: m.session, sequence: m.sequence }); + return { reply: { kind: 'hello', to: m.from, targetSession: m.session } }; + } + if (kind === 'ready') { + const challenge = this.pending.get(m.from); + if (!challenge || challenge.session !== m.session || m.sequence <= challenge.sequence) return null; + } + const handshake = kind === 'hello' || kind === 'ready'; + if (!model['Stitch.Signaling.admissionAllowed'](true, this.active, true, !!peer || handshake, + BigInt(m.sequence), BigInt(peer?.sequence ?? 0))) return null; + if (!peer) { + if (!handshake || this.peers.size + this.pending.size - Number(this.pending.has(m.from)) >= this.maxPeers) return null; + peer = { session: m.session, sequence: 0 }; this.peers.set(m.from, peer); + } + peer.sequence = m.sequence; + this.pending.delete(m.from); + const message = { ...m.payload, from: m.from, channelKey: m.channelKey, to: m.to }; + // No sender-controlled routing fields can override authenticated fields. + if (handshake) message.kind = 'announce'; + return { message, reply: kind === 'hello' ? { kind: 'ready', to: m.from } : null }; + } catch { return null; } + } +} diff --git a/src/prism-id.js b/src/prism-id.js new file mode 100644 index 0000000..070d593 --- /dev/null +++ b/src/prism-id.js @@ -0,0 +1,1887 @@ +/** + * Prism id: a login-free identity that comes into being in the browser. + * + * A prism is named by the kappa of its genesis record. Devices join it only + * through an out-of-band link offer (a QR code or any other channel the user + * already trusts). After that, linked devices keep each other in sync over the + * substrate message bus. Every authorization decision is taken by the + * Stitch.PrismId model in app/src/Stitch/PrismId.lex.tex. + * + * kappa = "sha256:" + lowercase hex SHA-256 of uor-addr canonical JSON: + * RFC 8785 shape, strings must already be NFC, integers only, object members + * ordered by the UTF-8 bytes of their names. + * + * Only P-256 ECDSA/ECDH, HKDF-SHA-256, HMAC-SHA-256, AES-256-GCM and SHA-256 + * are required, so native, mobile (Secure Enclave, Android Keystore), TPM 2.0 + * and secure-element devices can implement the same protocol. Where the + * platform has ML-KEM-768, every key wrap is hybrid (ECDH + ML-KEM); where it + * has ML-DSA-65, every record is also signed with ML-DSA. Actions a host marks + * as needing the person's approval carry a WebAuthn user-verified assertion. + * See docs/prism-id.md and docs/prism-id-threat-model.md. + */ +import { model } from './layer1-uor/generated-model.js'; +import { RELAY_EVENT_BYTES, RELAY_LIFETIMES, RelayReassembler, frameRelayMessage, newRelaySession, relayChannel, snapshotRelayMessage } + from './layer5-transport/relay-framing.js'; + +const subtle = globalThis.crypto.subtle; +const encoder = new TextEncoder(); +const decoder = new TextDecoder('utf-8', { fatal: true }); + +export const KIND = Object.freeze({ + device: 'prism/device/1', + genesis: 'prism/genesis/1', + bind: 'prism/bind/1', + revoke: 'prism/revoke/1', + log: 'prism/log/1', + offer: 'prism/link-offer/1', + request: 'prism/link-request/1', + response: 'prism/link-response/1', + rendezvous: 'prism/rendezvous/1', + sync: 'prism/sync/1', + sealed: 'prism/sealed/1', + boundary: 'prism/boundary/1', + action: 'prism/action/1', + linkCode: 'prism/link-code/1', + keyring: 'prism/keyring/1', + recoverySecret: 'prism/recovery-secret/1', + recoveryShare: 'prism/recovery-share/1', + persona: 'prism/persona/1', + personaKey: 'prism/persona-key/1', + personaRecovery: 'prism/persona-recovery/1', + cover: 'prism/cover/1', + publicLog: 'prism/public-log/1' +}); + +/** Kinds of device that take part. Every one uses the same records and primitives. */ +export const DEVICE_CLASSES = Object.freeze(['browser', 'native', 'mobile', 'embedded', 'recovery']); +/** Where a device says its private keys live. Self-asserted unless an attestation verifier confirms it. */ +export const KEY_PROTECTION = Object.freeze(['software', 'platform', 'secure-element', 'threshold-shares']); +/** + * member: full device of the prism. delegate: scoped device that never holds + * the private boundary. recovery: an offline authority whose key exists only as + * threshold shares held by guardians; it can link and revoke, never act at a host. + */ +export const ROLES = Object.freeze(['member', 'delegate', 'recovery']); + +export class PrismIdError extends Error { + constructor(code, message) { super(message); this.name = 'PrismIdError'; this.code = code; } +} +const refuse = (code, message) => { throw new PrismIdError(code, message); }; + +// ---------------------------------------------------------------- canonical form + +function compareBytes(left, right) { + const n = Math.min(left.length, right.length); + for (let i = 0; i < n; i++) if (left[i] !== right[i]) return left[i] - right[i]; + return left.length - right.length; +} + +function canonicalString(text) { + if (!text.isWellFormed()) refuse('canonical', 'string is not well-formed Unicode'); + if (text.normalize('NFC') !== text) refuse('canonical', 'string is not in NFC'); + let out = '"'; + for (const ch of text) { + const c = ch.codePointAt(0); + if (ch === '"') out += '\\"'; + else if (ch === '\\') out += '\\\\'; + else if (c === 8) out += '\\b'; + else if (c === 9) out += '\\t'; + else if (c === 10) out += '\\n'; + else if (c === 12) out += '\\f'; + else if (c === 13) out += '\\r'; + else if (c < 32) out += '\\u00' + c.toString(16).padStart(2, '0'); + else out += ch; + } + return out + '"'; +} + +/** uor-addr canonical JSON text of a JSON value. Refuses anything outside the subset. */ +export function canonicalJson(value) { + if (value === null) return 'null'; + if (value === true) return 'true'; + if (value === false) return 'false'; + if (typeof value === 'number') { + if (!Number.isSafeInteger(value) || Object.is(value, -0)) refuse('canonical', 'number outside the integer subset'); + return String(value); + } + if (typeof value === 'string') return canonicalString(value); + if (Array.isArray(value)) return '[' + value.map(canonicalJson).join(',') + ']'; + if (typeof value === 'object' && Object.getPrototypeOf(value) === Object.prototype) { + const members = Object.keys(value).map(key => { + if (value[key] === undefined) refuse('canonical', `member ${key} is undefined`); + return { key, bytes: encoder.encode(key) }; + }); + members.sort((a, b) => compareBytes(a.bytes, b.bytes)); + return '{' + members.map(m => canonicalString(m.key) + ':' + canonicalJson(value[m.key])).join(',') + '}'; + } + return refuse('canonical', `value of type ${typeof value} is not JSON`); +} + +export const canonicalBytes = value => encoder.encode(canonicalJson(value)); + +const hex = bytes => Array.from(new Uint8Array(bytes), b => b.toString(16).padStart(2, '0')).join(''); + +/** kappa of a JSON value. */ +export async function kappa(value) { + return 'sha256:' + hex(await subtle.digest('SHA-256', canonicalBytes(value))); +} + +export function isKappa(text) { return typeof text === 'string' && /^sha256:[0-9a-f]{64}$/.test(text); } + +export function toBase64Url(bytes) { + let s = ''; + for (const b of new Uint8Array(bytes)) s += String.fromCharCode(b); + return btoa(s).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); +} +export function fromBase64Url(text) { + if (typeof text !== 'string' || !/^[A-Za-z0-9_-]*$/.test(text)) refuse('encoding', 'not base64url'); + const s = atob(text.replace(/-/g, '+').replace(/_/g, '/') + '='.repeat((4 - text.length % 4) % 4)); + return Uint8Array.from(s, c => c.charCodeAt(0)); +} +const random = n => globalThis.crypto.getRandomValues(new Uint8Array(n)); + + +// ---------------------------------------------------------------- devices + +const SIGN = { name: 'ECDSA', namedCurve: 'P-256' }; +const SIGN_HASH = { name: 'ECDSA', hash: 'SHA-256' }; +const AGREE = { name: 'ECDH', namedCurve: 'P-256' }; +const KEM = { name: 'ML-KEM-768' }; +const KEM_PUBLIC_BYTES = 1184; +const PQSIGN = { name: 'ML-DSA-65' }; +const PQSIGN_PUBLIC_BYTES = 1952; +const publicJwk = ({ kty, crv, x, y }) => ({ crv, kty, x, y }); + +let kemSupport; +/** Whether this platform offers ML-KEM-768 in WebCrypto. */ +export async function postQuantumAvailable() { + if (kemSupport === undefined) { + try { await subtle.generateKey(KEM, false, ['encapsulateBits', 'decapsulateBits']); kemSupport = true; } + catch { kemSupport = false; } + } + return kemSupport; +} + +let pqSignSupport; +/** Whether this platform offers ML-DSA-65 (FIPS 204) in WebCrypto. */ +export async function postQuantumSignaturesAvailable() { + if (pqSignSupport === undefined) { + try { await subtle.generateKey(PQSIGN, false, ['sign', 'verify']); pqSignSupport = true; } + catch { pqSignSupport = false; } + } + return pqSignSupport; +} + +async function newKeys(extractable) { + const signing = await subtle.generateKey(SIGN, extractable, ['sign', 'verify']); + const agreement = await subtle.generateKey(AGREE, extractable, ['deriveBits']); + const kem = await postQuantumAvailable() ? await subtle.generateKey(KEM, extractable, ['encapsulateBits', 'decapsulateBits']) : null; + const pqsign = await postQuantumSignaturesAvailable() ? await subtle.generateKey(PQSIGN, extractable, ['sign', 'verify']) : null; + return { signing, agreement, kem, pqsign }; +} + +async function deviceFromKeys({ signing, agreement, kem, pqsign }, deviceClass, protection, presence) { + const record = { + kind: KIND.device, + class: deviceClass, + protection, + sign: publicJwk(await subtle.exportKey('jwk', signing.publicKey)), + agree: publicJwk(await subtle.exportKey('jwk', agreement.publicKey)) + }; + if (kem) record.kem = toBase64Url(await subtle.exportKey('raw-public', kem.publicKey)); + if (pqsign) record.pqsign = toBase64Url(await subtle.exportKey('raw-public', pqsign.publicKey)); + if (presence) record.presence = presence; + return Object.freeze({ id: await kappa(record), record, signingKey: signing.privateKey, agreementKey: agreement.privateKey, + kemKey: kem?.privateKey ?? null, pqSigningKey: pqsign?.privateKey ?? null }); +} + +/** + * A device holds non-extractable private keys: one signs prism records, one + * agrees keys for wrapping, and where the platform has it an ML-KEM-768 key + * makes every wrap to this device hybrid, and where it has ML-DSA-65 every + * record this device signs carries a second, post-quantum signature. Only its + * public record leaves the device. `deviceClass` and `protection` are claims + * the device makes about itself. + * + * `presence` binds a WebAuthn credential (a passkey) to the device: + * `{ rp, origin, key }` with the credential's P-256 public key as a JWK. A + * host can then require that an action carry an assertion the person made + * with user verification (see signAction). WebAuthn credentials are scoped to + * one relying party, so use one per persona. + */ +export async function createDevice({ deviceClass = 'browser', protection = 'software', presence } = {}) { + if (!DEVICE_CLASSES.includes(deviceClass) || deviceClass === 'recovery') refuse('device', `unknown device class ${deviceClass}`); + if (!KEY_PROTECTION.includes(protection) || protection === 'threshold-shares') refuse('device', `unknown key protection ${protection}`); + if (presence !== undefined) checkPresenceBinding(presence); + return deviceFromKeys(await newKeys(false), deviceClass, protection, presence === undefined ? undefined : { rp: presence.rp, origin: presence.origin, key: publicJwk(presence.key) }); +} + +const okKey = k => k && k.kty === 'EC' && k.crv === 'P-256' && typeof k.x === 'string' && typeof k.y === 'string' && Object.keys(k).length === 4; + +function checkPresenceBinding(presence) { + const key = presence?.key && publicJwk(presence.key); + if (!presence || typeof presence.rp !== 'string' || !presence.rp || typeof presence.origin !== 'string' || !presence.origin.startsWith('https://') || !okKey(key)) + refuse('device', 'presence must name rp, an https origin and a P-256 credential key'); +} + +const OPTIONAL_DEVICE_FIELDS = Object.freeze({ + kem: v => fromBase64Url(v).length === KEM_PUBLIC_BYTES, + pqsign: v => fromBase64Url(v).length === PQSIGN_PUBLIC_BYTES, + presence: v => { checkPresenceBinding(v); return Object.keys(v).length === 3 && Object.keys(v.key).length === 4; } +}); + +export function checkDeviceRecord(record) { + const ok = () => { + if (!record || typeof record !== 'object' || record.kind !== KIND.device || !DEVICE_CLASSES.includes(record.class) || + !KEY_PROTECTION.includes(record.protection) || !okKey(record.sign) || !okKey(record.agree)) return false; + for (const key of Object.keys(record)) { + if (['kind', 'class', 'protection', 'sign', 'agree'].includes(key)) continue; + if (!OPTIONAL_DEVICE_FIELDS[key] || typeof record[key] !== (key === 'presence' ? 'object' : 'string') || !OPTIONAL_DEVICE_FIELDS[key](record[key])) return false; + } + return true; + }; + let valid; + try { valid = ok(); } catch (error) { if (!(error instanceof PrismIdError)) throw error; valid = false; } + if (!valid) refuse('device', 'malformed device record'); + return record; +} + +async function signRecord(device, body) { + const bytes = canonicalBytes(body); + const envelope = { body, signer: device.id, signature: toBase64Url(await subtle.sign(SIGN_HASH, device.signingKey, bytes)) }; + if (device.pqSigningKey) envelope.pqsignature = toBase64Url(await subtle.sign(PQSIGN, device.pqSigningKey, bytes)); + return envelope; +} + +/** + * Hybrid signature check (Stitch.PrismId.hybridSignatureAccepted). The P-256 + * signature must always verify. When the signer advertises an ML-DSA-65 key + * and this verifier has ML-DSA, the ML-DSA signature must verify too, so + * stripping it is refused. A verifier without ML-DSA checks P-256 alone; a + * host that must resist a quantum forger refuses such verifiers with + * `{ requirePostQuantum: true }`. + */ +async function signatureValid(envelope, deviceRecord, { requirePostQuantum = false } = {}) { + try { + checkDeviceRecord(deviceRecord); + if (await kappa(deviceRecord) !== envelope.signer) return false; + const bytes = canonicalBytes(envelope.body); + const key = await subtle.importKey('jwk', { ...deviceRecord.sign, ext: true }, SIGN, false, ['verify']); + const classical = await subtle.verify(SIGN_HASH, key, fromBase64Url(envelope.signature), bytes); + const advertised = typeof deviceRecord.pqsign === 'string'; + const verifierHasPq = await postQuantumSignaturesAvailable(); + if (requirePostQuantum && !(advertised && verifierHasPq)) return false; + let pq = false; + if (advertised && verifierHasPq && typeof envelope.pqsignature === 'string') { + const pqKey = await subtle.importKey('raw-public', fromBase64Url(deviceRecord.pqsign), PQSIGN, false, ['verify']); + pq = await subtle.verify(PQSIGN, pqKey, fromBase64Url(envelope.pqsignature), bytes); + } + return model['Stitch.PrismId.hybridSignatureAccepted'](classical, advertised, verifierHasPq, pq); + } catch (error) { + if (error instanceof PrismIdError || error instanceof DOMException || error instanceof TypeError) return false; + throw error; + } +} + +// ---------------------------------------------------------------- hybrid key wrapping + +/** + * Wrap bytes to a device record. ECDH with a fresh ephemeral key, plus + * ML-KEM-768 encapsulation whenever the recipient advertises a KEM key. A + * sender that cannot encapsulate refuses rather than downgrade + * (Stitch.PrismId.hybridWrapRequired). + */ +async function wrapTo(recipient, bytes, { salt, info, aad }) { + const ephemeral = await subtle.generateKey(AGREE, false, ['deriveBits']); + const peer = await subtle.importKey('jwk', { ...recipient.agree, ext: true }, AGREE, false, []); + const classical = new Uint8Array(await subtle.deriveBits({ name: 'ECDH', public: peer }, ephemeral.privateKey, 256)); + let ikm = classical, kemCiphertext; + if (recipient.kem !== undefined) { + if (!await postQuantumAvailable()) refuse('post-quantum', 'the recipient requires a hybrid wrap and this platform has no ML-KEM'); + const kemPublic = await subtle.importKey('raw-public', fromBase64Url(recipient.kem), KEM, false, ['encapsulateBits']); + const { sharedKey, ciphertext } = await subtle.encapsulateBits(KEM, kemPublic); + ikm = concat(classical, new Uint8Array(sharedKey)); + kemCiphertext = toBase64Url(ciphertext); + } + const key = await hkdfAesKey(ikm, salt, info); + const wrap = { agree: publicJwk(await subtle.exportKey('jwk', ephemeral.publicKey)), ...await encryptWith(key, bytes, aad) }; + if (kemCiphertext) wrap.kem = kemCiphertext; + return wrap; +} + +async function unwrapFrom(device, wrap, { salt, info, aad }) { + if (!model['Stitch.PrismId.hybridWrapRequired'](device.record.kem !== undefined, typeof wrap.kem === 'string')) + refuse('post-quantum', 'a wrap to a post-quantum device must be hybrid'); + const peer = await subtle.importKey('jwk', { ...wrap.agree, ext: true }, AGREE, false, []); + let ikm = new Uint8Array(await subtle.deriveBits({ name: 'ECDH', public: peer }, device.agreementKey, 256)); + if (typeof wrap.kem === 'string') { + if (!device.kemKey) refuse('post-quantum', 'this device has no ML-KEM key'); + ikm = concat(ikm, new Uint8Array(await subtle.decapsulateBits(KEM, device.kemKey, fromBase64Url(wrap.kem)))); + } + return decryptWith(await hkdfAesKey(ikm, salt, info), wrap, aad); +} + +function concat(...parts) { + const out = new Uint8Array(parts.reduce((n, p) => n + p.length, 0)); + let offset = 0; + for (const p of parts) { out.set(p, offset); offset += p.length; } + return out; +} + +async function hkdfAesKey(ikm, salt, info) { + const material = await subtle.importKey('raw', ikm, 'HKDF', false, ['deriveKey']); + return subtle.deriveKey({ name: 'HKDF', hash: 'SHA-256', salt, info: encoder.encode(info) }, + material, { name: 'AES-GCM', length: 256 }, false, ['encrypt', 'decrypt']); +} + +async function encryptWith(key, bytes, aad) { + const iv = random(12); + const ciphertext = await subtle.encrypt({ name: 'AES-GCM', iv, additionalData: encoder.encode(aad) }, key, bytes); + return { iv: toBase64Url(iv), ciphertext: toBase64Url(ciphertext) }; +} +async function decryptWith(key, box, aad) { + return new Uint8Array(await subtle.decrypt({ name: 'AES-GCM', iv: fromBase64Url(box.iv), additionalData: encoder.encode(aad) }, key, fromBase64Url(box.ciphertext))); +} + +// ---------------------------------------------------------------- boundary keys + +/** + * A boundary key is 32 random bytes. Sealing and topic keys are derived from + * it with HKDF and are never extractable. The bytes themselves are kept only + * on a sharing device (one that links members, rotates or sets up recovery); + * a hardened device keeps the derived keys alone (Stitch.PrismId.mayShareBoundary). + */ +async function boundaryFromRaw(raw, shareable) { + const material = await subtle.importKey('raw', raw, 'HKDF', false, ['deriveKey']); + const derive = (info, algorithm, usages) => subtle.deriveKey({ name: 'HKDF', hash: 'SHA-256', salt: new Uint8Array(32), info: encoder.encode(info) }, material, algorithm, false, usages); + return Object.freeze({ + seal: await derive('prism/boundary-seal/1', { name: 'AES-GCM', length: 256 }, ['encrypt', 'decrypt']), + topic: await derive('prism/boundary-topic/1', { name: 'HMAC', hash: 'SHA-256', length: 256 }, ['sign']), + raw: shareable ? Uint8Array.from(raw) : null + }); +} + +function requireShareable(session, what) { + if (!model['Stitch.PrismId.mayShareBoundary'](session.shareable === true)) refuse('hardened', `a hardened device cannot ${what}; use a sharing member`); +} + +function keyringBytes(keyring) { + const keys = {}; + for (const [id, entry] of keyring) { + if (!entry.raw) refuse('hardened', 'this keyring is hardened and cannot be shared'); + keys[id] = toBase64Url(entry.raw); + } + return canonicalBytes({ kind: KIND.keyring, keys }); +} + +async function keyringFromBytes(bytes, shareable) { + const value = JSON.parse(decoder.decode(bytes)); + if (value.kind !== KIND.keyring) refuse('keyring', 'malformed keyring'); + const keyring = new Map(); + for (const [id, raw] of Object.entries(value.keys)) keyring.set(id, await boundaryFromRaw(fromBase64Url(raw), shareable)); + return keyring; +} + +/** + * Make this device hold only non-extractable boundary keys. Script running in + * its origin can then use them while it runs but can never copy them out. + * A hardened device can still link delegates, revoke and sync; it cannot link + * members or set up recovery. + */ +export async function hardenSession(session) { + const keyring = new Map(); + for (const [id, entry] of session.keyring) keyring.set(id, Object.freeze({ seal: entry.seal, topic: entry.topic, raw: null })); + return { ...session, keyring, shareable: false }; +} + +// ---------------------------------------------------------------- the prism log + +/** Records are kept by the kappa of their envelope, so merging is set union. */ +export async function addRecord(log, envelope) { + const next = new Map(log); + next.set(await kappa(envelope), envelope); + return next; +} + +/** Commutative, associative and idempotent: union keyed by kappa. */ +export function mergeLogs(left, right) { + const next = new Map(left); + for (const [k, v] of right) next.set(k, v); + return next; +} + +export async function logRoot(log) { + return kappa({ kind: KIND.log, records: [...log.keys()].sort() }); +} + +/** Admission bounds for logs and sync messages from peers, checked before any parsing or signature work. */ +export const MAX_LOG_RECORDS = 4096; +export const MAX_SYNC_BYTES = 4 * 1024 * 1024; + +export async function logFromRecords(records) { + if (!Array.isArray(records)) refuse('log', 'records must be an array'); + if (records.length > MAX_LOG_RECORDS) refuse('log', `log exceeds ${MAX_LOG_RECORDS} records`); + let log = new Map(); + for (const r of records) log = await addRecord(log, r); + return log; +} + +const byKey = ([a], [b]) => (a < b ? -1 : a > b ? 1 : 0); +const sameSet = (a, b) => a.size === b.size && [...a].every(x => b.has(x)); + +function bindShape(body) { + return ROLES.includes(body.role) && Array.isArray(body.scope) && body.scope.every(x => typeof x === 'string') && + (body.role === 'delegate' ? body.scope.length > 0 : body.scope.length === 0); +} + +/** + * Resolve which devices may act for the prism, with what role and scope, and + * which boundary key is current. + * + * - A bind counts only when Stitch.PrismId.bindAllowed holds: the signer is a + * linked member or recovery device (not a delegate), its signature verifies, + * it names this prism, and the signer is not revoked unless a revocation kept + * that bind. A recovery-role bind also needs Stitch.PrismId.recoveryBindAllowed: + * while a recovery device exists, only a recovery device may add another. + * - Revocation wins over a concurrent bind: binds a revoked device made that + * the revoker did not list in `keep` are dropped. + * - Stitch.PrismId.revocationCounts: revocations by the recovery device come + * first; a device the recovery device revoked has no revocations that count; + * only a recovery device may revoke a recovery device. So a thief holding a + * member device cannot lock the person out: recovery revokes the thief and + * the thief's revocations stop counting. + * - Stitch.PrismId.revocationCounts also bounds a retired recovery device (one + * a recovery device revoked, itself included): its own retirement counts, + * and its other records count only where that retirement lists them in + * `keep`. So an old recovery kit replayed against an old log binds and + * revokes nothing: the retirement in the current log never listed what the + * replay signs. + * - A recovery device is retired once. Two retirements that keep different + * records are a fork only a replayed old kit can make; the log refuses to + * resolve (`fork`), so no verifier acts on either side. Devices never hold + * such a log: admitRecords refuses the second retirement. + * - Every rotating revocation carries a new boundary key (`epoch`, `wraps`). + * The current key is the one with the highest epoch; ties go to the smaller kappa. + */ +export async function resolvePrism(prism, log) { + const entries = [...log.entries()].sort(byKey); + // Every genesis of this prism has the same body (its kappa is the prism); + // envelopes differ only by signature encoding (ECDSA signatures are + // malleable), so any one that verifies is the genesis. A copy with a bad + // signature cannot make the log unresolvable. + let genesis = null; + for (const [, e] of entries) { + if (e?.body?.kind === KIND.genesis && await kappa(e.body) === prism && await signatureValid(e, e.body.device)) { genesis = e; break; } + } + if (!genesis) refuse('genesis', 'the log holds no genesis of this prism that verifies'); + + const devices = new Map([[genesis.signer, genesis.body.device]]); + const binds = [], revokes = []; + for (const [id, e] of entries) { + const body = e?.body; + if (body?.prism !== prism) continue; + if (body.kind === KIND.bind && bindShape(body)) { + try { const r = checkDeviceRecord(body.device); const target = await kappa(r); devices.set(target, r); binds.push({ id, e, target }); } + catch (error) { if (!(error instanceof PrismIdError)) throw error; } + } else if (body.kind === KIND.revoke && typeof body.device === 'string' && Array.isArray(body.keep) && + Number.isSafeInteger(body.epoch) && body.epoch > 0 && Array.isArray(body.wraps)) revokes.push({ id, e }); + } + const verified = new Map(); + const verify = async (id, e) => { + if (!verified.has(id)) verified.set(id, devices.has(e.signer) && await signatureValid(e, devices.get(e.signer))); + return verified.get(id); + }; + + let linked = new Set([genesis.signer]), roles = new Map([[genesis.signer, 'member']]), revocations = new Map(), counted = new Set(); + for (let round = 0; round <= 2 * log.size + 2; round++) { + // A retired recovery device's records count only where its retirement keeps them; the retirement itself always counts. + const retiredKeep = new Map(); + for (const [d, r] of revocations) if (roles.get(d) === 'recovery' && r.recoveryKeep) retiredKeep.set(d, r.recoveryKeep); + const unkeptBy = (signer, id, target) => retiredKeep.has(signer) && target !== signer && !retiredKeep.get(signer).has(id); + // Revocations by the recovery device first: they decide whose revocations count. + const revokedByRecovery = new Set(); + for (const { id, e } of revokes) { + if (roles.get(e.signer) === 'recovery' && linked.has(e.signer) && !unkeptBy(e.signer, id, e.body.device) && await verify(id, e)) + revokedByRecovery.add(e.body.device); + } + const nextRevocations = new Map(), nextCounted = new Set(); + for (const { id, e } of revokes) { + const signerRole = roles.get(e.signer); + if (!model['Stitch.PrismId.mayAdminister'](linked.has(e.signer), false, signerRole !== 'member' && signerRole !== 'recovery')) continue; + const signerOverruled = signerRole === 'recovery' ? unkeptBy(e.signer, id, e.body.device) : revokedByRecovery.has(e.signer); + if (!model['Stitch.PrismId.revocationCounts'](signerRole === 'recovery', signerOverruled, roles.get(e.body.device) === 'recovery')) continue; + if (!await verify(id, e)) continue; + const entry = nextRevocations.get(e.body.device) ?? { keep: new Set(), recoveryKeep: null, by: [] }; + for (const k of e.body.keep) entry.keep.add(k); + if (signerRole === 'recovery') { entry.recoveryKeep ??= new Set(); for (const k of e.body.keep) entry.recoveryKeep.add(k); } + entry.by.push({ id, e }); + nextCounted.add(id); + nextRevocations.set(e.body.device, entry); + } + const nextLinked = new Set([genesis.signer]), nextRoles = new Map([[genesis.signer, 'member']]), scopes = new Map(); + for (let grew = true; grew;) { + grew = false; + for (const { id, e, target } of binds) { + const current = nextRoles.get(target); + if (current === 'member' || current === 'recovery' || (current === 'delegate' && e.body.role === 'delegate')) continue; + // A member's revocation (with a keep list it chose) never drops a recovery bind; only recovery can. + const revocation = nextRevocations.get(e.signer); + const keep = e.body.role === 'recovery' ? revocation?.recoveryKeep : revocation?.keep; + const signerRevoked = e.body.role === 'recovery' ? !!keep && !keep.has(id) : revocation !== undefined && !keep.has(id); + const signerRole = nextRoles.get(e.signer); + let allowed = model['Stitch.PrismId.bindAllowed'](nextLinked.has(e.signer), signerRevoked, + signerRole !== 'member' && signerRole !== 'recovery', await verify(id, e), true); + if (allowed && e.body.role === 'recovery') { + const recoveryExists = [...nextRoles].some(([d, r]) => r === 'recovery' && d !== target && !nextRevocations.has(d)); + allowed = model['Stitch.PrismId.recoveryBindAllowed'](signerRole === 'recovery', recoveryExists); + } + if (allowed) { + nextLinked.add(target); nextRoles.set(target, e.body.role); + if (e.body.role === 'delegate') scopes.set(target, [...e.body.scope].sort()); else scopes.delete(target); + grew = true; + } + } + } + const settled = sameSet(nextLinked, linked) && sameSet(nextCounted, counted) && + [...nextRoles].every(([d, r]) => roles.get(d) === r) && nextRoles.size === roles.size; + linked = nextLinked; roles = nextRoles; revocations = nextRevocations; counted = nextCounted; + if (settled) { + const retired = [...revocations.keys()].filter(d => roles.get(d) === 'recovery').sort(); + for (const d of retired) { + const keeps = new Set(revocations.get(d).by.map(r => [...r.e.body.keep].sort().join(' '))); + if (keeps.size > 1) refuse('fork', 'the log forks: a recovery device is retired twice with different records kept, so an old recovery kit was replayed'); + } + const active = [...linked].filter(d => model['Stitch.PrismId.deviceMaySign'](true, revocations.has(d))).sort(); + const rekeys = [...revocations.values()].flatMap(r => r.by).filter(r => r.e.body.wraps.length > 0) + .sort((a, b) => b.e.body.epoch - a.e.body.epoch || (a.id < b.id ? -1 : 1)); + const boundary = rekeys.length ? { epoch: rekeys[0].e.body.epoch, keyId: rekeys[0].id } : { epoch: 0, keyId: prism }; + const maxEpoch = Math.max(0, ...[...revocations.values()].flatMap(r => r.by.map(b => b.e.body.epoch))); + return Object.freeze({ + prism, + active, + revoked: [...revocations.keys()].sort(), + roles: Object.freeze(Object.fromEntries(active.map(d => [d, roles.get(d)]))), + scopes: Object.freeze(Object.fromEntries(active.filter(d => roles.get(d) === 'delegate').map(d => [d, scopes.get(d)]))), + devices: Object.freeze(Object.fromEntries(active.map(d => [d, devices.get(d)]))), + recovery: active.find(d => roles.get(d) === 'recovery') ?? null, + retired, + boundary: Object.freeze(boundary), + epoch: maxEpoch, + rekeys: rekeys.map(r => ({ keyId: r.id, epoch: r.e.body.epoch, wraps: r.e.body.wraps })) + }); + } + } + return refuse('resolve', 'device linkage did not settle'); +} + +/** + * Merge records into a log this device holds, so the device never holds a + * fork: a retirement of a recovery device that the held log already retires + * is refused unless the held log has that very record. Everything else is + * merged; resolvePrism still decides what counts. + */ +export async function admitRecords(prism, held, records) { + const incoming = records instanceof Map ? records : await logFromRecords(records); + const retired = new Set((await resolvePrism(prism, held)).retired); + const admitted = new Map(held); + for (const [id, e] of incoming) { + if (admitted.has(id)) continue; + if (e?.body?.kind === KIND.revoke && e.body.prism === prism && retired.has(e.body.device)) continue; + admitted.set(id, e); + } + return admitted; +} + +export async function canSign(prism, log, deviceId) { + const state = await resolvePrism(prism, log); + return model['Stitch.PrismId.deviceMaySign'](state.active.includes(deviceId) || state.revoked.includes(deviceId), state.revoked.includes(deviceId)); +} + +async function mayAdminister(session) { + const state = await resolvePrism(session.prism, session.log); + const id = session.device.id; + const role = state.roles[id]; + if (!model['Stitch.PrismId.mayAdminister'](state.active.includes(id), state.revoked.includes(id), role !== 'member' && role !== 'recovery')) + refuse('unauthorized', 'this device may not administer the prism'); + return state; +} + +const boundaryRecipient = role => role === 'member' || role === 'recovery'; +const rekeyContext = (prism, id, epoch) => ({ salt: encoder.encode(prism), info: `prism/rekey-wrap/1 ${id}`, aad: `${prism} ${epoch}` }); + +/** Take up any boundary keys wrapped to this device by revocations it has not yet absorbed. */ +async function absorbRekeys(session, state) { + const keyring = new Map(session.keyring); + for (const rekey of state.rekeys) { + if (keyring.has(rekey.keyId)) continue; + const wrap = rekey.wraps.find(w => w?.device === session.device.id); + if (!wrap) continue; + const raw = await unwrapFrom(session.device, wrap, rekeyContext(session.prism, wrap.device, rekey.epoch)); + keyring.set(rekey.keyId, await boundaryFromRaw(raw, session.shareable === true)); + raw.fill(0); + } + return keyring; +} + +/** The boundary key this device must seal with. Refuses a stale key (Stitch.PrismId.boundaryKeyAdmitted). */ +export async function currentBoundary(session) { + const state = await resolvePrism(session.prism, session.log); + const epochOf = id => (id === session.prism ? 0 : state.rekeys.find(r => r.keyId === id)?.epoch); + const heldEpoch = Math.max(-1, ...[...session.keyring.keys()].map(epochOf).filter(Number.isSafeInteger)); + if (heldEpoch < 0 || !model['Stitch.PrismId.boundaryKeyAdmitted'](heldEpoch, state.boundary.epoch) || !session.keyring.has(state.boundary.keyId)) + refuse('stale-key', 'this device does not hold the current private boundary key'); + return { keyId: state.boundary.keyId, epoch: state.boundary.epoch, entry: session.keyring.get(state.boundary.keyId) }; +} + +// ---------------------------------------------------------------- sessions + +function emptySession(prism, device, log) { + return { prism, device, keyring: new Map(), log, shareable: true, personas: new Map(), personaDevices: new Map() }; +} + +/** + * Create a prism on this device. No account, server or third party is involved. + * The private boundary key never leaves a member device unwrapped. + */ +export async function createPrism(deviceOptions) { + const device = await createDevice(deviceOptions); + const genesis = await signRecord(device, { kind: KIND.genesis, device: device.record, nonce: toBase64Url(random(16)) }); + const prism = await kappa(genesis.body); + const session = emptySession(prism, device, await logFromRecords([genesis])); + session.keyring.set(prism, await boundaryFromRaw(random(32), true)); + return session; +} + +/** + * Revoke a device. By default the private boundary key rotates: a new key is + * wrapped to every remaining member and recovery device (hybrid where they + * advertise ML-KEM), never to the revoked device or to delegates. The binds + * and revocations the revoked device made that this device knows of are kept + * (`keep`); for a retired recovery device nothing else it signs counts. Persona keys of the + * revoked device are revoked at every host this device can administer. + */ +export async function revokeDevice(session, deviceId, { rotate = true } = {}) { + const state = await mayAdminister(session); + const keep = []; + for (const [id, e] of session.log) if ((e.body.kind === KIND.bind || e.body.kind === KIND.revoke) && e.signer === deviceId) keep.push(id); + const epoch = state.epoch + 1; + const wraps = []; + if (rotate) { + const raw = random(32); + for (const id of state.active) { + if (id === deviceId || !model['Stitch.PrismId.receivesPrivateBoundary'](!boundaryRecipient(state.roles[id]))) continue; + wraps.push({ device: id, ...await wrapTo(state.devices[id], raw, rekeyContext(session.prism, id, epoch)) }); + } + raw.fill(0); + } + const envelope = await signRecord(session.device, { kind: KIND.revoke, prism: session.prism, device: deviceId, keep: keep.sort(), epoch, wraps }); + const log = await addRecord(session.log, envelope); + let next = { ...session, log }; + next.keyring = await absorbRekeys(next, await resolvePrism(session.prism, log)); + next = await servicePersonas(next); + return next; +} + +// ---------------------------------------------------------------- out-of-band linking + +const LINK_URI = 'prism-link:'; + +async function hmacKey(raw, usages) { + return subtle.importKey('raw', raw, { name: 'HMAC', hash: 'SHA-256' }, false, usages); +} + +/** Where the two devices meet on the bus. Only holders of the secret can derive it. */ +export async function rendezvousTopic(secret) { + return 'prism-rendezvous:' + (await kappa({ kind: KIND.rendezvous, secret })).slice(7); +} + +/** + * Six-digit code both devices show before the link is accepted. It binds the + * secret to the joining device, so a device that read the QR code first shows + * a code that does not match the one on the device the person is holding. + */ +export async function linkCode(secret, deviceRecord) { + const digest = new Uint8Array(await subtle.digest('SHA-256', canonicalBytes({ kind: KIND.linkCode, secret, device: await kappa(deviceRecord) }))); + return String(new DataView(digest.buffer).getUint32(0) % 1000000).padStart(6, '0'); +} + +/** + * Offer to link a new device. The returned URI is what the QR code (or NFC tag, + * USB/serial line, or typed text) carries. The pending half stays here and is + * used exactly once. A delegate offer names the actions the device may take. + * Only a sharing (not hardened) member can offer a member link. + */ +export async function createLinkOffer(session, { now, ttl = 300000, role = 'member', scope = [] }) { + await mayAdminister(session); + if (role === 'recovery' || !bindShape({ role, scope })) refuse('offer', 'a member has no scope; a delegate needs at least one action'); + if (role === 'member') requireShareable(session, 'link a member'); + const offer = { kind: KIND.offer, prism: session.prism, role, scope: [...scope].sort(), secret: toBase64Url(random(32)), expires: now + ttl }; + return { offer, uri: LINK_URI + toBase64Url(canonicalBytes(offer)), pending: { offer, used: false } }; +} + +export function parseLinkUri(uri) { + if (typeof uri !== 'string' || !uri.startsWith(LINK_URI)) refuse('offer', 'not a prism link'); + const offer = JSON.parse(decoder.decode(fromBase64Url(uri.slice(LINK_URI.length)))); + if (offer.kind !== KIND.offer || !isKappa(offer.prism) || !Number.isSafeInteger(offer.expires) || !bindShape(offer) || + offer.role === 'recovery' || typeof offer.secret !== 'string') refuse('offer', 'malformed link offer'); + return offer; +} + +/** + * The QR code for a link offer (ISO/IEC 18004: byte mode, error correction + * level M, the smallest version that holds it, the mask with the lowest + * penalty). Returns `{ size, modules }`, where `modules[y][x]` is true for a + * dark module; draw it with a quiet zone of four modules. A host renders it + * however it likes; the person scans it on the new device (TB2). + */ +export function linkQr(uri) { + parseLinkUri(uri); + return qrEncode(encoder.encode(uri)); +} + +// Error correction codewords per block and blocks, level M, versions 1 to 40. +const QR_ECC_M = [0, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28]; +const QR_BLOCKS_M = [0, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49]; +const QR_MASKS = [ + (x, y) => (x + y) % 2 === 0, (x, y) => y % 2 === 0, x => x % 3 === 0, (x, y) => (x + y) % 3 === 0, + (x, y) => (Math.floor(x / 3) + Math.floor(y / 2)) % 2 === 0, (x, y) => x * y % 2 + x * y % 3 === 0, + (x, y) => (x * y % 2 + x * y % 3) % 2 === 0, (x, y) => ((x + y) % 2 + x * y % 3) % 2 === 0 +]; +const qrBit = (value, i) => ((value >>> i) & 1) !== 0; + +function qrRawModules(version) { + let n = (16 * version + 128) * version + 64; + if (version >= 2) { + const align = Math.floor(version / 7) + 2; + n -= (25 * align - 10) * align - 55; + if (version >= 7) n -= 36; + } + return n; +} +const qrDataCodewords = version => Math.floor(qrRawModules(version) / 8) - QR_ECC_M[version] * QR_BLOCKS_M[version]; + +function qrGfMul(x, y) { + let z = 0; + for (let i = 7; i >= 0; i--) { z = (z << 1) ^ ((z >>> 7) * 0x11d); z ^= ((y >>> i) & 1) * x; } + return z; +} + +function rsDivisor(degree) { + const out = new Array(degree).fill(0); + out[degree - 1] = 1; + let root = 1; + for (let i = 0; i < degree; i++) { + for (let j = 0; j < degree; j++) { out[j] = qrGfMul(out[j], root); if (j + 1 < degree) out[j] ^= out[j + 1]; } + root = qrGfMul(root, 2); + } + return out; +} + +function rsRemainder(data, divisor) { + const out = divisor.map(() => 0); + for (const b of data) { + const factor = b ^ out.shift(); + out.push(0); + divisor.forEach((c, i) => { out[i] ^= qrGfMul(c, factor); }); + } + return out; +} + +function qrEncode(bytes) { + let version = 1; + for (; ; version++) { + if (version > 40) refuse('offer', 'the link is too long for a QR code'); + if (4 + (version < 10 ? 8 : 16) + 8 * bytes.length <= qrDataCodewords(version) * 8) break; + } + const capacity = qrDataCodewords(version) * 8; + const bits = []; + const put = (value, length) => { for (let i = length - 1; i >= 0; i--) bits.push((value >>> i) & 1); }; + put(4, 4); + put(bytes.length, version < 10 ? 8 : 16); + for (const b of bytes) put(b, 8); + put(0, Math.min(4, capacity - bits.length)); + put(0, (8 - bits.length % 8) % 8); + for (let pad = 0xec; bits.length < capacity; pad ^= 0xec ^ 0x11) put(pad, 8); + const data = []; + for (let i = 0; i < bits.length; i += 8) data.push(bits.slice(i, i + 8).reduce((a, b) => (a << 1) | b, 0)); + + // Split into blocks, add error correction, interleave. + const blocks = QR_BLOCKS_M[version], eccLength = QR_ECC_M[version]; + const raw = Math.floor(qrRawModules(version) / 8); + const shortBlocks = blocks - raw % blocks, shortLength = Math.floor(raw / blocks); + const divisor = rsDivisor(eccLength), split = []; + for (let i = 0, k = 0; i < blocks; i++) { + const block = data.slice(k, k + shortLength - eccLength + (i < shortBlocks ? 0 : 1)); + k += block.length; + const ecc = rsRemainder(block, divisor); + if (i < shortBlocks) block.push(0); + split.push(block.concat(ecc)); + } + const codewords = []; + for (let i = 0; i < split[0].length; i++) { + for (let j = 0; j < split.length; j++) if (i !== shortLength - eccLength || j >= shortBlocks) codewords.push(split[j][i]); + } + + const size = version * 4 + 17; + const modules = Array.from({ length: size }, () => new Array(size).fill(false)); + const fixed = Array.from({ length: size }, () => new Array(size).fill(false)); + const set = (x, y, dark) => { modules[y][x] = dark; fixed[y][x] = true; }; + for (let i = 0; i < size; i++) { set(6, i, i % 2 === 0); set(i, 6, i % 2 === 0); } + for (const [cx, cy] of [[3, 3], [size - 4, 3], [3, size - 4]]) { + for (let dy = -4; dy <= 4; dy++) for (let dx = -4; dx <= 4; dx++) { + const x = cx + dx, y = cy + dy, d = Math.max(Math.abs(dx), Math.abs(dy)); + if (x >= 0 && x < size && y >= 0 && y < size) set(x, y, d !== 2 && d !== 4); + } + } + const align = []; + if (version > 1) { + const count = Math.floor(version / 7) + 2; + const step = version === 32 ? 26 : Math.ceil((version * 4 + 4) / (count * 2 - 2)) * 2; + align.push(6); + for (let pos = size - 7; align.length < count; pos -= step) align.splice(1, 0, pos); + } + const last = align.length - 1; + align.forEach((ay, i) => align.forEach((ax, j) => { + if ((i === 0 && j === 0) || (i === 0 && j === last) || (i === last && j === 0)) return; + for (let dy = -2; dy <= 2; dy++) for (let dx = -2; dx <= 2; dx++) set(ax + dx, ay + dy, Math.max(Math.abs(dx), Math.abs(dy)) !== 1); + })); + const drawFormat = mask => { + const value = mask; // level M is 00 + let rem = value; + for (let i = 0; i < 10; i++) rem = (rem << 1) ^ ((rem >>> 9) * 0x537); + const f = ((value << 10) | rem) ^ 0x5412; + for (let i = 0; i <= 5; i++) set(8, i, qrBit(f, i)); + set(8, 7, qrBit(f, 6)); set(8, 8, qrBit(f, 7)); set(7, 8, qrBit(f, 8)); + for (let i = 9; i < 15; i++) set(14 - i, 8, qrBit(f, i)); + for (let i = 0; i < 8; i++) set(size - 1 - i, 8, qrBit(f, i)); + for (let i = 8; i < 15; i++) set(8, size - 15 + i, qrBit(f, i)); + set(8, size - 8, true); + }; + drawFormat(0); + if (version >= 7) { + let rem = version; + for (let i = 0; i < 12; i++) rem = (rem << 1) ^ ((rem >>> 11) * 0x1f25); + const v = (version << 12) | rem; + for (let i = 0; i < 18; i++) { + const a = size - 11 + i % 3, b = Math.floor(i / 3); + set(a, b, qrBit(v, i)); set(b, a, qrBit(v, i)); + } + } + + // Codewords in the zigzag order, skipping function modules. + let i = 0; + for (let right = size - 1; right >= 1; right -= 2) { + if (right === 6) right = 5; + for (let vert = 0; vert < size; vert++) { + for (let j = 0; j < 2; j++) { + const x = right - j, upward = ((right + 1) & 2) === 0, y = upward ? size - 1 - vert : vert; + if (!fixed[y][x] && i < codewords.length * 8) { modules[y][x] = qrBit(codewords[i >>> 3], 7 - (i & 7)); i++; } + } + } + } + + const applyMask = mask => { + for (let y = 0; y < size; y++) for (let x = 0; x < size; x++) if (!fixed[y][x] && QR_MASKS[mask](x, y)) modules[y][x] = !modules[y][x]; + }; + let best = 0, bestPenalty = Infinity; + for (let mask = 0; mask < 8; mask++) { + applyMask(mask); + drawFormat(mask); + const penalty = qrPenalty(modules, size); + if (penalty < bestPenalty) { best = mask; bestPenalty = penalty; } + applyMask(mask); + } + applyMask(best); + drawFormat(best); + return Object.freeze({ size, modules: modules.map(row => Object.freeze(row)) }); +} + +// The mask penalty of ISO/IEC 18004 section 7.8.3: runs, 2x2 blocks, finder-like patterns, dark balance. +function qrPenalty(modules, size) { + let score = 0; + const addHistory = (run, history) => { if (history[0] === 0) run += size; history.pop(); history.unshift(run); }; + const countPatterns = h => { + const n = h[1]; + const core = n > 0 && h[2] === n && h[3] === n * 3 && h[4] === n && h[5] === n; + return (core && h[0] >= n * 4 && h[6] >= n ? 1 : 0) + (core && h[6] >= n * 4 && h[0] >= n ? 1 : 0); + }; + for (const line of [i => modules[i], i => modules.map(row => row[i])]) { + for (let a = 0; a < size; a++) { + const row = line(a); + let color = false, run = 0; + const history = new Array(7).fill(0); + for (let b = 0; b < size; b++) { + if (row[b] === color) { + run++; + if (run === 5) score += 3; else if (run > 5) score++; + } else { + addHistory(run, history); + if (!color) score += countPatterns(history) * 40; + color = row[b]; + run = 1; + } + } + if (color) { addHistory(run, history); run = 0; } + addHistory(run + size, history); + score += countPatterns(history) * 40; + } + } + let dark = 0; + for (let y = 0; y < size; y++) for (let x = 0; x < size; x++) { + if (modules[y][x]) dark++; + if (y < size - 1 && x < size - 1) { + const c = modules[y][x]; + if (c === modules[y][x + 1] && c === modules[y + 1][x] && c === modules[y + 1][x + 1]) score += 3; + } + } + const total = size * size; + score += (Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1) * 10; + return score; +} + +const requestProofBody = (prism, device) => ({ kind: KIND.request, prism, device }); +const linkContext = offer => ({ salt: fromBase64Url(offer.secret), info: 'prism/link-wrap/1', aad: offer.prism }); + +/** New device: answer an offer it read out of band. */ +export async function requestLink(device, offer) { + const key = await hmacKey(fromBase64Url(offer.secret), ['sign']); + const proof = await subtle.sign('HMAC', key, canonicalBytes(requestProofBody(offer.prism, device.record))); + return { kind: KIND.request, prism: offer.prism, device: device.record, proof: toBase64Url(proof) }; +} + +/** + * Existing member device: accept a link request. Refuses unless + * Stitch.PrismId.linkOfferAccepted holds: the person confirmed the matching + * six-digit code, the secret matches, the offer is unused and unexpired. + * A member receives the keyring, hybrid-wrapped when it advertises ML-KEM; + * a delegate receives no boundary key. + */ +export async function acceptLinkRequest(session, pending, request, { now, confirmCode }) { + await mayAdminister(session); + const { offer } = pending; + let secretMatches = false, userConfirmed = false; + if (request?.kind === KIND.request && request.prism === offer.prism) { + try { + checkDeviceRecord(request.device); + if (request.device.class === 'recovery') refuse('offer', 'a recovery device is never linked by offer'); + const key = await hmacKey(fromBase64Url(offer.secret), ['verify']); + secretMatches = await subtle.verify('HMAC', key, fromBase64Url(request.proof), canonicalBytes(requestProofBody(request.prism, request.device))); + userConfirmed = typeof confirmCode === 'string' && confirmCode === await linkCode(offer.secret, request.device); + } catch (error) { if (!(error instanceof PrismIdError)) throw error; } + } + if (!model['Stitch.PrismId.linkOfferAccepted'](userConfirmed, pending.used, secretMatches, offer.expires, now)) refuse('offer', 'link request refused'); + pending.used = true; + const bind = await signRecord(session.device, { kind: KIND.bind, prism: session.prism, device: request.device, role: offer.role, scope: offer.scope }); + const log = await addRecord(session.log, bind); + let wrap = null; + if (model['Stitch.PrismId.receivesPrivateBoundary'](offer.role === 'delegate')) { + requireShareable(session, 'link a member'); + wrap = await wrapTo(request.device, keyringBytes(session.keyring), linkContext(offer)); + } + const response = { kind: KIND.response, prism: session.prism, records: [...log.values()], personas: personaRecords(session), wrap }; + return { session: await servicePersonas({ ...session, log }), response }; +} + +/** New device: finish linking. Verifies that the prism now lists this device with the offered role. */ +export async function completeLink(device, offer, response) { + if (response?.kind !== KIND.response || response.prism !== offer.prism) refuse('response', 'response is for another prism'); + const log = await logFromRecords(response.records); + const state = await resolvePrism(offer.prism, log); + if (!state.active.includes(device.id) || state.roles[device.id] !== offer.role) refuse('response', 'the prism did not bind this device'); + const session = emptySession(offer.prism, device, log); + if (offer.role === 'member') { + if (!response.wrap) refuse('response', 'member link without the private boundary'); + const bytes = await unwrapFrom(device, response.wrap, linkContext(offer)); + session.keyring = await keyringFromBytes(bytes, true); + bytes.fill(0); + } + session.keyring = await absorbRekeys(session, state); + await mergePersonaRecords(session, response.personas); + return session; +} + +// ---------------------------------------------------------------- threshold recovery + +/** GF(2^8) with the AES polynomial; Shamir secret sharing over it. */ +const GF_EXP = new Uint8Array(512), GF_LOG = new Uint8Array(256); +{ + let x = 1; + for (let i = 0; i < 255; i++) { GF_EXP[i] = x; GF_LOG[x] = i; x ^= (x << 1) ^ ((x & 0x80) ? 0x11b : 0); x &= 0xff; } + for (let i = 255; i < 512; i++) GF_EXP[i] = GF_EXP[i - 255]; +} +const gfMul = (a, b) => (a && b ? GF_EXP[GF_LOG[a] + GF_LOG[b]] : 0); +const gfDiv = (a, b) => (a ? GF_EXP[GF_LOG[a] + 255 - GF_LOG[b]] : 0); + +export function splitSecret(secret, threshold, count) { + if (!Number.isSafeInteger(threshold) || !Number.isSafeInteger(count) || threshold < 1 || threshold > count || count > 255) + refuse('recovery', 'threshold must be between 1 and the number of guardians (at most 255)'); + const shares = Array.from({ length: count }, (_, i) => ({ index: i + 1, bytes: new Uint8Array(secret.length) })); + const coefficients = new Uint8Array(threshold); + for (let b = 0; b < secret.length; b++) { + coefficients[0] = secret[b]; + globalThis.crypto.getRandomValues(coefficients.subarray(1)); + for (const share of shares) { + let y = 0; + for (let c = threshold - 1; c >= 0; c--) y = gfMul(y, share.index) ^ coefficients[c]; + share.bytes[b] = y; + } + } + coefficients.fill(0); + return shares; +} + +export function combineShares(shares) { + const length = shares[0].bytes.length; + const out = new Uint8Array(length); + for (let b = 0; b < length; b++) { + let y = 0; + for (const i of shares) { + let basis = 1; + for (const j of shares) if (i !== j) basis = gfMul(basis, gfDiv(j.index, j.index ^ i.index)); + y ^= gfMul(i.bytes[b], basis); + } + out[b] = y; + } + return out; +} + +const shareContext = (prism, index) => ({ salt: encoder.encode(prism), info: 'prism/recovery-share/1', aad: `${prism} ${index}` }); + +async function exportDeviceSecret(keys) { + const secret = { + sign: await subtle.exportKey('jwk', keys.signing.privateKey), + agree: await subtle.exportKey('jwk', keys.agreement.privateKey) + }; + if (keys.kem) secret.kem = toBase64Url(await subtle.exportKey('pkcs8', keys.kem.privateKey)); + if (keys.pqsign) secret.pqsign = toBase64Url(await subtle.exportKey('pkcs8', keys.pqsign.privateKey)); + return secret; +} + +async function importDeviceSecret(record, secret) { + const strip = ({ kty, crv, x, y, d }) => ({ kty, crv, x, y, d }); + const signingKey = await subtle.importKey('jwk', strip(secret.sign), SIGN, false, ['sign']); + const agreementKey = await subtle.importKey('jwk', strip(secret.agree), AGREE, false, ['deriveBits']); + const kemKey = secret.kem ? await subtle.importKey('pkcs8', fromBase64Url(secret.kem), KEM, false, ['decapsulateBits']) : null; + const pqSigningKey = secret.pqsign ? await subtle.importKey('pkcs8', fromBase64Url(secret.pqsign), PQSIGN, false, ['sign']) : null; + return Object.freeze({ id: await kappa(record), record, signingKey, agreementKey, kemKey, pqSigningKey }); +} + +/** + * Set up threshold recovery. A recovery device is created whose private keys + * exist only as `threshold`-of-n shares, each sealed to one guardian: a device + * of another prism the person trusts (a shared boundary), a spare device of + * their own, or `{ paper: true }` for a share to print. The recovery device can + * link and revoke but never acts at a host. Needs a sharing member, or the + * current recovery device when rotating recovery. + */ +export async function createRecovery(session, { threshold, guardians }) { + const state = await mayAdminister(session); + requireShareable(session, 'set up recovery'); + if (!Array.isArray(guardians) || guardians.length < 1) refuse('recovery', 'at least one guardian is required'); + if (state.recovery && state.roles[session.device.id] !== 'recovery') refuse('recovery', 'recovery exists; only the recovery device may replace it'); + const keys = await newKeys(true); + const device = await deviceFromKeys(keys, 'recovery', 'threshold-shares'); + const bind = await signRecord(session.device, { kind: KIND.bind, prism: session.prism, device: device.record, role: 'recovery', scope: [] }); + const log = await addRecord(session.log, bind); + const after = await resolvePrism(session.prism, log); + if (after.roles[device.id] !== 'recovery') refuse('recovery', 'the prism did not accept the recovery device'); + const secret = canonicalBytes({ kind: KIND.recoverySecret, prism: session.prism, device: device.record, keys: await exportDeviceSecret(keys), keyring: JSON.parse(decoder.decode(keyringBytes(session.keyring))).keys }); + const parts = splitSecret(secret, threshold, guardians.length); + secret.fill(0); + const shares = []; + for (const [i, guardian] of guardians.entries()) { + const part = parts[i]; + const body = { kind: KIND.recoveryShare, prism: session.prism, recovery: device.id, threshold, index: part.index }; + if (guardian?.paper === true) shares.push({ ...body, guardian: 'paper', share: toBase64Url(part.bytes) }); + else { + checkDeviceRecord(guardian); + shares.push({ ...body, guardian: await kappa(guardian), wrap: await wrapTo(guardian, part.bytes, shareContext(session.prism, part.index)) }); + } + part.bytes.fill(0); + } + return { session: { ...session, log }, recovery: device.id, shares }; +} + +/** + * Guardian: release a share to the person's new device. The guardian confirms + * out of band that the new device is really the person's (a call, a meeting), + * and compares the code from recoveryCode on both screens. + */ +export async function releaseShare(guardianDevice, share, newDeviceRecord) { + if (share.kind !== KIND.recoveryShare || share.guardian !== guardianDevice.id) refuse('recovery', 'this share is not held by this guardian'); + const bytes = await unwrapFrom(guardianDevice, share.wrap, shareContext(share.prism, share.index)); + checkDeviceRecord(newDeviceRecord); + const released = { kind: KIND.recoveryShare, prism: share.prism, recovery: share.recovery, threshold: share.threshold, index: share.index, + guardian: await kappa(newDeviceRecord), wrap: await wrapTo(newDeviceRecord, bytes, shareContext(share.prism, share.index)) }; + bytes.fill(0); + return released; +} + +/** Code the new device shows and the guardian compares before releasing a share. */ +export async function recoveryCode(prism, newDeviceRecord) { + return linkCode(toBase64Url(encoder.encode(prism)), newDeviceRecord); +} + +/** + * Recover a prism on a new device from `threshold` shares. Refuses below the + * threshold (Stitch.PrismId.thresholdMet). The recovered recovery device binds + * the new device as a member and revokes every other device, which also stops + * any revocations a thief made from counting. Pass `rotateRecovery` with new + * guardians so the recovered secret is retired at once. Personas are carried + * over when their host-held logs are supplied. + */ +export async function recoverPrism({ prism, records, bus, shares, device, personas = {}, rotateRecovery }) { + let log = records === undefined ? null : await logFromRecords(records); + let state = log ? await resolvePrism(prism, log) : null; + if (!log && typeof bus?.retained !== 'function') refuse('recovery', 'give the prism log, or a bus that retains sync messages'); + const recoveryId = state ? state.recovery : shares.find(s => s?.kind === KIND.recoveryShare && s.prism === prism)?.recovery; + if (!recoveryId) refuse('recovery', 'this prism has no active recovery device'); + const parts = []; + for (const s of shares) { + if (s.kind !== KIND.recoveryShare || s.prism !== prism || s.recovery !== recoveryId) continue; + if (parts.some(p => p.index === s.index)) continue; + const bytes = s.guardian === 'paper' ? fromBase64Url(s.share) : await unwrapFrom(device, s.wrap, shareContext(prism, s.index)); + parts.push({ index: s.index, threshold: s.threshold, bytes }); + } + const threshold = parts[0]?.threshold ?? 0; + if (parts.some(p => p.threshold !== threshold) || !model['Stitch.PrismId.thresholdMet'](threshold, parts.length)) refuse('recovery', 'not enough shares'); + const secretBytes = combineShares(parts.slice(0, threshold)); + for (const p of parts) p.bytes.fill(0); + let secret; + try { secret = JSON.parse(decoder.decode(secretBytes)); } catch { refuse('recovery', 'the shares do not combine to a recovery secret'); } + secretBytes.fill(0); + if (secret.kind !== KIND.recoverySecret || secret.prism !== prism || await kappa(secret.device) !== recoveryId) refuse('recovery', 'the shares belong to another recovery device'); + const recovery = await importDeviceSecret(secret.device, secret.keys); + const snapshot = new Map(); + for (const [id, raw] of Object.entries(secret.keyring)) snapshot.set(id, await boundaryFromRaw(fromBase64Url(raw), true)); + let carried = personas; + if (!log) { + const found = await collectFromBus(prism, bus, recovery, snapshot); + log = found.log; + carried = { ...found.personas, ...personas }; + state = await resolvePrism(prism, log); + if (state.recovery !== recoveryId) refuse('recovery', 'the substrate holds no log in which this recovery device is active'); + } + let custodian = emptySession(prism, recovery, log); + custodian.keyring = snapshot; + custodian.keyring = await absorbRekeys(custodian, state); + // Bind the new device, then revoke every other device; each revocation rotates the boundary. + const bind = await signRecord(recovery, { kind: KIND.bind, prism, device: device.record, role: 'member', scope: [] }); + custodian.log = await addRecord(custodian.log, bind); + // Revoke from the recovery device every other device ever linked, including ones a thief revoked: + // once recovery revokes the thief, the thief's own revocations stop counting. + // A recovery device already retired keeps its one retirement; a second would fork the log. + const done = new Set([recovery.id, device.id, ...state.retired]); + for (let pending = [...state.active, ...state.revoked].filter(id => !done.has(id)); pending.length;) { + for (const id of pending) { done.add(id); custodian = await revokeDevice(custodian, id); } + const now = await resolvePrism(prism, custodian.log); + pending = now.active.filter(id => !done.has(id)); + } + custodian = await recoverPersonas(custodian, recovery, device, secret, carried); + let result = { ...emptySession(prism, device, custodian.log), personas: custodian.personas, personaDevices: custodian.personaDevices }; + result.keyring = await absorbRekeys(result, await resolvePrism(prism, custodian.log)); + for (const [id, entry] of custodian.keyring) if (!result.keyring.has(id) && entry.raw) result.keyring.set(id, await boundaryFromRaw(entry.raw, true)); + let newShares = null; + if (rotateRecovery) { + const rotated = await createRecovery({ ...custodian, keyring: result.keyring }, rotateRecovery); + custodian = await revokeDevice({ ...rotated.session, device: recovery, keyring: result.keyring }, recovery.id); + result = { ...result, log: custodian.log }; + result.keyring = await absorbRekeys(result, await resolvePrism(prism, custodian.log)); + newShares = rotated.shares; + } + return { session: result, shares: newShares }; +} + +/** + * Rebuild the prism log from sync messages the substrate retained, with no + * device and no other copy. The recovery device holds a snapshot of the + * keyring, and every rotation wraps the next boundary key to it, so it can + * open the retained messages on each sync topic in turn and follow the chain + * of rotations to the current key. Messages it cannot open are skipped. + */ +async function collectFromBus(prism, bus, device, keyring) { + const session = { ...emptySession(prism, device, new Map()), keyring: new Map(keyring) }; + const personas = {}; + const visited = new Set(); + for (let pending = [...session.keyring.keys()]; pending.length; pending = [...session.keyring.keys()].filter(id => !visited.has(id))) { + for (const id of pending) { + visited.add(id); + for (const bytes of await bus.retained(await syncTopic(session, id))) { + try { + if (!(bytes instanceof Uint8Array) || bytes.length > MAX_SYNC_BYTES) continue; + const message = await openPrivate(session, JSON.parse(decoder.decode(bytes))); + if (message.kind !== KIND.sync || message.prism !== prism) continue; + const log = mergeLogs(session.log, await logFromRecords(message.records)); + if (log.size > MAX_LOG_RECORDS) continue; + session.log = log; + for (const [pid, recs] of Object.entries(message.personas ?? {})) if (Array.isArray(recs)) personas[pid] = [...(personas[pid] ?? []), ...recs]; + } catch (error) { + // A retained message this device cannot open or parse is not evidence of anything; skip it. + if (!(error instanceof PrismIdError || error instanceof SyntaxError || error instanceof DOMException || error instanceof TypeError)) throw error; + } + } + } + if (session.log.size) session.keyring = await absorbRekeys(session, await resolvePrism(prism, session.log)); + } + if (!session.log.size) refuse('recovery', 'the substrate holds no sync message this recovery device can open'); + return { log: session.log, personas }; +} + +// ---------------------------------------------------------------- personas: one unlinkable id per host + +/** + * A persona is a prism of its own, one per host (audience). Each device has its + * own non-extractable persona key for that host, so two hosts never see the + * same prism id or device key and cannot link the person. Persona logs follow + * the same rules (resolvePrism) as the main prism. The main prism records which + * persona belongs to which host inside the private boundary only: the main log + * travels sealed between member devices and is never given to a host. + * + * When the main prism has a recovery device, each persona also gets a persona + * recovery device whose private keys are wrapped to the main recovery device. + * No member keeps them, so a revoked member cannot hijack a persona. + */ +export async function ensurePersona(session, audience, { presence } = {}) { + if (typeof audience !== 'string' || !audience) refuse('persona', 'audience must name a host'); + const state = await mayActForPersona(session); + const existing = choosePersona(session, audience); + if (existing) { + if (!session.personaDevices.has(audience)) { + const own = await createDevice({ deviceClass: session.device.record.class, protection: session.device.record.protection, presence }); + const request = await signRecord(session.device, { kind: KIND.personaKey, prism: session.prism, audience, persona: existing.persona, device: own.record }); + const personaDevices = new Map(session.personaDevices).set(audience, own); + return servicePersonas({ ...session, personaDevices, log: await addRecord(session.log, request) }); + } + return session; + } + const own = await createDevice({ deviceClass: session.device.record.class, protection: session.device.record.protection, presence }); + const genesis = await signRecord(own, { kind: KIND.genesis, device: own.record, nonce: toBase64Url(random(16)) }); + const persona = await kappa(genesis.body); + let personaLog = await logFromRecords([genesis]); + let recoverySeal = null; + if (state.recovery) { + const keys = await newKeys(true); + const personaRecovery = await deviceFromKeys(keys, 'recovery', 'threshold-shares'); + personaLog = await addRecord(personaLog, await signRecord(own, { kind: KIND.bind, prism: persona, device: personaRecovery.record, role: 'recovery', scope: [] })); + const secret = canonicalBytes({ kind: KIND.personaRecovery, persona, device: personaRecovery.record, keys: await exportDeviceSecret(keys) }); + recoverySeal = { recovery: state.recovery, ...await wrapTo(state.devices[state.recovery], secret, { salt: encoder.encode(persona), info: 'prism/persona-recovery/1', aad: persona }) }; + secret.fill(0); + } + const record = await signRecord(session.device, { kind: KIND.persona, prism: session.prism, audience, persona, recovery: recoverySeal }); + const keyRecord = await signRecord(session.device, { kind: KIND.personaKey, prism: session.prism, audience, persona, device: own.record }); + let log = await addRecord(session.log, record); + log = await addRecord(log, keyRecord); + const personas = new Map(session.personas).set(persona, personaLog); + const personaDevices = new Map(session.personaDevices).set(audience, own); + return servicePersonas({ ...session, log, personas, personaDevices }); +} + +async function mayActForPersona(session) { + const state = await resolvePrism(session.prism, session.log); + const id = session.device.id; + if (!model['Stitch.PrismId.deviceMaySign'](state.active.includes(id), state.revoked.includes(id))) refuse('unauthorized', 'this device may not act for the prism'); + return state; +} + +function personaEntries(session, kind) { + return [...session.log.entries()].filter(([, e]) => e.body.kind === kind && e.body.prism === session.prism); +} + +function choosePersona(session, audience) { + const found = personaEntries(session, KIND.persona).filter(([, e]) => e.body.audience === audience).sort(byKey); + return found.length ? found[0][1].body : null; +} + +/** What a host needs to verify this device's actions: the persona id and log for that host. */ +export async function personaFor(session, audience) { + const chosen = choosePersona(session, audience); + const own = session.personaDevices.get(audience); + if (!chosen || !own) refuse('persona', 'no persona for this host yet; call ensurePersona'); + const log = session.personas.get(chosen.persona); + const state = await resolvePrism(chosen.persona, log); + if (!state.active.includes(own.id)) refuse('persona', 'this device is not yet bound in the persona; another member must sync first'); + return { persona: chosen.persona, records: [...log.values()] }; +} + +/** Sign an action for a host under this device's persona there. */ +export async function signPersonaAction(session, audience, action, payload, { now, presence }) { + const { persona } = await personaFor(session, audience); + return signAction({ prism: persona, device: session.personaDevices.get(audience) }, action, payload, { now, audience, presence }); +} + +/** + * Keep every persona this device can administer in step with the main prism: + * bind persona keys requested by active main devices (with the same role and + * scope), and revoke persona keys of devices the main prism revoked. + */ +async function servicePersonas(session) { + if (!session.personas?.size) return session; + const state = await resolvePrism(session.prism, session.log); + const personas = new Map(session.personas); + for (const [audience, own] of session.personaDevices) { + const chosen = choosePersona(session, audience); + if (!chosen || !personas.has(chosen.persona)) continue; + let personaSession = { ...emptySession(chosen.persona, own, personas.get(chosen.persona)), shareable: false }; + let personaState = await resolvePrism(chosen.persona, personaSession.log); + if (!personaState.active.includes(own.id) || !['member', 'recovery'].includes(personaState.roles[own.id])) continue; + for (const [, e] of personaEntries(session, KIND.personaKey)) { + if (e.body.persona !== chosen.persona) continue; + const target = await kappa(e.body.device); + const role = state.roles[e.signer]; + if (state.revoked.includes(e.signer)) { + if (personaState.active.includes(target)) { + personaSession = await revokeDevice(personaSession, target, { rotate: false }); + personaState = await resolvePrism(chosen.persona, personaSession.log); + } + } else if (role && role !== 'recovery' && !personaState.active.includes(target) && !personaState.revoked.includes(target)) { + const bind = await signRecord(own, { kind: KIND.bind, prism: chosen.persona, device: e.body.device, role, scope: role === 'delegate' ? state.scopes[e.signer] : [] }); + personaSession.log = await addRecord(personaSession.log, bind); + personaState = await resolvePrism(chosen.persona, personaSession.log); + } + } + personas.set(chosen.persona, personaSession.log); + } + return { ...session, personas }; +} + +function personaRecords(session) { + return Object.fromEntries([...(session.personas ?? new Map())].map(([id, log]) => [id, [...log.values()]])); +} + +async function mergePersonaRecords(session, incoming) { + if (!incoming || typeof incoming !== 'object') return; + const known = new Set(personaEntries(session, KIND.persona).map(([, e]) => e.body.persona)); + for (const [id, records] of Object.entries(incoming)) { + if (!known.has(id)) continue; + const merged = mergeLogs(session.personas.get(id) ?? new Map(), await logFromRecords(records)); + await resolvePrism(id, merged); + session.personas.set(id, merged); + } +} + +async function recoverPersonas(custodian, recovery, device, secret, hostLogs) { + const personas = new Map(custodian.personas); + const personaDevices = new Map(); + let log = custodian.log; + for (const [, e] of personaEntries(custodian, KIND.persona)) { + const { audience, persona, recovery: seal } = e.body; + if (!seal || seal.recovery !== recovery.id || !hostLogs[persona]) continue; + const bytes = await unwrapFrom(recovery, seal, { salt: encoder.encode(persona), info: 'prism/persona-recovery/1', aad: persona }); + const sealed = JSON.parse(decoder.decode(bytes)); + bytes.fill(0); + const personaRecovery = await importDeviceSecret(sealed.device, sealed.keys); + let personaSession = { ...emptySession(persona, personaRecovery, await logFromRecords(hostLogs[persona])), shareable: false }; + const before = await resolvePrism(persona, personaSession.log); + if (!before.active.includes(personaRecovery.id)) continue; + const own = await createDevice({ deviceClass: device.record.class, protection: device.record.protection }); + personaSession.log = await addRecord(personaSession.log, await signRecord(personaRecovery, { kind: KIND.bind, prism: persona, device: own.record, role: 'member', scope: [] })); + for (const id of before.active) if (id !== personaRecovery.id) personaSession = await revokeDevice(personaSession, id, { rotate: false }); + log = await addRecord(log, await signRecord(device, { kind: KIND.personaKey, prism: custodian.prism, audience, persona, device: own.record })); + personas.set(persona, personaSession.log); + personaDevices.set(audience, own); + } + return { ...custodian, log, personas, personaDevices }; +} + +// ---------------------------------------------------------------- scoped actions and host admission + +/** + * Sign an action for a host (a foundry page, a native service, an embedded + * sink). `audience` names the host, so the envelope is useless anywhere else; + * a fresh nonce lets the host refuse replays. Prefer signPersonaAction, which + * shows the host only that host's persona. + * + * `presence(challenge)` asks the person to approve: in a browser it calls + * navigator.credentials.get with `challenge` and userVerification + * 'required', and returns `{ authenticatorData, clientDataJSON, signature }` + * as base64url. The challenge is the SHA-256 of the action body, so the + * assertion approves exactly this action. Script in the origin cannot make + * one without the person's gesture and verification. + */ +export async function signAction(session, action, payload, { now, audience, presence }) { + if (typeof action !== 'string' || !action) refuse('action', 'action must be a name'); + if (typeof audience !== 'string' || !audience) refuse('action', 'action must name its audience'); + const envelope = await signRecord(session.device, { kind: KIND.action, prism: session.prism, action, audience, payload, at: now, nonce: toBase64Url(random(16)) }); + if (typeof presence === 'function') { + if (!session.device.record.presence) refuse('presence', 'this device has no passkey bound to it'); + const assertion = await presence(await presenceChallenge(envelope.body)); + envelope.presence = { authenticatorData: assertion.authenticatorData, clientDataJSON: assertion.clientDataJSON, signature: assertion.signature }; + } + return envelope; +} + +/** The WebAuthn challenge that approves an action: SHA-256 of its canonical body. */ +export async function presenceChallenge(body) { + return new Uint8Array(await subtle.digest('SHA-256', canonicalBytes(body))); +} + +/** ECDSA signatures from WebAuthn are DER; WebCrypto verifies the raw r || s form. */ +function derToRaw(der) { + let i = 0; + const fail = () => refuse('presence', 'malformed assertion signature'); + if (der[i++] !== 0x30) fail(); + const total = der[i++]; + if (total & 0x80 || total + 2 !== der.length) fail(); + const integer = () => { + if (der[i++] !== 0x02) fail(); + const length = der[i++]; + if (length < 1 || length > 33 || i + length > der.length) fail(); + let value = der.subarray(i, i + length); + i += length; + if (value.length === 33) { if (value[0] !== 0) fail(); value = value.subarray(1); } + const out = new Uint8Array(32); + out.set(value, 32 - value.length); + return out; + }; + const r = integer(), s = integer(); + if (i !== der.length) fail(); + return concat(r, s); +} + +const sameBytes = (a, b) => a.length === b.length && a.every((x, i) => x === b[i]); + +/** + * Check a WebAuthn assertion against the passkey bound in the device record: + * type webauthn.get, the challenge for this action body, the bound origin and + * rp id, the user-present and user-verified flags, and the signature over + * authenticatorData || SHA-256(clientDataJSON). + */ +async function presenceEvidence(record, body, presence) { + const none = { userPresent: false, userVerified: false, challengeMatches: false, assertionValid: false }; + const binding = record?.presence; + if (!binding || !presence || typeof presence !== 'object') return none; + try { + const authData = fromBase64Url(presence.authenticatorData); + const clientDataBytes = fromBase64Url(presence.clientDataJSON); + const clientData = JSON.parse(decoder.decode(clientDataBytes)); + if (authData.length < 37) return none; + const rpHash = new Uint8Array(await subtle.digest('SHA-256', encoder.encode(binding.rp))); + const challengeMatches = clientData?.type === 'webauthn.get' && clientData.origin === binding.origin && + clientData.challenge === toBase64Url(await presenceChallenge(body)) && sameBytes(authData.subarray(0, 32), rpHash); + const key = await subtle.importKey('jwk', { ...binding.key, ext: true }, SIGN, false, ['verify']); + const signed = concat(authData, new Uint8Array(await subtle.digest('SHA-256', clientDataBytes))); + const assertionValid = await subtle.verify(SIGN_HASH, key, derToRaw(fromBase64Url(presence.signature)), signed); + return { userPresent: (authData[32] & 0x01) !== 0, userVerified: (authData[32] & 0x04) !== 0, challengeMatches, assertionValid }; + } catch (error) { + if (error instanceof PrismIdError || error instanceof SyntaxError || error instanceof DOMException || error instanceof TypeError) return none; + throw error; + } +} + +/** + * Host side. Allowed only when Stitch.PrismId.actionFresh holds (this + * audience, nonce not seen, issued within `window` of now) and + * Stitch.PrismId.actionAllowed holds (an active member, or a delegate acting + * inside its scope; a recovery device never acts). `seen` is the host's replay + * set for the window. `prism` and `log` are the persona the device presented. + * + * `requirePresence` (true, or a list of action names) makes the host accept + * those actions only with the person's user-verified WebAuthn approval of + * exactly this action (Stitch.PrismId.presenceSatisfied). `requirePostQuantum` + * refuses an action whose ML-DSA signature this host cannot check. `bus` + * makes the host also merge what the prism's public topic retains (heardLog), + * so it hears revocations the signing device does not present. + */ +export async function verifyAction(prism, log, envelope, { audience, now, window = 60000, seen = new Set(), requirePresence = false, requirePostQuantum = false, bus }) { + if (bus) log = await heardLog(prism, log, bus); + const body = envelope?.body; + if (body?.kind !== KIND.action || body.prism !== prism || !Number.isSafeInteger(body.at) || body.at < 0 || typeof body.nonce !== 'string') + return { allowed: false, reason: 'not an action of this prism' }; + const state = await resolvePrism(prism, log); + const id = envelope.signer; + if (!state.devices[id] && !state.revoked.includes(id)) return { allowed: false, reason: 'unknown device' }; + if (!state.devices[id] || !await signatureValid(envelope, state.devices[id], { requirePostQuantum })) return { allowed: false, reason: 'signature or revocation' }; + const replayKey = `${id} ${body.nonce}`; + if (!model['Stitch.PrismId.actionFresh'](body.audience === audience, !seen.has(replayKey), body.at, now, window)) + return { allowed: false, reason: 'audience, replay or time window' }; + const required = requirePresence === true || (Array.isArray(requirePresence) && requirePresence.includes(body.action)); + const evidence = required ? await presenceEvidence(state.devices[id], body, envelope.presence) : {}; + if (!model['Stitch.PrismId.presenceSatisfied'](required, evidence.userPresent === true, evidence.userVerified === true, + evidence.challengeMatches === true, evidence.assertionValid === true)) return { allowed: false, reason: 'approval' }; + const role = state.roles[id]; + const scoped = role !== 'member'; + const allowed = model['Stitch.PrismId.actionAllowed'](true, state.revoked.includes(id), scoped, role === 'delegate' && state.scopes[id].includes(body.action)); + if (allowed) seen.add(replayKey); + return { allowed, reason: allowed ? 'ok' : 'scope', device: state.devices[id], role }; +} + +/** + * Host policy for a device. A host that requires hardware-held keys admits a + * device only when one of the host's own verifiers (Android key attestation, + * Apple App Attest, a TPM quote, a secure-element certificate chain, each with + * roots the host pins) confirms hardware protection of exactly this device's + * signing key (Stitch.PrismId.attestationBinds). The record's `protection` + * field is a claim, never evidence. + */ +export async function admitDevice(policy, deviceRecord, evidence, verifiers = {}) { + checkDeviceRecord(deviceRecord); + let attested = false; + if (policy?.requiresHardwareKey === true && evidence && typeof verifiers[evidence.format] === 'function') { + const result = await verifiers[evidence.format](evidence, deviceRecord); + const keyMatches = !!result?.key && result.key.x === deviceRecord.sign.x && result.key.y === deviceRecord.sign.y && result.key.crv === 'P-256'; + attested = model['Stitch.PrismId.attestationBinds'](result?.hardware === true, keyMatches); + } + return hostAdmitsDevice(policy, { attestedHardwareKey: attested }); +} + +export function hostAdmitsDevice({ requiresHardwareKey = false } = {}, { attestedHardwareKey = false } = {}) { + return model['Stitch.PrismId.hostAdmitsDevice'](requiresHardwareKey === true, attestedHardwareKey === true); +} + +// ---------------------------------------------------------------- boundaries and sealed content + +/** + * A boundary record. One identity: private. Two or more: shared, which is + * public to its members (Stitch.PrismId.boundaryShared). Published: public. + */ +export function describeBoundary({ members, published = false }) { + const unique = [...new Set(members)].sort(); + if (!unique.length || !unique.every(isKappa)) refuse('boundary', 'members must be prism ids'); + const shared = model['Stitch.PrismId.boundaryShared'](unique.length); + return { kind: KIND.boundary, members: unique, published, visibility: published ? 'public' : shared ? 'shared' : 'private' }; +} + +export function boundaryVisibleTo(boundary, prism) { + return model['Stitch.PrismId.boundaryVisibleTo'](boundary.members.includes(prism), boundary.published === true); +} + +/** + * Sealed plaintext is padded (ISO/IEC 7816-4) to a power-of-two bucket of at + * least 1 KiB, so observers learn only the bucket, not the exact size. + */ +export function padToBucket(bytes, minimum = 1024) { + if (!Number.isSafeInteger(minimum) || minimum < 1024 || (minimum & (minimum - 1)) !== 0) refuse('padding', 'bucket must be a power of two of at least 1024'); + let size = minimum; + while (size < bytes.length + 1) size *= 2; + const out = new Uint8Array(size); + out.set(bytes); + out[bytes.length] = 0x80; + return out; +} + +export function unpad(bytes) { + let end = bytes.length - 1; + while (end >= 0 && bytes[end] === 0) end--; + if (end < 0 || bytes[end] !== 0x80) refuse('padding', 'malformed padding'); + return bytes.subarray(0, end); +} + +/** Seal a JSON value under the current private boundary key. The sealed object's kappa is its address. */ +export async function sealPrivate(session, value) { + const { keyId } = await currentBoundary(session); + return sealWith(session, keyId, value); +} + +async function sealWith(session, keyId, value, { bucket = 1024 } = {}) { + const entry = session.keyring.get(keyId); + if (!entry) refuse('stale-key', 'this device does not hold that boundary key'); + const padded = padToBucket(canonicalBytes(value), bucket); + const sealed = { kind: KIND.sealed, boundary: 'private', key: keyId, ...await encryptWith(entry.seal, padded, session.prism) }; + return { address: await kappa(sealed), sealed, bucket: padded.length }; +} + +/** Open sealed content with whichever key it names, including keys from before a rotation. */ +export async function openPrivate(session, sealed) { + const entry = session.keyring.get(sealed?.key); + if (!entry) refuse('stale-key', 'this device does not hold that boundary key'); + return JSON.parse(decoder.decode(unpad(await decryptWith(entry.seal, sealed, session.prism)))); +} + +// ---------------------------------------------------------------- substrate sync + +/** The sync topic for a boundary key. Only devices holding that key can derive it. */ +export async function syncTopic(session, keyId) { + const id = keyId ?? (await currentBoundary(session)).keyId; + const entry = session.keyring.get(id); + if (!entry) refuse('stale-key', 'this device does not hold that boundary key'); + return 'prism-sync:' + hex(await subtle.sign('HMAC', entry.topic, canonicalBytes({ kind: KIND.sync, prism: session.prism }))); +} + +/** + * Publish this device's log and persona logs to its other member devices, + * sealed in the private boundary. After a rotation, publish once under the + * previous key so devices still listening there can take up the new key. + * Returns the padded bucket, so a cadence can keep every message that size. + */ +export async function publishSync(session, bus, { keyId, bucket } = {}) { + const id = keyId ?? (await currentBoundary(session)).keyId; + const sealed = await sealWith(session, id, { kind: KIND.sync, prism: session.prism, records: [...session.log.values()], personas: personaRecords(session) }, { bucket }); + await bus.publish(await syncTopic(session, id), canonicalBytes(sealed.sealed)); + return { bucket: sealed.bucket }; +} + +/** A cover message: sealed and padded like a sync message, ignored by receivers. */ +export async function publishCover(session, bus, { bucket = 1024 } = {}) { + const { keyId } = await currentBoundary(session); + const sealed = await sealWith(session, keyId, { kind: KIND.cover, prism: session.prism }, { bucket }); + await bus.publish(await syncTopic(session, keyId), canonicalBytes(sealed.sealed)); + return { bucket: sealed.bucket }; +} + +/** + * Constant-cadence sync. Call `tick` on a fixed timer: it publishes a pending + * sync if there is one, otherwise a cover message, always padded to the same + * bucket. A relay then sees one message of one size per interval whether or + * not anything changed. The bucket only grows, when the log outgrows it. + * + * `refresh` keeps the substrate holding the prism: every `refresh` ticks a + * real sync goes out even with nothing pending, so a relay that keeps messages + * only for a while (the warm relay keeps them 30 minutes) always holds a + * recent one for offline devices and log-free recovery. Choose it so that + * `refresh` intervals are shorter than the relay's lifetime. Each real sync + * also publishes the public log (publishLog), so hosts hear revocations. + * Cover ticks publish nothing there; the public log holds no secret, but its + * timing shows which ticks were real. + */ +export function createSyncCadence({ bucket = 1024, refresh = Infinity } = {}) { + if (!(refresh === Infinity || (Number.isSafeInteger(refresh) && refresh > 0))) refuse('sync', 'refresh is a whole number of ticks'); + let pending = false, size = bucket, since = 0; + return { + queue() { pending = true; }, + get bucket() { return size; }, + async tick(session, bus) { + since++; + const real = pending || since >= refresh; + const sent = real ? await publishSync(session, bus, { bucket: size }) : await publishCover(session, bus, { bucket: size }); + if (real) { await publishLog(session, bus); since = 0; } + pending = false; + size = Math.max(size, sent.bucket); + } + }; +} + +/** Merge a sync message. Records that do not resolve for this prism are refused. */ +export async function receiveSync(session, bytes) { + if (!(bytes instanceof Uint8Array) || bytes.length > MAX_SYNC_BYTES) refuse('sync', `sync message exceeds ${MAX_SYNC_BYTES} bytes`); + const message = await openPrivate(session, JSON.parse(decoder.decode(bytes))); + if (message.kind === KIND.cover && message.prism === session.prism) return session; + if (message.kind !== KIND.sync || message.prism !== session.prism) refuse('sync', 'sync message for another prism'); + const log = await admitRecords(session.prism, session.log, await logFromRecords(message.records)); + if (log.size > MAX_LOG_RECORDS) refuse('log', `log exceeds ${MAX_LOG_RECORDS} records`); + const state = await resolvePrism(session.prism, log); + const next = { ...session, log, personas: new Map(session.personas) }; + next.keyring = await absorbRekeys(next, state); + await mergePersonaRecords(next, message.personas); + return servicePersonas(next); +} + +// ---------------------------------------------------------------- what hosts hear + +/** + * The public topic of a prism's log, derived from the prism id alone, so a + * host that knows the prism reads it with no secret. It carries only the + * signed public records (genesis, binds and revocations) a host already + * receives with every action. Publish a persona's own log under the persona, + * so hosts still cannot link personas; the main prism's log goes here only + * when the main prism is what hosts see. + */ +export async function logTopic(prism) { + if (!isKappa(prism)) refuse('log', 'not a prism id'); + return 'prism-log:' + (await kappa({ kind: KIND.publicLog, prism })).slice(7); +} + +/** Publish this prism's public log where hosts hear it: after every bind or revocation, and on the refresh cadence. */ +export async function publishLog(session, bus) { + await bus.publish(await logTopic(session.prism), canonicalBytes({ kind: KIND.publicLog, prism: session.prism, records: [...session.log.values()] })); +} + +/** + * `log` merged with what the substrate retains on the prism's public topic, + * so a host hears a revocation the signing device never presents. Messages + * for another prism, over the bounds, or malformed are skipped. Every record + * is still checked by resolvePrism, so a forged one counts for nothing. + * + * A host merges everything it hears, so a fork made with a replayed old + * recovery kit leaves it a log that does not resolve, and it acts for neither + * side. A device checking its own log passes `own: true`: what it hears is + * admitted as by admitRecords, so the fork never reaches the log it holds. + */ +export async function heardLog(prism, log, bus, { own = false } = {}) { + let merged = log; + for (const bytes of await bus.retained(await logTopic(prism))) { + try { + if (!(bytes instanceof Uint8Array) || bytes.length > MAX_SYNC_BYTES) continue; + const message = JSON.parse(decoder.decode(bytes)); + if (message?.kind !== KIND.publicLog || message.prism !== prism) continue; + const records = await logFromRecords(message.records); + const next = own ? await admitRecords(prism, merged, records) : mergeLogs(merged, records); + if (next.size <= MAX_LOG_RECORDS) merged = next; + } catch (error) { + // A message that does not parse as this prism's log is not evidence of anything; skip it. + if (!(error instanceof PrismIdError || error instanceof SyntaxError || error instanceof TypeError)) throw error; + } + } + return merged; +} + +/** How many messages per topic the in-memory bus retains. */ +export const MAX_RETAINED = 256; + +/** + * The bus contract the substrate implements: publish bytes to a topic, deliver + * them to subscribers, and retain recent messages per topic so a device that + * was offline, or a recovering device with no copy of the log, can read them + * later (`retained`). This in-memory bus is for tests and single-page use. + */ +export function createMemoryBus() { + const subscribers = new Map(); + const kept = new Map(); + return { + async publish(topic, bytes) { + const list = kept.get(topic) ?? []; + list.push(new Uint8Array(bytes)); + if (list.length > MAX_RETAINED) list.shift(); + kept.set(topic, list); + for (const fn of [...(subscribers.get(topic) ?? [])]) await fn(new Uint8Array(bytes)); + }, + async retained(topic) { + return (kept.get(topic) ?? []).map(b => new Uint8Array(b)); + }, + subscribe(topic, fn) { + if (!subscribers.has(topic)) subscribers.set(topic, new Set()); + subscribers.get(topic).add(fn); + return () => subscribers.get(topic)?.delete(fn); + } + }; +} + +// ---------------------------------------------------------------- the substrate bus + +/* + * The bus contract above on stitch's own transport, so a prism needs no + * server of its own: + * + * - Across devices and origins: stitch's warm relay (ntfy, with stitch's relay + * framing, docs/relay-framing.md). The relay topic is hashed from the prism + * topic, which only holders of the secret can derive, so the relay sees an + * opaque name and sealed or HMAC-bound bytes. A message stays fetchable for + * the warm lifetime (30 minutes); the relay promises no retention. + * - In one origin: BroadcastChannel, so tabs of one app hear each other at once. + * + * Every message carries its prism topic, a subscriber delivers only messages + * for the topic it asked for, and a bus never hears itself. Bytes are + * delivered as received; receiveSync and completeLink check every one. + */ +const BUS_KIND = 'prism/bus/1'; +const BUS_TOPIC = /^prism-[a-z]+:[0-9a-f]{64}$/; +const WARM_SINCE = `${Math.floor(RELAY_LIFETIMES.warm / 60000)}m`; +const POLL_BYTES = 2 * 1024 * 1024; + +function checkBusTopic(topic) { + if (typeof topic !== 'string' || !BUS_TOPIC.test(topic)) throw new TypeError('not a prism topic'); + return topic; +} + +/** The relay's name for a prism topic: a domain-separated hash, at most 64 characters as ntfy requires. */ +export async function relayTopic(topic) { + return 'prism-' + (await relayChannel(checkBusTopic(topic))).slice(7, 65); +} + +/** + * The bus. `relay` is the warm relay's base URL; `relay: null` keeps the bus + * in this origin. Effects are injectable for tests and other hosts. + */ +export function createRelayBus({ + relay = 'https://ntfy.sh', + fetch: fetchImpl = globalThis.fetch?.bind(globalThis), + WebSocket: Socket = globalThis.WebSocket, + BroadcastChannel: Channel = globalThis.BroadcastChannel +} = {}) { + const from = newRelaySession(); + const wsBase = relay && relay.replace(/^http/, 'ws'); + const channels = new Map(); + const local = topic => { + if (!Channel) return null; + if (!channels.has(topic)) channels.set(topic, new Channel(`stitch:${topic}`)); + return channels.get(topic); + }; + const envelope = (topic, bytes) => ({ kind: BUS_KIND, from, topic, bytes: toBase64Url(bytes) }); + // A message for this topic from another bus, or null. + const unwrap = (topic, value) => value?.kind === BUS_KIND && value.topic === topic && value.from !== from && typeof value.bytes === 'string' + ? fromBase64Url(value.bytes) : null; + const assembler = topic => new RelayReassembler({ channelKey: topic, scope: 'warm' }); + // One bounded line of ntfy's JSON stream: a framed stitch message, or nothing. + const frameOf = line => { + if (typeof line !== 'string' || !line || line.length > RELAY_EVENT_BYTES) return null; + const event = JSON.parse(line); + return event.event === 'message' && typeof event.message === 'string' && !event.attachment ? event.message : null; + }; + + /** Resolves true when every frame was acknowledged by the relay (or there is no relay). Not a delivery receipt. */ + async function publish(topic, bytes) { + checkBusTopic(topic); + const value = envelope(topic, bytes); + local(topic)?.postMessage(value); + if (!relay || !fetchImpl) return true; + const snapshot = snapshotRelayMessage(value); + const { frames } = await frameRelayMessage(snapshot, { channelKey: topic, session: from, scope: 'warm' }); + const url = `${relay}/${await relayTopic(topic)}`; + for (const body of frames) { + const response = await fetchImpl(url, { method: 'POST', body, headers: { 'Content-Type': 'text/plain; charset=utf-8', Cache: 'yes' } }); + if (!response.ok) return false; + } + return true; + } + + /** `retained`: the messages other buses left on the relay for a topic within the warm lifetime, oldest first. */ + async function fetchTopic(topic) { + checkBusTopic(topic); + if (!relay || !fetchImpl) return []; + const response = await fetchImpl(`${relay}/${await relayTopic(topic)}/json?poll=1&since=${WARM_SINCE}`); + if (!response.ok) return []; + const text = await response.text(); + if (text.length > POLL_BYTES) return []; + const reassembler = assembler(topic), out = []; + try { + for (const line of text.split('\n')) { + try { + const frame = frameOf(line); + const message = frame && unwrap(topic, await reassembler.accept(frame)); + if (message) out.push(message); + } catch { /* a refused frame is skipped; the others still count */ } + } + } finally { reassembler.dispose(); } + return out; + } + + /** + * Calls fn(bytes) for each message on the topic: those the relay still + * holds, then new ones from the relay and from this origin. Returns a + * function that stops it. A failing fn does not stop the subscription. + */ + function subscribe(topic, fn) { + checkBusTopic(topic); + let open = true, socket = null, reassembler = null; + const deliver = bytes => { if (open && bytes) Promise.resolve().then(() => fn(bytes)).catch(() => {}); }; + const channel = local(topic); + const onLocal = event => deliver(unwrap(topic, event.data)); + channel?.addEventListener('message', onLocal); + if (relay && fetchImpl) fetchTopic(topic).then(list => list.forEach(deliver), () => {}); + if (relay && Socket) { + reassembler = assembler(topic); + relayTopic(topic).then(name => { + if (!open) return; + socket = new Socket(`${wsBase}/${name}/ws`); + socket.onmessage = async event => { + try { + const frame = frameOf(event.data); + deliver(frame && unwrap(topic, await reassembler.accept(frame))); + } catch { /* a refused frame is skipped */ } + }; + }, () => {}); + } + return () => { + open = false; + channel?.removeEventListener('message', onLocal); + socket?.close(); + reassembler?.dispose(); + }; + } + + function close() { + for (const channel of channels.values()) channel.close(); + channels.clear(); + } + + return { publish, subscribe, retained: fetchTopic, close }; +} diff --git a/src/product-experience.js b/src/product-experience.js new file mode 100644 index 0000000..a018667 --- /dev/null +++ b/src/product-experience.js @@ -0,0 +1,148 @@ +/** + * Handwritten DOM adapter for source-projected Product.Experience declarations. + * This reads existing runtime observations. It does not keep a second effect, + * custody, publication or resource ledger, and is not a host certificate. + */ +import { model, MODEL_SOURCE } from './layer1-uor/generated-model.js'; + +const project = (name, ...args) => model[`Product.Experience.${name}`](...args); +export const operatorJourneys = Object.freeze(project('journeys')); +export const operatorActions = Object.freeze(project('actions')); +export const experienceProvenance = Object.freeze({ + source: 'app/src/Product/Experience.lex.tex', + sourceSha256: MODEL_SOURCE.sources.find(s => s.path === 'app/src/Product/Experience.lex.tex').sha256, + assurance: 'Project-owned source projection and handwritten DOM adapter; not whole-host certification', +}); + +export function experienceFacts(observations = {}) { + // Reject undeclared or inexact observations through the same source evaluator. + const facts = { ...project('initialFacts'), ...observations }; + project('actionAllowed', 15, facts); + return facts; +} +export const experienceView = (journey, facts) => project(`${journey}View`, facts); +export const experienceActionAllowed = (control, facts) => { + const action = operatorActions.find(a => a.control === control); + return Boolean(action && project('actionAllowed', action.code, facts)); +}; +export const integrityLabel = verified => project('integrityLabel', verified); +export const executionLabel = replayed => project('executionLabel', replayed); + +/** Native buttons retain Enter/Space semantics; navigation never changes the + * mesh-key URL hash or browser history. Focus moves only on explicit navigation, + * never on asynchronous status updates. Scrolling is nonanimated, including for + * reduced-motion users. Model text always enters the DOM via textContent. + */ +export function createOperatorExperience({ document, snapshot, onRefused = () => {} }) { + const get = id => document.getElementById(id); + const styles = new Map(project('evidenceStyles').map(s => [s.id, s.color])); + const facts = () => experienceFacts(snapshot()); + let selected = operatorJourneys[0].id; + const previousViews = new Map(); + const nav = get('operatorJourneyNav'); + nav.setAttribute('aria-label', project('navigationLabel')); + const buttons = new Map(); + const descriptions = new Map(operatorActions.map(action => { + const control = get(action.control); + return [action.control, control.getAttribute?.('aria-describedby') || control.attributes?.['aria-describedby'] || '']; + })); + function report(control, message) { + const action = operatorActions.find(a => a.control === control); + if (action) get(`${action.journey}ActionStatus`).textContent = message; + } + function navigate(journey) { + selected = journey.id; + render(); + const target = get(journey.target); + // Selected context is source-owned. Existing inputs and domain state are retained. + if (project('focusNavigationTarget')) target.focus({ preventScroll: true }); + target.scrollIntoView({ behavior: project('navigationScrollBehavior'), block: 'start' }); + } + nav.replaceChildren(...operatorJourneys.map(journey => { + const button = document.createElement('button'); + button.type = 'button'; button.className = 'secondary'; + button.textContent = journey.title; + button.setAttribute('aria-controls', journey.target); + button.addEventListener('click', () => navigate(journey)); + buttons.set(journey.id, button); + const target = get(journey.target); + target.tabIndex = -1; + target.setAttribute('aria-labelledby', `${journey.id}Title`); + get(`${journey.id}Title`).textContent = journey.title; + get(`${journey.id}ExplanationLabel`).textContent = project('explanationLabel'); + const evidence = get(`${journey.id}Evidence`); + evidence.setAttribute('role', 'status'); + evidence.setAttribute('aria-live', project('statusLivePolicy')); + evidence.setAttribute('aria-atomic', 'true'); + return button; + })); + get('reviewResourcePolicyBtn').textContent = project('recoveryPolicyLabel'); + get('reviewResourcePolicyBtn').addEventListener('click', () => navigate(operatorJourneys.find(j => j.id === 'resources'))); + get('productTitle').textContent = project('productTitle'); + get('meshDisclosureText').textContent = project('disclosureLabel'); + get('relayDisclosureText').textContent = project('relayLabel'); + get('experienceProvenance').textContent = project('provenanceLabel'); + get('experienceProvenance').setAttribute('data-model-source-sha256', experienceProvenance.sourceSha256); + function render() { + const observation = facts(); + for (const [index, journey] of operatorJourneys.entries()) { + const view = experienceView(journey.id, observation); + const evidence = get(`${journey.id}Evidence`); + const text = `${view.title}. ${view.evidence}.`; + get(journey.target).hidden = !project('journeyVisible', operatorJourneys.findIndex(j => j.id === selected), index); + get(`${journey.id}Explanation`).textContent = view.detail; + if (previousViews.get(journey.id) !== view.id) { + get(`${journey.id}ExplanationPanel`).open = project('explanationInitiallyOpen', observation, index); + previousViews.set(journey.id, view.id); + } + // Avoid repeating unchanged polite announcements on each scheduler tick. + if (evidence.textContent !== text) evidence.textContent = text; + evidence.setAttribute('data-experience-state', view.id); + const tone = project('viewStyle', observation, index); + evidence.setAttribute('data-evidence-style', tone); + evidence.style.color = styles.get(tone); + evidence.style.borderInlineStartColor = styles.get(tone); + buttons.get(journey.id).setAttribute('aria-current', journey.id === selected ? 'location' : 'false'); + if (journey.id === selected) { + get('operatorJourneySummary').textContent = journey.summary; + get('operatorNextActions').textContent = operatorActions.filter(a => a.journey === selected && + project('actionAllowed', a.code, observation)).map(a => a.label).join(' · ') || view.detail; + } + } + const recovery = project('recoveryView', observation); + get('recoveryEvidence').textContent = `${recovery.title}. ${recovery.evidence}. ${recovery.detail}`; + get('reviewResourcePolicyBtn').hidden = !project('recoveryPolicyVisible', observation); + get('pointerPublicationSetup').hidden = !project('publicationSetupVisible', observation); + get('pointerAdmissionControls').hidden = !project('admissionInputVisible', observation); + if (project('publicationSetupInitiallyOpen', observation)) get('pointerPublicationSetup').open = true; + get('vmCommandControls').hidden = !project('vmCommandVisible', observation); + // Keep experimental output contextual even if it was opened on an earlier visit. + if (selected !== 'resources') get('metricsLabSection').style.display = 'none'; + for (const action of operatorActions) { + const control = get(action.control); + control.textContent = action.label; + control.title = action.help; + control.setAttribute('aria-describedby', [...new Set(`${descriptions.get(action.control)} ${action.journey}Evidence ${action.journey}ActionStatus`.trim().split(/\s+/))].join(' ')); + control.disabled = !project('actionAllowed', action.code, observation); + // A separate control makes reconciliation explicit, not a renamed write. + if (action.id === 'publish') control.hidden = observation.publicationUnknown; + if (action.id === 'reconcile') control.hidden = !observation.publicationUnknown; + } + return observation; + } + function allow(control) { + const observation = render(); + if (experienceActionAllowed(control, observation)) return true; + const action = operatorActions.find(a => a.control === control); + const message = action ? `${action.label}: ${action.help}` : 'Unknown operator action refused.'; + report(control, message); + onRefused(message); + return false; + } + render(); + return Object.freeze({ facts, render, allow, report, navigate: id => { + const journey = operatorJourneys.find(j => j.id === id); + if (!journey) throw new TypeError('Unknown operator journey'); + navigate(journey); + } }); +} diff --git a/src/recovery-ui.js b/src/recovery-ui.js new file mode 100644 index 0000000..c112e0f --- /dev/null +++ b/src/recovery-ui.js @@ -0,0 +1,170 @@ +/** Explicit local recovery journey. Never invokes a mesh, VM or DNS adapter. */ +import { RecoveryVault, RECOVERY_LIMITS, recoveryObject, exportRecoveryBundle } from './recovery.js'; +import { resumeProgram, programWork } from './layer4-compute/replay.js'; +export function installRecoveryControls({ document, liveDb, computeCoord, pointerObservers, pointerObserver, bindModelAction, onChange = () => {} }) { + const get = id => document.getElementById(id); + const vault = new RecoveryVault(); + let busy = false, restoreGeneration = 0; + const status = message => { get('recoveryStatus').textContent = message; }; + const download = (bytes, name, type) => { + const url = URL.createObjectURL(new Blob([bytes], { type })); + const link = document.createElement('a'); link.href = url; link.download = name; link.click(); + setTimeout(() => URL.revokeObjectURL(url), 0); + }; + function replaceChoices(id, choices, empty) { + const control = get(id), previous = control.value; + if (!choices.length) { + const option = document.createElement('option'); option.value = ''; option.textContent = empty; option.disabled = true; + choices = [option]; + } + control.replaceChildren(...choices); + if (choices.some(option => option.value === previous)) control.value = previous; + } + const liveScope = () => ({ name: get('dnsQueryInput').value.trim(), authorityKey: get('pointerAuthorityInput').value.trim() }); + function selectedAcceptance(state = vault.snapshot()) { + const supplied = state.bundle.anchors.find(a => a.name === get('recoveryAnchors').value); + return state.acceptedAnchors.find(a => a.pointerDigest === supplied?.pointerDigest && + a.authorityKey === get('recoveryAuthority').value.trim() && a.pointerDigest === get('recoveryDigest').value.trim()); + } + function render() { + const snapshot = vault.snapshot(); + replaceChoices('recoveryObjects', snapshot.bundle.objects.map(o => { + const option = document.createElement('option'); option.value = o.manifest.object.contentDigest; + option.textContent = `${o.manifest.object.byteLength} bytes · ${option.value}`; return option; + }), 'No objects imported'); + replaceChoices('recoveryJobs', snapshot.bundle.jobs.map(j => { + const option = document.createElement('option'); option.value = j.checkpoint.jobId; + option.textContent = `${j.checkpoint.stepIndex}/${j.program.instructions.length} steps · ${option.value}`; return option; + }), 'No jobs imported'); + replaceChoices('recoveryAnchors', snapshot.bundle.anchors.map(a => { + const option = document.createElement('option'); option.value = a.name; + option.textContent = `${a.name} · revision ${a.revision} · ${snapshot.acceptedAnchors.some(x => x.pointerDigest === a.pointerDigest) ? 'operator-accepted' : 'untrusted supplied evidence'}`; + return option; + }), 'No anchors imported'); + } + function bind(id, action) { + bindModelAction(id, async () => { + if (busy) return; + busy = true; + get('recoveryControls').setAttribute('aria-busy', 'true'); + status('Recovery operation in progress. No mesh, VM or DNS effects are started by these controls.'); + onChange(); + const controls = [...get('recoveryControls').querySelectorAll('button')]; controls.forEach(c => { c.disabled = true; }); + try { await action(); render(); } + catch (error) { status(`Refused; retained recovery evidence unchanged: ${error.code || error.message}`); } + finally { busy = false; get('recoveryControls').setAttribute('aria-busy', 'false'); onChange(); } + }); + } + const options = () => ({ wireBytes: Number(get('recoveryByteLimit').value), replaySteps: Number(get('recoveryStepLimit').value) }); + get('recoveryByteLimit').value = RECOVERY_LIMITS.wireBytes; + get('recoveryStepLimit').value = RECOVERY_LIMITS.replaySteps; + let exportSelectionInitialized = false; + function refreshExportSelection() { + const previous = new Map([...get('recoveryExportSelection').selectedOptions].map(option => [option.value, true])); + const rows = [ + ...[...liveDb.objects.entries()].filter(([, e]) => e.verified && e.bytes).map(([key, e]) => ({ key: `object:${key}`, label: `Object ${e.label || key} (${e.bytes.length} bytes)` })), + ...[...computeCoord.jobs.entries()].map(([key, j]) => ({ key: `job:${key}`, label: `Job ${key} (${j.stepIndex}/${j.totalSteps})` })), + ...[...pointerObservers.entries()].filter(([, o]) => o.head).map(([key, o]) => ({ key: `anchor:${key}`, label: `Pointer ${o.head.name} revision ${o.head.revision}` })), + ]; + get('recoveryExportSelection').replaceChildren(...rows.map(row => { + const option = document.createElement('option'); option.value = row.key; option.textContent = row.label; + option.selected = exportSelectionInitialized ? previous.has(row.key) : rows.length <= RECOVERY_LIMITS.entries; return option; + })); + exportSelectionInitialized = true; + } + get('recoveryControls').addEventListener('toggle', () => { + if (get('recoveryControls').open && !busy) refreshExportSelection(); + // Closing cancels an in-flight commit, never an already retained head. + if (!get('recoveryControls').open) restoreGeneration++; + }); + bind('exportRecoveryBtn', async () => { + const selected = new Set([...get('recoveryExportSelection').selectedOptions].map(o => o.value)); + if (selected.size === 0 || selected.size > RECOVERY_LIMITS.entries) throw Error('Choose between 1 and 32 live evidence entries.'); + const objects = [...liveDb.objects.entries()].filter(([key]) => selected.delete(`object:${key}`)).map(([, e]) => { + if (!e.verified || !e.bytes) throw Error('Selected object no longer complete. Reopen the recovery panel.'); + return new Uint8Array(e.bytes); + }); + const jobs = [...computeCoord.jobs.entries()].filter(([key]) => selected.delete(`job:${key}`)) + .map(([, j]) => structuredClone({ program: j.program, checkpoint: j.checkpoint })); + const anchors = [...pointerObservers.entries()].filter(([key]) => selected.delete(`anchor:${key}`)).map(([, o]) => { + if (!o.head) throw Error('Selected observer head is no longer retained.'); return o.head; + }); + if (selected.size) throw Error('Selected evidence changed. Reopen the recovery panel and select again.'); + const bundle = { version: 1, objects: [], jobs, anchors }; + for (const bytes of objects) bundle.objects.push(await recoveryObject(bytes)); + const wire = await exportRecoveryBundle(bundle, options()); + download(wire, 'stitch-recovery.json', 'application/json'); + status('Verified evidence exported. Store the downloaded file independently. No private keys, trust decisions, grants or pending writes are included.'); + }); + bind('importRecoveryBtn', async () => { + const file = get('recoveryFile').files[0]; const bounds = options(); + if (!file) throw Error('Choose a recovery file first.'); + if (!Number.isSafeInteger(bounds.wireBytes) || file.size > bounds.wireBytes || file.size > RECOVERY_LIMITS.wireBytes) throw Error('File exceeds chosen wire allowance.'); + const bytes = new Uint8Array(await file.arrayBuffer()); + await vault.import(bytes, bounds); + get('recoveryAnchorConsent').checked = false; + status('Object integrity and pure checkpoints checked. Evidence restored to this session-only recovery vault; supplied anchors remain untrusted. No mesh, VM or DNS effects ran.'); + }); + bind('exportRecoveredBtn', async () => { + download(await vault.export(), 'stitch-recovered-evidence.json', 'application/json'); + status('Recovery evidence exported. Operator trust decisions are not transferable through this file.'); + }); + bind('downloadRecoveredObjectBtn', async () => { + const root = get('recoveryObjects').value; + download(await vault.objectBytes(root), `${root.replace(':', '-')}.bin`, 'application/octet-stream'); + status('Verified object downloaded locally. It was not mounted in the VM or published to peers.'); + }); + bind('resumeRecoveredJobBtn', async () => { + const job = vault.snapshot().bundle.jobs.find(j => j.checkpoint.jobId === get('recoveryJobs').value); + if (!job) throw Error('Choose an imported job.'); + const limit = options().replaySteps; + if (!Number.isSafeInteger(limit) || limit < programWork(job.program) || limit > RECOVERY_LIMITS.replaySteps) throw Error('Replay work allowance is too small or invalid.'); + const result = await resumeProgram(job.program, job.checkpoint); + status(`Pure local replay finished at step ${result.stepIndex}: ${result.stateHex}. No external effects ran; result remains volatile.`); + }); + bind('acceptRecoveryAnchorBtn', async () => { + await vault.acceptRecentAnchor({ name: get('recoveryAnchors').value, authorityKey: get('recoveryAuthority').value.trim(), + expectedDigest: get('recoveryDigest').value.trim(), nowMs: Date.now(), operatorAccepted: get('recoveryAnchorConsent').checked }); + get('recoveryAnchorConsent').checked = false; + status('Exact recent anchor accepted in this vault. To resume succession, separately restore it into the same independently pinned live name and writer scope. No live head changed yet.'); + }); + bind('restoreRecoveryAnchorBtn', async () => { + const anchor = selectedAcceptance(); + const scope = liveScope(), generation = restoreGeneration; + if (!anchor || anchor.name !== scope.name || anchor.authorityKey !== scope.authorityKey) throw Error('Choose the accepted exact anchor and independently pin its same live name and writer first.'); + // The factory uses the already pinned live fields. No key/name is copied from + // the imported bundle. Never clear or replace an existing observer. + const observer = pointerObserver(); + const restored = await observer.restoreFromRecovery(vault, { expectedDigest: anchor.pointerDigest, + scopeStillCurrent: () => generation === restoreGeneration && liveScope().name === scope.name && + liveScope().authorityKey === scope.authorityKey && selectedAcceptance()?.pointerDigest === anchor.pointerDigest }); + status(`Live observer restored locally at revision ${restored.revision} for ${restored.name}. Admit only its exact next successor. No DNS write, mesh or VM effect ran; this is not proof of globally latest state.`); + }); + render(); + const facts = () => { + const state = vault.snapshot(), accepted = selectedAcceptance(state), scope = liveScope(); + const head = pointerObservers.get(`${scope.name}:${scope.authorityKey}`)?.head; + const matches = Boolean(accepted && accepted.name === scope.name && accepted.authorityKey === scope.authorityKey); + const valid = matches && accepted.validFromMs <= Date.now() && Date.now() < accepted.validUntilMs; + const scopeText = `Live scope: ${scope.name || '(no name)'} / writer ${scope.authorityKey || '(not pinned)'}. ${head ? `Retained revision ${head.revision}.` : 'No retained head.'}`; + if (get('recoveryLiveScope').textContent !== scopeText) get('recoveryLiveScope').textContent = scopeText; + return { recoveryBusy: busy, recoveryFileSelected: Boolean(get('recoveryFile').files[0]), + recoveryHasEvidence: state.entries > 0, recoveryHasObjects: state.bundle.objects.length > 0, + recoveryHasJobs: state.bundle.jobs.length > 0, recoveryHasAnchors: state.bundle.anchors.length > 0, + recoveryAnchorConsent: get('recoveryAnchorConsent').checked, recoveryAcceptedAnchor: Boolean(accepted), + recoveryCanRestoreAnchor: Boolean(valid && (!head || head.pointerDigest === accepted.pointerDigest)), + recoveryRestoredAnchor: Boolean(matches && head?.pointerDigest === accepted.pointerDigest) }; + }; + get('recoveryFile').addEventListener('change', onChange); + get('recoveryAnchorConsent').addEventListener('change', onChange); + for (const id of ['recoveryAnchors', 'recoveryAuthority', 'recoveryDigest']) { + get(id).addEventListener(id === 'recoveryAnchors' ? 'change' : 'input', () => { + // An acceptance belongs to the exact supplied anchor/key/digest, not later edits. + restoreGeneration++; get('recoveryAnchorConsent').checked = false; onChange(); + }); + } + for (const id of ['dnsQueryInput', 'pointerAuthorityInput']) { + get(id).addEventListener('input', () => { restoreGeneration++; onChange(); }); + } + return { facts }; +} diff --git a/src/recovery.js b/src/recovery.js new file mode 100644 index 0000000..1d29241 --- /dev/null +++ b/src/recovery.js @@ -0,0 +1,175 @@ +/** Bounded recovery evidence, never a transport, key backup or effect journal. + * Imported anchors remain supplied evidence until separately accepted against an + * independently obtained exact digest. All state lives only in this session. + */ +import { canonicalBytes, parseCanonicalJson, exactKeys, deepFreeze, sha256Bytes } from './layer1-uor/custody.js'; +import { createObject, recoverObject } from './layer3-storage/custody.js'; +import { verifyCheckpoint, programWork } from './layer4-compute/replay.js'; +import { verifyPointer } from './layer1-uor/pointer.js'; +import { model } from './layer1-uor/generated-model.js'; +const project = (name, ...args) => model[`Stitch.Recovery.${name}`](...args); +export const RECOVERY_LIMITS = Object.freeze({ wireBytes: 32 * (2 * 131072 + 65536), entries: 32, objectBytes: 131072, replaySteps: 32 * 1024 }); +const reject = reason => { throw new Error(`recovery-${reason}`); }; +const text = bytes => new TextDecoder().decode(bytes); +const hex = bytes => Array.from(bytes, b => b.toString(16).padStart(2, '0')).join(''); +function limits(options = {}) { + const result = { ...RECOVERY_LIMITS, ...options }; + exactKeys(result, Object.keys(RECOVERY_LIMITS), 'recovery limits'); + for (const key of Object.keys(result)) { + if (!Number.isSafeInteger(result[key]) || result[key] < 0 || result[key] > RECOVERY_LIMITS[key]) reject('limit-policy'); + } + return result; +} +const codec = bounds => ({ maxBytes: bounds.wireBytes, maxEntries: 32 * 8192, maxDepth: 16, maxStringLength: 131072 }); +const encode = (value, bounds = RECOVERY_LIMITS) => canonicalBytes(value, codec(bounds)); +const empty = () => ({ version: 1, objects: [], jobs: [], anchors: [] }); +function decodeHex(value) { + if (typeof value !== 'string' || value.length > RECOVERY_LIMITS.objectBytes || value.length % 2 || !/^[0-9a-f]*$/.test(value)) reject('fragment-hex'); + return Uint8Array.from(value.match(/../g) ?? [], b => parseInt(b, 16)); +} +function unique(rows, key) { + const seen = new Set(); + for (const row of rows) { const id = key(row); if (seen.has(id)) reject('duplicate'); seen.add(id); } +} +/** Canonical wire input only, rejecting alternate encodings and duplicate fields. */ +export async function verifyRecoveryBundle(wire, options = {}) { + const bounds = limits(options); + const bundle = parseCanonicalJson(wire, codec(bounds)); + const encoded = encode(bundle, bounds); + const original = typeof wire === 'string' ? wire : text(wire); + if (text(encoded) !== original) reject('noncanonical'); + exactKeys(bundle, ['version', 'objects', 'jobs', 'anchors'], 'recovery bundle'); + if (bundle.version !== 1 || ![bundle.objects, bundle.jobs, bundle.anchors].every(Array.isArray)) reject('schema'); + const entries = bundle.objects.length + bundle.jobs.length + bundle.anchors.length; + if (entries > bounds.entries) reject('entry-limit'); + let replaySteps = 0; + // Preflight aggregate replay before hashing or executing any program. + for (const job of bundle.jobs) { + exactKeys(job, ['program', 'checkpoint'], 'recovery job'); + if (!Number.isSafeInteger(job.checkpoint?.stepIndex) || job.checkpoint.stepIndex < 0) reject('step'); + replaySteps += programWork(job.program, 0, job.checkpoint.stepIndex); + if (replaySteps > bounds.replaySteps) reject('replay-limit'); + } + const objects = []; + for (const object of bundle.objects) { + exactKeys(object, ['manifest', 'fragments'], 'recovery object'); + if (!Array.isArray(object.fragments) || object.fragments.length < 2 || object.fragments.length > 3) reject('partial-object'); + if (object.manifest?.object?.byteLength > bounds.objectBytes) reject('object-limit'); + const fragments = object.fragments.map(fragment => { + exactKeys(fragment, ['index', 'hex'], 'recovery fragment'); + return { index: fragment.index, bytes: decodeHex(fragment.hex) }; + }); + const bytes = await recoverObject(object.manifest, fragments); + objects.push({ root: object.manifest.object.contentDigest, bytes }); + } + for (const job of bundle.jobs) await verifyCheckpoint(job.program, job.checkpoint); + for (const anchor of bundle.anchors) { + // This verifies only internal signature consistency, NOT trusted authority. + await verifyPointer(anchor, anchor.authorityKey); + } + unique(bundle.objects, o => o.manifest.object.contentDigest); + unique(bundle.jobs, j => j.checkpoint.jobId); + unique(bundle.anchors, a => a.name); + return { bundle: deepFreeze(bundle), objects, cost: { wireBytes: encoded.length, entries, replaySteps } }; +} +/** Snapshot caller-owned evidence before any await. Keys and unknown fields fail. */ +export async function exportRecoveryBundle(evidence, options = {}) { + const wire = text(encode(evidence, limits(options))); + await verifyRecoveryBundle(wire, options); + return wire; +} +export async function recoveryObject(bytes) { + if (!(bytes instanceof Uint8Array) || bytes.length > RECOVERY_LIMITS.objectBytes) reject('object-limit'); + const object = await createObject(bytes); + return { manifest: object.manifest, fragments: object.fragments.slice(0, 2).map(f => ({ index: f.index, hex: hex(f.bytes) })) }; +} +/** A separately held evidence vault, not a live mesh/VM adapter. Merge validates + * the entire candidate before one synchronous assignment. A concurrent anchor + * acceptance invalidates an in-flight import rather than losing that decision. + */ +export class RecoveryVault { + #state = { root: new Uint8Array(), generation: 0, wireBytes: 0, entries: 0, replaySteps: 0 }; + #bundle = empty(); + #accepted = new Map(); + #limits; + constructor(options = {}) { this.#limits = limits(options); } + snapshot() { return { bundle: structuredClone(this.#bundle), acceptedAnchors: [...this.#accepted.values()].map(a => structuredClone(a)), ...structuredClone(this.#state), durability: 'session-only', effects: [] }; } + async import(wire, options = this.#limits) { + const bounds = limits(options); + for (const key of Object.keys(bounds)) bounds[key] = Math.min(bounds[key], this.#limits[key]); + // Copy wire before awaiting any verification. + if (wire instanceof Uint8Array) wire = new Uint8Array(wire); + const generation = this.#state.generation; + if (!Number.isSafeInteger(generation + 1)) reject('generation-limit'); + const incoming = await verifyRecoveryBundle(wire, bounds); + const merged = structuredClone(this.#bundle); + for (const [field, key] of [['objects', o => o.manifest.object.contentDigest], ['jobs', j => j.checkpoint.jobId], ['anchors', a => a.name]]) { + const retained = new Map(merged[field].map(row => [key(row), row])); + for (const row of incoming.bundle[field]) { + const old = retained.get(key(row)); + if (old && text(encode(old)) !== text(encode(row))) { + if (field === 'objects') reject('conflict'); + if (field === 'jobs') { + const before = old.checkpoint, after = row.checkpoint; + if (!project('progressAllowed', before.stepIndex, after.stepIndex, + text(encode(old.program)) === text(encode(row.program)), + after.stepIndex !== before.stepIndex + 1 || after.previousDigest === before.checkpointDigest)) reject('conflict-or-rollback'); + } else { + if (!project('progressAllowed', old.revision, row.revision, old.authorityKey === row.authorityKey, + row.revision !== old.revision + 1 || row.previousDigest === old.pointerDigest)) reject('conflict-or-rollback'); + } + merged[field][merged[field].indexOf(old)] = row; + retained.set(key(row), row); + } + if (!old) { merged[field].push(row); retained.set(key(row), row); } + } + } + // Prior immutable entries were already checked. Do not replay all history. + const encoded = encode(merged, bounds); + const cost = { wireBytes: encoded.length, entries: merged.objects.length + merged.jobs.length + merged.anchors.length, + replaySteps: merged.jobs.reduce((n, j) => n + programWork(j.program, 0, j.checkpoint.stepIndex), 0) }; + const candidate = { ...cost, generation, root: new TextEncoder().encode(await sha256Bytes(encoded, 'recovery')) }; + const next = project('commit', bounds, this.#state, candidate, true); + if (Number(next.generation) === this.#state.generation) reject('stale-or-capacity'); + this.#bundle = deepFreeze(merged); + this.#state = { root: next.root, generation: Number(next.generation), wireBytes: Number(next.wireBytes), entries: Number(next.entries), replaySteps: Number(next.replaySteps) }; + return this.snapshot(); + } + async export() { return exportRecoveryBundle(this.#bundle, this.#limits); } + async objectBytes(root) { + const object = this.#bundle.objects.find(o => o.manifest.object.contentDigest === root); + if (!object) reject('missing-object'); + return recoverObject(object.manifest, object.fragments.map(f => ({ index: f.index, bytes: decodeHex(f.hex) }))); + } + acceptedAnchor({ name, authorityKey, expectedDigest }) { + const anchor = this.#accepted.get(name); + if (!anchor || anchor.authorityKey !== authorityKey || anchor.pointerDigest !== expectedDigest) reject('anchor-not-accepted'); + return structuredClone(anchor); + } + /** The expected digest/key MUST come from a source the operator trusts as + * recent, separately from this bundle. No supplied timestamp proves recency. + */ + async acceptRecentAnchor({ name, authorityKey, expectedDigest, nowMs, operatorAccepted }) { + const generation = this.#state.generation; + if (!Number.isSafeInteger(generation + 1)) reject('generation-limit'); + const anchor = this.#bundle.anchors.find(a => a.name === name); + if (!anchor || operatorAccepted !== true || !Number.isSafeInteger(nowMs) || nowMs < 0) reject('anchor-consent'); + await verifyPointer(anchor, authorityKey); + const retained = this.#accepted.get(name); + if (!project('anchorAllowed', new TextEncoder().encode(anchor.pointerDigest), new TextEncoder().encode(expectedDigest), anchor.validFromMs, anchor.validUntilMs, nowMs, + retained?.revision ?? 0, anchor.revision, retained ? (retained.authorityKey === anchor.authorityKey && + (retained.pointerDigest === anchor.pointerDigest || (anchor.revision > retained.revision && (anchor.revision !== retained.revision + 1 || anchor.previousDigest === retained.pointerDigest)))) : true)) reject('anchor-stale-or-untrusted'); + if (generation !== this.#state.generation) reject('stale-operation'); + this.#accepted.set(name, structuredClone(anchor)); + this.#state = { ...this.#state, generation: generation + 1 }; + return structuredClone(anchor); + } +} + +/** Read only a separately accepted exact scope, with a private-field brand check. + * The observer calls this intrinsic, not a caller-supplied vault-shaped method. + * Snapshots and imported bundle rows cannot manufacture accepted provenance. + */ +export function acceptedRecoveryAnchor(vault, { name, authorityKey, expectedDigest }) { + return RecoveryVault.prototype.acceptedAnchor.call(vault, { name, authorityKey, expectedDigest }); +} diff --git a/standards.lock b/standards.lock new file mode 100644 index 0000000..085afdb --- /dev/null +++ b/standards.lock @@ -0,0 +1 @@ +{"authorities":[{"canonical_id":"asyncapi/spec","edition":"3.1.0","id":"ASYNCAPI-3-1-0","issuer":"AsyncAPI Initiative","name":"AsyncAPI Specification 3.1.0","oracle_ids":["asyncapi-3.1-schema"],"realized_by":["AU-01","SY-04"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"b3fac5bb522771428ea57b16129b273cd3ea0180","sha256":"7b9de4debb0f6050bf5c4d6284694876c0cf6ec6bcd72fb250d2b58d66538989","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/asyncapi/spec/tar.gz/b3fac5bb522771428ea57b16129b273cd3ea0180"},"source_role":"normative","statement":"AsyncAPI 3.1.0 owns the generated asynchronous interface document semantics.","supersession":"explicit-lock-update-only"},{"canonical_id":"asyncapi/website","edition":"20a31a0396b4","id":"ASYNCAPI-WEBSITE-20A31A03","issuer":"AsyncAPI Initiative","name":"AsyncAPI website ADEO case-study schemas","oracle_ids":["asyncapi-3.1-schema"],"realized_by":["AU-01","AU-06"],"retrieval_date":"2026-09-08","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"20a31a0396b41dd24b1bac877ab7ce3f58037c28","sha256":"6dbd4685b6e4ccbc3847a0d11acd3f7f770b4e7c83d10da5d147383395dea24b","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/asyncapi/website/tar.gz/20a31a0396b41dd24b1bac877ab7ce3f58037c28"},"source_role":"informative","statement":"The pinned AsyncAPI website source publishes the two external Avro schemas referenced by the official ADEO AsyncAPI example; it is fixture input, not a normative extension of AsyncAPI 3.1.0.","supersession":"explicit-lock-update-only"},{"canonical_id":"BLAKE3-team/BLAKE3/test_vectors/test_vectors.json","edition":"1.5.5","id":"BLAKE3-VECTORS-1-5-5","issuer":"BLAKE3 team","name":"BLAKE3 immutable digest vectors","oracle_ids":[],"realized_by":["HO-14"],"retrieval_date":"2026-10-04","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"CC0-1.0","media_type":"application/json","redistribution":"redistributable","revision":"81f772a4cd70dc0325047a6a737d2f6f4b92180e","sha256":"dcb91ea8accc77e6d6e632af7cdc1a99a9f3ae78cf648da595c7d064db32f624","signature":"not-published-or-not-relied-upon","url":"https://raw.githubusercontent.com/BLAKE3-team/BLAKE3/81f772a4cd70dc0325047a6a737d2f6f4b92180e/test_vectors/test_vectors.json"},"source_role":"normative","statement":"All 35 upstream digest vectors qualify hash, keyed-hash, derive-key, extended output and the archive content-identity adapter; not cryptographic proof or durable storage.","supersession":"explicit-lock-update-only"},{"canonical_id":"cloudevents/spec","edition":"1.0.2","id":"CLOUDEVENTS-1-0-2","issuer":"Cloud Native Computing Foundation","name":"CloudEvents 1.0.2","oracle_ids":["cloudevents-1.0-json"],"realized_by":["AU-01","SY-04"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"fc1f6f31f5f011a72183f1bcea20c987cb683ade","sha256":"b9e35734ccddc3baae04b4a18c8539e3d9f4148bbcdf48cd7b65751ee3d62614","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/cloudevents/spec/tar.gz/fc1f6f31f5f011a72183f1bcea20c987cb683ade"},"source_role":"normative","statement":"CloudEvents 1.0.2 owns the event envelope projected by Prism systems.","supersession":"explicit-lock-update-only"},{"canonical_id":"cloudevents/sdk-go","edition":"2.16.2","id":"CLOUDEVENTS-SDK-GO-2-16-2","issuer":"Cloud Native Computing Foundation","name":"CloudEvents Go SDK 2.16.2","oracle_ids":["cloudevents-1.0-json"],"realized_by":["AU-06","SY-04"],"retrieval_date":"2026-09-06","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"af3e8599b3316ab6b4b73ff69aa8ec0efddbb5bb","sha256":"542bd94a70070c58ab96c5fe49affb04af6dc371b7ea6d0ad6d09337e4b3836a","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/cloudevents/sdk-go/tar.gz/af3e8599b3316ab6b4b73ff69aa8ec0efddbb5bb"},"source_role":"normative","statement":"The exact official CloudEvents Go SDK supplies the executable CloudEvents event-validation behavior and its upstream tests.","supersession":"explicit-lock-update-only"},{"canonical_id":"compose-spec/compose-spec","edition":"fee041b381ff","id":"COMPOSE-FEE041B3","issuer":"Compose Specification maintainers","name":"Compose Specification snapshot","oracle_ids":["compose-fee041b3"],"realized_by":["AU-01","DP-02"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"fee041b381ffd4aad263410980bdce0cdf4beb7d","sha256":"09916fd41b9a36b404c3b99b75c43f771624a8cab74d33d794a237d49d34be81","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/compose-spec/compose-spec/tar.gz/fee041b381ffd4aad263410980bdce0cdf4beb7d"},"source_role":"normative","statement":"The pinned Compose Specification defines the generated local multi-service target.","supersession":"explicit-lock-update-only"},{"canonical_id":"devcontainers/spec","edition":"c95ffeed1d05","id":"DEVCONTAINER-C95FFEED","issuer":"Dev Container Specification maintainers","name":"Development Container Specification snapshot","oracle_ids":["devcontainer-c95ffeed"],"realized_by":["AU-01","TM-02"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"MIT","media_type":"application/gzip","redistribution":"redistributable","revision":"c95ffeed1d059abfe9ffbe79762dc2fa4e7c2421","sha256":"1b97d24f6b6cf0b65ea6d737a12812e802e6a443c306312ae43d90715bc08074","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/devcontainers/spec/tar.gz/c95ffeed1d059abfe9ffbe79762dc2fa4e7c2421"},"source_role":"normative","statement":"The pinned Development Container Specification defines the common SDK environment contract.","supersession":"explicit-lock-update-only"},{"canonical_id":"RFC 7636","edition":"September 2015","id":"IETF-RFC-7636","issuer":"IETF","name":"Proof Key for Code Exchange by OAuth Public Clients","oracle_ids":[],"realized_by":["ST-17"],"retrieval_date":"2026-09-28","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"LicenseRef-IETF-Trust-2015","media_type":"text/plain","redistribution":"redistributable","revision":"RFC7636-2015","sha256":"1972e5d81cbaba7066cfd46374207bc2b4546b085ed5dd9b034e79e023e0ca31","signature":"not-published-or-not-relied-upon","url":"https://www.rfc-editor.org/rfc/rfc7636.txt"},"source_role":"normative","statement":"Sections 4.1-4.2 and Appendix B define the ST-17 S256 client primitive and imported example, not complete OAuth or mailbox authentication.","supersession":"explicit-lock-update-only"},{"canonical_id":"in-toto/attestation","edition":"1.0","id":"INTOTO-STATEMENT-1-0","issuer":"in-toto project","name":"in-toto Attestation Statement 1.0","oracle_ids":["in-toto-statement-1.0","slsa-provenance-1.2"],"realized_by":["AU-01","SC-02"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"ee16c68a11dfcfbdc891600cacd767896fe6e724","sha256":"9e2c92fbb11eef640de5d98dce6a82ed6a93af3b141e02b9f164e6de4ac952ed","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/in-toto/attestation/tar.gz/ee16c68a11dfcfbdc891600cacd767896fe6e724"},"source_role":"normative","statement":"in-toto Statement 1.0 owns the validation and build attestation envelope.","supersession":"explicit-lock-update-only"},{"canonical_id":"ISO/PAS 19450:2015","edition":"2015","id":"ISO-19450-2015","issuer":"ISO","name":"ISO/PAS 19450:2015","oracle_ids":[],"realized_by":["FT-11","HO-18","ST-18"],"retrieval_date":"2026-10-22","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"ISO-controlled-document","media_type":"text/html","redistribution":"citation-only","revision":null,"sha256":null,"signature":"not-published","url":"https://www.iso.org/standard/62274.html"},"source_role":"binding-only","statement":"The lawful scope is a reviewed Object-Process Methodology design-view interpretation, not certification or an executable oracle.","supersession":"explicit-lock-update-only"},{"canonical_id":"ISO/IEC 25010:2023","edition":"2023","id":"ISO-25010-2023","issuer":"ISO/IEC","name":"ISO/IEC 25010:2023","oracle_ids":[],"realized_by":["FT-05","ST-05"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"ISO-controlled-document","media_type":"text/html","redistribution":"citation-only","revision":null,"sha256":null,"signature":"not-published","url":"https://www.iso.org/standard/78176.html"},"source_role":"binding-only","statement":"The lawful scope is a reviewed quality-model interpretation, not certification or an executable oracle.","supersession":"explicit-lock-update-only"},{"canonical_id":"ISO/IEC 27005:2022","edition":"2022","id":"ISO-27005-2022","issuer":"ISO/IEC","name":"ISO/IEC 27005:2022","oracle_ids":[],"realized_by":["FT-04","ST-04"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"ISO-controlled-document","media_type":"text/html","redistribution":"citation-only","revision":null,"sha256":null,"signature":"not-published","url":"https://www.iso.org/standard/80585.html"},"source_role":"binding-only","statement":"The lawful scope is a reviewed risk-management interpretation, not certification or an executable oracle.","supersession":"explicit-lock-update-only"},{"canonical_id":"ISO/IEC 27034-1:2011","edition":"2011-cor1-2014","id":"ISO-27034-1-2011","issuer":"ISO/IEC","name":"ISO/IEC 27034-1:2011 / Cor 1:2014","oracle_ids":[],"realized_by":["FT-02","ST-02"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"ISO-controlled-document","media_type":"text/html","redistribution":"citation-only","revision":null,"sha256":null,"signature":"not-published","url":"https://www.iso.org/standard/44378.html"},"source_role":"binding-only","statement":"The lawful scope is a reviewed application-security interpretation, not certification or an executable oracle.","supersession":"explicit-lock-update-only"},{"canonical_id":"ISO/IEC 27034-5:2017","edition":"2017","id":"ISO-27034-5-2017","issuer":"ISO/IEC","name":"ISO/IEC 27034-5:2017","oracle_ids":[],"realized_by":["FT-03","ST-03"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"ISO-controlled-document","media_type":"text/html","redistribution":"citation-only","revision":null,"sha256":null,"signature":"not-published","url":"https://www.iso.org/standard/55585.html"},"source_role":"binding-only","statement":"The lawful scope is a reviewed control-data interpretation, not certification or an executable oracle.","supersession":"explicit-lock-update-only"},{"canonical_id":"ISO/IEC/IEEE 42010:2022","edition":"2022","id":"ISO-42010-2022","issuer":"ISO/IEC/IEEE","name":"ISO/IEC/IEEE 42010:2022","oracle_ids":[],"realized_by":["FT-01","FT-12","FT-13","ST-01","ST-19"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"ISO-controlled-document","media_type":"text/html","redistribution":"citation-only","revision":null,"sha256":null,"signature":"not-published","url":"https://www.iso.org/standard/74393.html"},"source_role":"binding-only","statement":"The lawful scope is a reviewed architecture-description interpretation, not certification or an executable oracle.","supersession":"explicit-lock-update-only"},{"canonical_id":"json-schema-org/JSON-Schema-Test-Suite","edition":"2020-12@c9510e3b","id":"JSON-SCHEMA-2020-12","issuer":"JSON Schema organization","name":"JSON Schema 2020-12 test suite","oracle_ids":["json-schema-2020-12","openapi-3.2-schema","osv-schema-snapshot"],"realized_by":["AU-05","SY-04"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"MIT","media_type":"application/gzip","redistribution":"redistributable","revision":"c9510e3bf8a896c3cba4e08509cf752b4f30dff8","sha256":"cf0e16252ef08add662b9db2b7f0f099644cdaffd1c429b1ce9212cebf086aba","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/json-schema-org/JSON-Schema-Test-Suite/tar.gz/c9510e3bf8a896c3cba4e08509cf752b4f30dff8"},"source_role":"normative","statement":"The official corpus defines the finite JSON Schema 2020-12 behavior tested by the imported validator.","supersession":"explicit-lock-update-only"},{"canonical_id":"kubernetes/kubernetes","edition":"1.36.4","id":"KUBERNETES-1-36-4","issuer":"Cloud Native Computing Foundation","name":"Kubernetes 1.36.4","oracle_ids":["kubernetes-1.36.4"],"realized_by":["AU-01","DP-03"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"bb826b1d48562f110659e64e8ec444327433db95","sha256":"edde021b39188a92163596c3887372bc4164467927b426dd75c586ff927fa182","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/kubernetes/kubernetes/tar.gz/bb826b1d48562f110659e64e8ec444327433db95"},"source_role":"normative","statement":"Kubernetes 1.36.4 owns the orchestrated target API and admission semantics.","supersession":"explicit-lock-update-only"},{"canonical_id":"leanprover/lean4/src/lake","edition":"4.32.1","id":"LAKE-4-32-1","issuer":"Lean FRO","name":"Lake 4.32.1","oracle_ids":[],"realized_by":["VR-03"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"f054605aea4b840552cca2e725580bffd1e1b704","sha256":"6dec8667fbf57ba480a18a8b0c353b2ee157346b2630b211ccbefeedf20545f8","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/leanprover/lean4/tar.gz/f054605aea4b840552cca2e725580bffd1e1b704"},"source_role":"normative","statement":"Lake resolves the pinned generated Lean workspace.","supersession":"explicit-lock-update-only"},{"canonical_id":"leanprover/lean4","edition":"4.32.1","id":"LEAN-REL-4-32-1","issuer":"Lean FRO","name":"Lean 4.32.1 source release","oracle_ids":[],"realized_by":["VR-01","VR-02"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"f054605aea4b840552cca2e725580bffd1e1b704","sha256":"6dec8667fbf57ba480a18a8b0c353b2ee157346b2630b211ccbefeedf20545f8","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/leanprover/lean4/tar.gz/f054605aea4b840552cca2e725580bffd1e1b704"},"source_role":"normative","statement":"Lean 4.32.1 supplies the kernel and elaborator for generated Prism declarations.","supersession":"explicit-lock-update-only"},{"canonical_id":"leanprover/lean4/leanchecker","edition":"4.32.1","id":"LEANCHECKER-4-32-1","issuer":"Lean FRO","name":"leanchecker 4.32.1","oracle_ids":[],"realized_by":["VR-04"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"f054605aea4b840552cca2e725580bffd1e1b704","sha256":"6dec8667fbf57ba480a18a8b0c353b2ee157346b2630b211ccbefeedf20545f8","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/leanprover/lean4/tar.gz/f054605aea4b840552cca2e725580bffd1e1b704"},"source_role":"normative","statement":"leanchecker independently replays compiled module environments through the Lean kernel.","supersession":"explicit-lock-update-only"},{"canonical_id":"opencontainers/distribution-spec","edition":"1.1.1","id":"OCI-DISTRIBUTION-1-1-1","issuer":"Open Container Initiative","name":"OCI Distribution Specification 1.1.1","oracle_ids":["oci-distribution-1.1.1-conformance"],"realized_by":["AU-01","OC-04","OC-05"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":{"algorithm":"openpgp","fingerprint":"22A718B2224DE2BB0D9C84926E0FF28C767A8BEE","license":"public-key-material-published-for-verification","owner":"sudo-bmitch","path":"standards/trust/github-sudo-bmitch-openpgp-6e0ff28c767a8bee.asc","redistribution":"verification-use","sha256":"e33e1416f08d6ee24f1c66f3895be7d919ff58c0d4318f2934ec4743f75f0a7e","source_record_id":"2155637","source_url":"https://api.github.com/users/sudo-bmitch/gpg_keys"},"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"a139cc423184af6078077b9b7ee336eddbd03f8f","sha256":"e69fbe28c2eb4b2ef5a12c76b21c32d959ee97a646afe7704577b14c295641d2","signature":"signed-tag-object:b5c693e819628420cc04ba7d9263628276d8ca0f","url":"https://codeload.github.com/opencontainers/distribution-spec/tar.gz/a139cc423184af6078077b9b7ee336eddbd03f8f"},"source_role":"normative","statement":"OCI Distribution 1.1 defines registry push, pull, content discovery, and referrers behavior.","supersession":"explicit-lock-update-only"},{"canonical_id":"opencontainers/image-spec","edition":"1.1.1","id":"OCI-IMAGE-1-1-1","issuer":"Open Container Initiative","name":"OCI Image Format 1.1.1","oracle_ids":["oci-layout-1.1"],"realized_by":["AU-01","OC-01"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":{"algorithm":"openpgp","fingerprint":"22A718B2224DE2BB0D9C84926E0FF28C767A8BEE","license":"public-key-material-published-for-verification","owner":"sudo-bmitch","path":"standards/trust/github-sudo-bmitch-openpgp-6e0ff28c767a8bee.asc","redistribution":"verification-use","sha256":"e33e1416f08d6ee24f1c66f3895be7d919ff58c0d4318f2934ec4743f75f0a7e","source_record_id":"2155637","source_url":"https://api.github.com/users/sudo-bmitch/gpg_keys"},"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"147f9c13cedb47a0c4d9a11a222961073d585877","sha256":"f632804ca432d6df5c0fad506d003ebdb99f57fff22c4559cb4163e1e240a7f4","signature":"signed-tag-object:de7a13cc5ce022e0486d22211e80eb36f9d4a218","url":"https://codeload.github.com/opencontainers/image-spec/tar.gz/147f9c13cedb47a0c4d9a11a222961073d585877"},"source_role":"normative","statement":"OCI 1.1 defines the descriptors, manifests, indexes, artifact types, subjects, and annotations used by Prism releases.","supersession":"explicit-lock-update-only"},{"canonical_id":"opencontainers/runtime-spec","edition":"1.3.0","id":"OCI-RUNTIME-1-3-0","issuer":"Open Container Initiative","name":"OCI Runtime Specification 1.3.0","oracle_ids":["oci-runtime-1.3.0-schema"],"realized_by":["AU-01","LC-03"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":{"algorithm":"openpgp","fingerprint":"C020EA876CE4E06C7AB95AEF49524C6F9F638F1A","license":"public-key-material-published-for-verification","owner":"AkihiroSuda","path":"standards/trust/github-akihirosuda-openpgp-49524c6f9f638f1a.asc","redistribution":"verification-use","sha256":"cf122ae443d3fcad8b90fe30277d3c37e008c60d56c9658a44848bdb6f2078d4","source_record_id":"5228653","source_url":"https://api.github.com/users/AkihiroSuda/gpg_keys"},"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"92249139eea7161e13745abd4cb6d0ea02a3227a","sha256":"fbed724a4bbdce2260eea9a4d6dcf534a5e2446e581ed1b8bf27abe536cee17a","signature":"signed-tag-object:0eaca84ca040a452ebf87480b3f7bedf79d46f46","url":"https://codeload.github.com/opencontainers/runtime-spec/tar.gz/92249139eea7161e13745abd4cb6d0ea02a3227a"},"source_role":"normative","statement":"OCI Runtime 1.3.0 defines the container runtime boundary used by local execution.","supersession":"explicit-lock-update-only"},{"canonical_id":"openid/connect","edition":"1.0-errata1","id":"OIDC-1-0-ERRATA1","issuer":"OpenID Foundation","name":"OpenID Connect Core 1.0 Errata Set 1","oracle_ids":["oidc-core-1.0-profile"],"realized_by":["AU-01","SY-05"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"OpenID-Foundation-Specification-License","media_type":"application/gzip","redistribution":"citation-only","revision":"a173cb87c85c9b8d1bc11e2b8a84ed9271e97d6d","sha256":"2da00079757a1e699cc7072df23f262dbedb360b4677fde2eb4f875fb480c8af","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/openid/connect/tar.gz/a173cb87c85c9b8d1bc11e2b8a84ed9271e97d6d"},"source_role":"normative","statement":"OpenID Connect Core defines the issuer, audience, subject, token, and role-validation boundary.","supersession":"explicit-lock-update-only"},{"canonical_id":"OMG UML 2.5.1 formal/17-12-05","edition":"2.5.1","id":"OMG-UML-2-5-1","issuer":"OMG","name":"OMG Unified Modeling Language 2.5.1","oracle_ids":[],"realized_by":["FT-11","HO-18","ST-18"],"retrieval_date":"2026-10-22","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"OMG-specification-license","media_type":"text/html","redistribution":"citation-only","revision":null,"sha256":null,"signature":"not-published","url":"https://www.omg.org/spec/UML/2.5.1"},"source_role":"binding-only","statement":"The lawful scope is a reviewed UML component, sequence and state machine design-view interpretation, not certification or an executable oracle.","supersession":"explicit-lock-update-only"},{"canonical_id":"OAI/OpenAPI-Specification","edition":"3.2.0","id":"OPENAPI-3-2-0","issuer":"OpenAPI Initiative","name":"OpenAPI Specification 3.2.0","oracle_ids":["openapi-3.2-schema"],"realized_by":["AU-01","SY-04"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"99710bcb26cbe4be646565eebeb04348f02374b5","sha256":"0b4ae65636d0335ec9fd758d11cb2cb6097ace0490c1eaefaa951c723494e788","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/OAI/OpenAPI-Specification/tar.gz/99710bcb26cbe4be646565eebeb04348f02374b5"},"source_role":"normative","statement":"OpenAPI 3.2.0 owns the generated HTTP interface document semantics.","supersession":"explicit-lock-update-only"},{"canonical_id":"spec.openapis.org/oas/3.2/schema/2025-11-23","edition":"3.2@2025-11-23","id":"OPENAPI-SCHEMA-3-2-2025-11-23","issuer":"OpenAPI Initiative","name":"OpenAPI 3.2 schema iteration 2025-11-23","oracle_ids":["openapi-3.2-schema"],"realized_by":["AU-01","SY-04"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/schema+json","redistribution":"redistributable","revision":"2025-11-23","sha256":"7d48f01f37eeae4799041b371ad5f533f9f533fd2b0caa1011a8ba27c5b48b70","signature":"not-published-or-not-relied-upon","url":"https://spec.openapis.org/oas/3.2/schema/2025-11-23"},"source_role":"informative","statement":"The dated OAI schema is an official informative finite validator; OpenAPI 3.2.0 prose remains normative if they disagree.","supersession":"explicit-lock-update-only"},{"canonical_id":"openid/conformance-suite","edition":"3e09b13b896f","id":"OPENID-CONFORMANCE-SUITE-3E09B13B","issuer":"OpenID Foundation","name":"OpenID Foundation Conformance Suite","oracle_ids":["oidc-core-1.0-profile"],"realized_by":["AU-06","SY-05"],"retrieval_date":"2026-09-06","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"MIT","media_type":"application/gzip","redistribution":"redistributable","revision":"3e09b13b896fce95d78c2c0f931feee9614e9452","sha256":"d33d7eb40b6db0080a48563fe6e8d1073393d18fe9f4afcb3de83f1679197bbb","signature":"not-published-or-not-relied-upon","url":"https://gitlab.com/openid/conformance-suite/-/archive/3e09b13b896fce95d78c2c0f931feee9614e9452/conformance-suite-3e09b13b896fce95d78c2c0f931feee9614e9452.tar.gz"},"source_role":"normative","statement":"The exact official OpenID Foundation implementation supplies executable OIDC Core signature, time, and discovery condition tests.","supersession":"explicit-lock-update-only"},{"canonical_id":"gs://osv-vulnerabilities/crates.io/all.zip","edition":"gcs-generation-1792096384043606","id":"OSV-CRATES-DB-G1792096384043606","issuer":"OpenSSF OSV project","name":"OSV crates.io vulnerability database snapshot","oracle_ids":[],"realized_by":["AU-05","SC-04"],"retrieval_date":"2026-10-16","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"record-level upstream provenance; no aggregate relicensing claim","media_type":"application/zip","redistribution":"citation-only","revision":"1792096384043606","sha256":"5ebac98116c0148f8a2b72615cbd3e60c3c5e937786e2427714546f8fc686f5b","signature":"gcs-generation-and-acquired-sha256","url":"https://osv-vulnerabilities.storage.googleapis.com/crates.io/all.zip?generation=1792096384043606"},"source_role":"informative","statement":"This immutable crates.io snapshot bounds offline vulnerability facts; it does not establish current status after its acquisition time.","supersession":"explicit-lock-update-only"},{"canonical_id":"gs://osv-vulnerabilities/Debian/all.zip","edition":"gcs-generation-1792130564825991","id":"OSV-DEBIAN-DB-G1792130564825991","issuer":"OpenSSF OSV project","name":"OSV Debian vulnerability database snapshot","oracle_ids":[],"realized_by":["AU-05","SC-04"],"retrieval_date":"2026-10-16","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"record-level upstream provenance; no aggregate relicensing claim","media_type":"application/zip","redistribution":"citation-only","revision":"1792130564825991","sha256":"019d7daaca77666111070f333fb1e5d047ad40d50ba852391018979d08005bb9","signature":"gcs-generation-and-acquired-sha256","url":"https://osv-vulnerabilities.storage.googleapis.com/Debian/all.zip?generation=1792130564825991"},"source_role":"informative","statement":"This immutable Debian snapshot bounds offline vulnerability facts for image packages; it does not establish current status after its acquisition time.","supersession":"explicit-lock-update-only"},{"canonical_id":"gs://osv-vulnerabilities/Go/all.zip","edition":"gcs-generation-1792097294361139","id":"OSV-GO-DB-G1792097294361139","issuer":"OpenSSF OSV project","name":"OSV Go vulnerability database snapshot","oracle_ids":[],"realized_by":["AU-05","SC-04"],"retrieval_date":"2026-10-16","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"record-level upstream provenance; no aggregate relicensing claim","media_type":"application/zip","redistribution":"citation-only","revision":"1792097294361139","sha256":"3f3c63ba77efa8a7f0c47f572c69692eb538c26a5ff70b6e84926078e10ad914","signature":"gcs-generation-and-acquired-sha256","url":"https://osv-vulnerabilities.storage.googleapis.com/Go/all.zip?generation=1792097294361139"},"source_role":"informative","statement":"This immutable Go snapshot bounds offline vulnerability facts for statically linked image packages; it does not establish current status after its acquisition time.","supersession":"explicit-lock-update-only"},{"canonical_id":"gs://osv-vulnerabilities/npm/all.zip","edition":"gcs-generation-1792124305700257","id":"OSV-NPM-DB-G1792124305700257","issuer":"OpenSSF OSV project","name":"OSV npm vulnerability database snapshot","oracle_ids":[],"realized_by":["AU-05","SC-04"],"retrieval_date":"2026-10-16","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"record-level upstream provenance; no aggregate relicensing claim","media_type":"application/zip","redistribution":"citation-only","revision":"1792124305700257","sha256":"c242de6ea6f70b5491ca1e536ac7533e719349cea740db2f8d59d25ee729c0cd","signature":"gcs-generation-and-acquired-sha256","url":"https://osv-vulnerabilities.storage.googleapis.com/npm/all.zip?generation=1792124305700257"},"source_role":"informative","statement":"This immutable npm snapshot bounds offline vulnerability facts for JavaScript image packages; it does not establish current status after its acquisition time.","supersession":"explicit-lock-update-only"},{"canonical_id":"ossf/osv-schema","edition":"b388a18021a3","id":"OSV-SCHEMA-B388","issuer":"OpenSSF OSV project","name":"OSV schema snapshot","oracle_ids":["osv-schema-snapshot"],"realized_by":["AU-05","SC-04"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"b388a18021a32b55da40c31eaef9fd4ce780447d","sha256":"02fe51837bbb67fcd250151332ad1abc078f789e6d396585a4ae933e0c61c0e7","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/ossf/osv-schema/tar.gz/b388a18021a32b55da40c31eaef9fd4ce780447d"},"source_role":"normative","statement":"The locked OSV schema owns vulnerability-exchange validation; database freshness is separate evidence.","supersession":"explicit-lock-update-only"},{"canonical_id":"gs://osv-vulnerabilities/Ubuntu/all.zip","edition":"gcs-generation-1791997399062112","id":"OSV-UBUNTU-DB-G1791997399062112","issuer":"OpenSSF OSV project","name":"OSV Ubuntu vulnerability database snapshot","oracle_ids":[],"realized_by":["AU-05","SC-04"],"retrieval_date":"2026-10-16","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"record-level upstream provenance; no aggregate relicensing claim","media_type":"application/zip","redistribution":"citation-only","revision":"1791997399062112","sha256":"9c4f5e08e3a7490c90c78ac85f72004d5715c8b1641e9d5ed9e65a6438dd986d","signature":"gcs-generation-and-acquired-sha256","url":"https://osv-vulnerabilities.storage.googleapis.com/Ubuntu/all.zip?generation=1791997399062112"},"source_role":"informative","statement":"This immutable Ubuntu snapshot bounds offline vulnerability facts for image packages; it does not establish current status after its acquisition time.","supersession":"explicit-lock-update-only"},{"canonical_id":"open-telemetry/opentelemetry-collector-releases","edition":"0.136.0","id":"OTEL-COLLECTOR-0-136-0","issuer":"Cloud Native Computing Foundation","name":"OpenTelemetry Collector release 0.136.0","oracle_ids":["otel-collector-0.136.0"],"realized_by":["AU-05","OP-01"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":{"algorithm":"ssh","fingerprint":"SHA256:SfMATR1dMO6TOjDSjfAKOBWYCV85WAUwF/VVQeSsZwM","license":"public-key-material-published-for-verification","owner":"songy23","path":"standards/trust/github-songy23-ssh-sfmatr1d.pub","redistribution":"verification-use","sha256":"c0f83ab885c007561550bda8d540e620b2ac4e36af0a4b48cd320854a3cf2ea4","source_record_id":"276780","source_url":"https://api.github.com/users/songy23/ssh_signing_keys"},"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"ff8d64f8bbdb45270cde7289bf39218514bbfd2d","sha256":"b844833e8c72e2661275c911d79885a49a3171be9563a7c8b4827b202582b207","signature":"signed-tag-object:36cf70a10c3a65106781469e0557cef6b56aa507","url":"https://codeload.github.com/open-telemetry/opentelemetry-collector-releases/tar.gz/ff8d64f8bbdb45270cde7289bf39218514bbfd2d"},"source_role":"normative","statement":"The unmodified Collector validates and receives the modeled OpenTelemetry signals.","supersession":"explicit-lock-update-only"},{"canonical_id":"open-telemetry/semantic-conventions","edition":"1.37.0","id":"OTEL-SEMCONV-1-37-0","issuer":"Cloud Native Computing Foundation","name":"OpenTelemetry semantic conventions 1.37.0","oracle_ids":["otel-collector-0.136.0"],"realized_by":["AU-01","OP-01"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"aec6e9d3e86754683dab7c707655d69d953b2768","sha256":"ff1e16f3cbf9f23a40b917bc15593cb542434412552d27a0fc1bbbd833cfe60e","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/open-telemetry/semantic-conventions/tar.gz/aec6e9d3e86754683dab7c707655d69d953b2768"},"source_role":"normative","statement":"Semantic conventions 1.37.0 own the emitted resource and signal attribute names.","supersession":"explicit-lock-update-only"},{"canonical_id":"open-telemetry/opentelemetry-specification","edition":"1.60.0","id":"OTEL-SPEC-1-60-0","issuer":"Cloud Native Computing Foundation","name":"OpenTelemetry specification 1.60.0","oracle_ids":["otel-collector-0.136.0"],"realized_by":["AU-01","OP-01"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"29ae8c7710d2ea52e21a5ff81fb1cd657bcd3306","sha256":"92eb9f83837e0c28909b0bc1fc128001e263be0b8f0317e31323073d957aebe7","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/open-telemetry/opentelemetry-specification/tar.gz/29ae8c7710d2ea52e21a5ff81fb1cd657bcd3306"},"source_role":"normative","statement":"OpenTelemetry 1.60.0 defines projected telemetry signal and protocol semantics.","supersession":"explicit-lock-update-only"},{"canonical_id":"leanprover/lean4/print-axioms","edition":"4.32.1","id":"PRINT-AXIOMS-4-32-1","issuer":"Lean FRO","name":"Lean 4.32.1 axiom reporting","oracle_ids":[],"realized_by":["VR-05"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"f054605aea4b840552cca2e725580bffd1e1b704","sha256":"6dec8667fbf57ba480a18a8b0c353b2ee157346b2630b211ccbefeedf20545f8","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/leanprover/lean4/tar.gz/f054605aea4b840552cca2e725580bffd1e1b704"},"source_role":"normative","statement":"Lean reports the transitive axioms used by generated theorems.","supersession":"explicit-lock-update-only"},{"canonical_id":"sigstore/cosign","edition":"3.1.3","id":"SIGSTORE-COSIGN-3-1-3","issuer":"Sigstore project","name":"Sigstore Cosign 3.1.3","oracle_ids":["sigstore-cosign-3.1.3"],"realized_by":["AU-05","SC-03"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":{"algorithm":"ssh","fingerprint":"SHA256:ZJmEJziSaDOAh945+gfnh55LtM2wipvfyF5gBXYDueU","license":"public-key-material-published-for-verification","owner":"Hayden-IO","path":"standards/trust/github-hayden-io-ssh-zjmejzisa.pub","redistribution":"verification-use","sha256":"929c5c98f56be683921c84a1ccd542d0d8df3e75657c3711d5557da35267b637","source_record_id":"682831","source_url":"https://api.github.com/users/Hayden-IO/ssh_signing_keys"},"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"11926fa5bbbbde47e88fc006b625a17769b743b2","sha256":"3a718446bac51466efff6853639e1ca108b456ecbf07cd92938f548715d22d6b","signature":"signed-tag-object:2f3a85b04907df5b770eb049d7e4d08d4b018d86","url":"https://codeload.github.com/sigstore/cosign/tar.gz/11926fa5bbbbde47e88fc006b625a17769b743b2"},"source_role":"normative","statement":"Cosign 3.1.3 is the pinned Sigstore bundle and identity verifier.","supersession":"explicit-lock-update-only"},{"canonical_id":"slsa-framework/slsa","edition":"1.2","id":"SLSA-1-2","issuer":"OpenSSF SLSA project","name":"SLSA specification 1.2","oracle_ids":["slsa-provenance-1.2"],"realized_by":["AU-01","SC-02"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"CC-BY-4.0","media_type":"application/gzip","redistribution":"redistributable","revision":"19e4e2f005f871270c4f555fc47afecfb37f3efe","sha256":"1e96506a5e8489bb675020f46d3783b8b8484254440b934a8843c0c0a75a0b8e","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/slsa-framework/slsa/tar.gz/19e4e2f005f871270c4f555fc47afecfb37f3efe"},"source_role":"normative","statement":"SLSA 1.2 defines provenance fields and limits on build-level claims.","supersession":"explicit-lock-update-only"},{"canonical_id":"slsa-framework/slsa-verifier","edition":"2.7.1","id":"SLSA-VERIFIER-2-7-1","issuer":"OpenSSF SLSA project","name":"SLSA verifier 2.7.1","oracle_ids":["slsa-provenance-1.2"],"realized_by":["AU-05","SC-02"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Apache-2.0","media_type":"application/gzip","redistribution":"redistributable","revision":"ea584f4502babc6f60d9bc799dbbb13c1caa9ee6","sha256":"c1ed640d3f775d09549488d120f7d02694c1bbf5bf885c302a7916660c62056d","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/slsa-framework/slsa-verifier/tar.gz/ea584f4502babc6f60d9bc799dbbb13c1caa9ee6"},"source_role":"informative","statement":"The pinned upstream verifier supplies the official corpus and reference policy; the offline SDK oracle uses pinned Cosign trust verification plus explicit SLSA v1 subject, builder, and source checks because upstream 2.7.1 cannot accept a trusted-root file.","supersession":"explicit-lock-update-only"},{"canonical_id":"spdx/spdx-3-model","edition":"3.0.1","id":"SPDX-3-0-1","issuer":"SPDX Project","name":"SPDX model 3.0.1","oracle_ids":["spdx-3.0.1-model"],"realized_by":["AU-01","SC-01"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"CC-BY-3.0","media_type":"application/gzip","redistribution":"redistributable","revision":"a745f63e8643d5ae0f0851fcfa6836085308f80b","sha256":"ff322ecc07bff0ec705f5e51c28002bc4d996de949cda0aedf456da4614eaaf7","signature":"not-published-or-not-relied-upon","url":"https://codeload.github.com/spdx/spdx-3-model/tar.gz/a745f63e8643d5ae0f0851fcfa6836085308f80b"},"source_role":"normative","statement":"SPDX 3.0.1 owns the software and system BOM model.","supersession":"explicit-lock-update-only"},{"canonical_id":"spdx.org/schema/3.0.1/spdx-json-schema.json","edition":"3.0.1","id":"SPDX-SCHEMA-3-0-1","issuer":"SPDX Project","name":"SPDX 3.0.1 JSON Schema","oracle_ids":["spdx-3.0.1-model"],"realized_by":["AU-06","SC-01"],"retrieval_date":"2026-09-06","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"CC-BY-3.0","media_type":"application/schema+json","redistribution":"redistributable","revision":"3.0.1","sha256":"582c64e809d5b3ef9bd0c4de13a32391b47b0284a3e8d199569fb96f649234b1","signature":"not-published-or-not-relied-upon","url":"https://spdx.org/schema/3.0.1/spdx-json-schema.json"},"source_role":"normative","statement":"The published SPDX 3.0.1 JSON Schema defines the executable JSON serialization boundary for the official model.","supersession":"explicit-lock-update-only"},{"canonical_id":"UCD","edition":"17.0.0","id":"UNICODE-17-0-0","issuer":"Unicode Consortium","name":"Unicode Character Database 17.0.0","oracle_ids":["unicode-normalization-17.0.0"],"realized_by":["AU-01","SY-05"],"retrieval_date":"2026-09-05","schema":"prismpm/authority-binding/1","signature_trust_root":null,"source":{"license":"Unicode-3.0","media_type":"application/zip","redistribution":"redistributable","revision":"17.0.0","sha256":"2066d1909b2ea93916ce092da1c0ee4808ea3ef8407c94b4f14f5b7eb263d28e","signature":"not-published","url":"https://www.unicode.org/Public/17.0.0/ucd/UCD.zip"},"source_role":"normative","statement":"Unicode 17.0.0 defines the NFC and scalar-count text boundary.","supersession":"explicit-lock-update-only"}],"lock_id":"sha256:a97bce8f4583a2f35ae7c1a0e8f3b644b0fb93356ac8465e3e9eca493a14466f","oracles":[{"arguments":["{input}"],"authority_ids":["ASYNCAPI-3-1-0","ASYNCAPI-WEBSITE-20A31A03"],"corpus":{"path":"standards/oracles/asyncapi-spec-b3fac5bb","sha256":"6bec0a3910568ff84f28b8fd9c2f63e3fcde7986bebf3e24b1f4649c150d735b"},"covers":["all 24 complete AsyncAPI 3.1.0 documents and all 89 embedded specification examples; unchanged upstream validation source uses parser 3.6.0 with a separately Prism-owned compatible dependency lock, not an upstream-lock replay or upstream-reviewed dependency update; original sources and historical lock remain intact; the ADEO example's two external Avro schemas are byte-locked to the pinned website source; submitted documents use the exact parser"],"does_not_cover":["the upstream repository publishes no negative fixture corpus; planted invalid-document rejection is separate evidence, while broker delivery behavior and prose-only interoperability remain outside this oracle"],"edition":"3.1.0","executable":"asyncapi-parser","expected_exits":["0=pass","4=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"asyncapi-3.1-schema","input_media_types":["application/vnd.aai.asyncapi+json;version=3.1.0"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":30000,"trusted_root":null,"upstream_payload_sha256":"7b9de4debb0f6050bf5c4d6284694876c0cf6ec6bcd72fb250d2b58d66538989","wrapper_sha256":"849b552ffa8ef7330511173b4fbd03d77f01ef0e7115abf64394d9160add5caf"},{"arguments":["{input}"],"authority_ids":["CLOUDEVENTS-1-0-2","CLOUDEVENTS-SDK-GO-2-16-2"],"corpus":{"path":"standards/oracles/cloudevents-sdk-go-2.16.2","sha256":"38480c5a48f73d20b8aa0db8366e22ae4ab34c245a370a11b8862cfbdeb5c6d1"},"covers":["all 45 top-level official CloudEvents Go SDK event tests plus direct CloudEvents 1.0 JSON decoding, required attributes, type validation, and negative mutations through that SDK"],"does_not_cover":["transport delivery guarantees, broker-specific bindings, and consumer application behavior"],"edition":"1.0.2+sdk-go-2.16.2","executable":"cloudevents-validator","expected_exits":["0=pass","1=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"cloudevents-1.0-json","input_media_types":["application/cloudevents+json"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":60000,"trusted_root":null,"upstream_payload_sha256":"542bd94a70070c58ab96c5fe49affb04af6dc371b7ea6d0ad6d09337e4b3836a","wrapper_sha256":"6f78669abd8fa0d56568a281b34e2d668506aec6eaa2001f62e937f870a6a07b"},{"arguments":["compose","-f","{input}","config","--quiet"],"authority_ids":["COMPOSE-FEE041B3"],"corpus":null,"covers":["Docker Compose parsing and normalization with the pinned CLI and a fixed non-secret sandbox directory for modeled secret-file references"],"does_not_cover":["service lifecycle, fixture execution, providers, and other implementations require separate deployment evidence"],"edition":"fee041b381ff","executable":"docker","expected_exits":["0=pass","nonzero=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"compose-fee041b3","input_media_types":["application/vnd.docker.compose.project+yaml"],"memory_bytes":536870912,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":4194304,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":60000,"trusted_root":null,"upstream_payload_sha256":"09916fd41b9a36b404c3b99b75c43f771624a8cab74d33d794a237d49d34be81","wrapper_sha256":"08a1ef2aec1e5ed35fe9162312a476b68b72b2133344738f645521a4276494e9"},{"arguments":["{input}"],"authority_ids":["DEVCONTAINER-C95FFEED"],"corpus":null,"covers":["the pinned official Development Container base schema"],"does_not_cover":["container startup, editor-specific extensions, and untested container engines require a separate runtime fixture"],"edition":"c95ffeed1d05","executable":"devcontainer-validator","expected_exits":["0=pass","nonzero=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"devcontainer-c95ffeed","input_media_types":["application/json"],"memory_bytes":536870912,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":4194304,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":120000,"trusted_root":null,"upstream_payload_sha256":"a0883c0405ff433db188849d458fb20b9c0d73e0ba1a6e44c1d83f3b485408dd","wrapper_sha256":"08a1ef2aec1e5ed35fe9162312a476b68b72b2133344738f645521a4276494e9"},{"arguments":["{input}"],"authority_ids":["INTOTO-STATEMENT-1-0"],"corpus":{"path":"standards/oracles/in-toto-attestation-ee16c68a","sha256":"6cbad548e30d2e227d1cea0ee23bb09c06c506c27094ccd8f55137d0bef17371"},"covers":["strict JSON decoding into the exact generated Go protobuf published for in-toto Statement 1.0, including declared field wire types and unknown-field rejection"],"does_not_cover":["the upstream protobuf explicitly leaves validation of all field semantics to consumers; required-field presence, Statement type value, digest policy, subject agreement, predicate truth, and signer trust are Prism policy or separate verification"],"edition":"1.0@ee16c68a","executable":"intoto-statement-validator","expected_exits":["0=protobuf shape accepted","1=invalid","2=invocation error"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"in-toto-statement-1.0","input_media_types":["application/vnd.in-toto+json"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":30000,"trusted_root":null,"upstream_payload_sha256":"9e2c92fbb11eef640de5d98dce6a82ed6a93af3b141e02b9f164e6de4ac952ed","wrapper_sha256":"7437d6043e1efab4fd5e54835e0ed7e2c45be664e9974053eea95d1c6e6d546d"},{"arguments":["oracle","json-schema","{input}"],"authority_ids":["JSON-SCHEMA-2020-12"],"corpus":{"path":"standards/corpora/json-schema-2020-12","sha256":"8f63dc2d12ed947bfa4ae4cabab2d5926ecc06d86d054b6a3a4f3454446b5551"},"covers":["selected JSON Schema 2020-12 instance validity and all cases in the 46 mandatory upstream draft2020-12 files using pinned jsonschema 0.50.1"],"does_not_cover":["the upstream optional directory, application semantics, and requirements absent from a schema are outside this finite profile"],"edition":"2020-12@c9510e3b","executable":"prismpm","expected_exits":["0=pass","4=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"json-schema-2020-12","input_media_types":["application/schema+json","application/json"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":30000,"trusted_root":null,"upstream_payload_sha256":"cf0e16252ef08add662b9db2b7f0f099644cdaffd1c429b1ce9212cebf086aba","wrapper_sha256":"6f78669abd8fa0d56568a281b34e2d668506aec6eaa2001f62e937f870a6a07b"},{"arguments":["{input}"],"authority_ids":["KUBERNETES-1-36-4"],"corpus":null,"covers":["Kubernetes 1.36.4 YAML decoding, generic List collection traversal, GVK selection, and locked official OpenAPI validation of every resource"],"does_not_cover":["server admission, rollout, managed-provider extensions, and future Kubernetes minors; those are deployment evidence"],"edition":"1.36.4","executable":"kubernetes-validator","expected_exits":["0=pass","nonzero=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"kubernetes-1.36.4","input_media_types":["application/yaml"],"memory_bytes":536870912,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":4194304,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":120000,"trusted_root":null,"upstream_payload_sha256":"dcede2063da1d7ad62ecb5af8adb6d7fabd0b52385a7fa0048afb491dac90450","wrapper_sha256":"3c2555117a2fe092fc9260dc2672edaac415d36bd16e1edbbe32af847f92e737"},{"arguments":["{subject}"],"authority_ids":["OCI-DISTRIBUTION-1-1-1"],"corpus":{"path":"standards/oracles/oci-distribution-1.1.1","sha256":"c3b22a1cef1975004c948e04005f02c013c02f9698c04da07998e9e13e875acc"},"covers":["all 79 official OCI Distribution 1.1.1 JUnit cases across pull, push, content discovery, and content management, each passed at least once by the unmodified upstream harness against complementary isolated configurations of the exact pinned Zot and Distribution reference subjects"],"does_not_cover":["authentication profiles, public registry availability, provider policy, and registry implementations other than the exact tested subjects"],"edition":"1.1.1@a139cc42","executable":"oci-distribution-conformance","expected_exits":["0=pass","1=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"oci-distribution-1.1.1-conformance","input_media_types":["application/vnd.oci.distribution.registry.v1"],"memory_bytes":536870912,"network":"isolated-subject","normalization":"prismpm/oracle-diagnostics/1","output_bytes":8388608,"output_schema":"prismpm/validation-result/1","subject":"ghcr.io/project-zot/zot@sha256:cd2aea942f428630bcb4190542be6abd35e14177aab84fc7ccad0dca8ecb363d","supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":300000,"trusted_root":null,"upstream_payload_sha256":"e69fbe28c2eb4b2ef5a12c76b21c32d959ee97a646afe7704577b14c295641d2","wrapper_sha256":"6f78669abd8fa0d56568a281b34e2d668506aec6eaa2001f62e937f870a6a07b"},{"arguments":["-test.v"],"authority_ids":["OCI-IMAGE-1-1-1"],"corpus":{"path":"standards/oracles/oci-image-1.1.1","sha256":"6c00d78efd45b6a3acc798497851b21585867042cbdc63dbe0c105825b8dac91"},"covers":["all official OCI Image 1.1.1 schema and specification example tests for configuration, descriptor, image index, image layout, manifest, artifact type, subject, and backwards compatibility, plus independent ORAS resolution failures"],"does_not_cover":["registry transport and OCI Runtime behavior are owned by their separate registered conformance oracles"],"edition":"1.1.1@147f9c13","executable":"oci-image-schema-conformance","expected_exits":["0=pass","nonzero=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"oci-layout-1.1","input_media_types":["application/vnd.oci.image.layout.v1+json"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":60000,"trusted_root":null,"upstream_payload_sha256":"f632804ca432d6df5c0fad506d003ebdb99f57fff22c4559cb4163e1e240a7f4","wrapper_sha256":"6f78669abd8fa0d56568a281b34e2d668506aec6eaa2001f62e937f870a6a07b"},{"arguments":["{input}"],"authority_ids":["OCI-RUNTIME-1-3-0"],"corpus":{"path":"standards/oracles/oci-runtime-1.3.0","sha256":"9bf0da1272040438e13ce349a39a1dd036c3432f82e2cec5b17d2aa7db316e8a"},"covers":["all 19 good and bad config, features, and state fixtures shipped with the OCI Runtime 1.3.0 schemas"],"does_not_cover":["runtime lifecycle behavior beyond the separately executed unmodified container-engine positive and negative probes"],"edition":"1.3.0@92249139","executable":"oci-runtime-validate","expected_exits":["0=pass","1=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"oci-runtime-1.3.0-schema","input_media_types":["application/vnd.oci.runtime.config.v1+json","application/vnd.oci.runtime.features.v1+json","application/vnd.oci.runtime.state.v1+json"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":30000,"trusted_root":null,"upstream_payload_sha256":"fbed724a4bbdce2260eea9a4d6dcf534a5e2446e581ed1b8bf27abe536cee17a","wrapper_sha256":"6f78669abd8fa0d56568a281b34e2d668506aec6eaa2001f62e937f870a6a07b"},{"arguments":["--official-selection"],"authority_ids":["OIDC-1-0-ERRATA1","OPENID-CONFORMANCE-SUITE-3E09B13B"],"corpus":{"path":"standards/oracles/openid-conformance-suite-3e09b13b","sha256":"a35012f67dccd4296ab0e380eb86a0e053dbbf6bf52522aca3ed961c83812197"},"covers":["the exact upstream OpenID Conformance Suite unit conditions for valid and invalid ID-token signatures, request-object expiration boundaries, and discovery issuer presence, syntax, and equality"],"does_not_cover":["provider certification profiles, browser flows, external endpoints, and OpenID specifications outside the selected OIDC Core conditions"],"edition":"1.0-errata1+conformance-suite-3e09b13b","executable":"openid-conformance","expected_exits":["0=all selected official conditions pass","nonzero=condition or harness failure"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"oidc-core-1.0-profile","input_media_types":["application/vnd.openid.conformance-suite.selection.v1+json"],"memory_bytes":1073741824,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":4194304,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":120000,"trusted_root":null,"upstream_payload_sha256":"d33d7eb40b6db0080a48563fe6e8d1073393d18fe9f4afcb3de83f1679197bbb","wrapper_sha256":"6f78669abd8fa0d56568a281b34e2d668506aec6eaa2001f62e937f870a6a07b"},{"arguments":["oracle","openapi","{input}"],"authority_ids":["OPENAPI-3-2-0","OPENAPI-SCHEMA-3-2-2025-11-23","JSON-SCHEMA-2020-12"],"corpus":null,"covers":["official OpenAPI 3.2 JSON Schema instance validity"],"does_not_cover":["server behavior and prose-only interoperability"],"edition":"3.2.0","executable":"prismpm","expected_exits":["0=pass","4=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"openapi-3.2-schema","input_media_types":["application/vnd.oai.openapi+json;version=3.2.0"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":30000,"trusted_root":null,"upstream_payload_sha256":"7d48f01f37eeae4799041b371ad5f533f9f533fd2b0caa1011a8ba27c5b48b70","wrapper_sha256":"08a1ef2aec1e5ed35fe9162312a476b68b72b2133344738f645521a4276494e9"},{"arguments":["oracle","osv","{input}"],"authority_ids":["OSV-SCHEMA-B388","JSON-SCHEMA-2020-12"],"corpus":null,"covers":["OSV records in the submitted vulnerability collection against the pinned upstream schema"],"does_not_cover":["agreement with the locked advisory snapshot and vulnerabilities published after that snapshot are separate evidence"],"edition":"b388a18021a3","executable":"prismpm","expected_exits":["0=pass","4=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"osv-schema-snapshot","input_media_types":["application/vnd.osv+json"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":30000,"trusted_root":null,"upstream_payload_sha256":"02fe51837bbb67fcd250151332ad1abc078f789e6d396585a4ae933e0c61c0e7","wrapper_sha256":"08a1ef2aec1e5ed35fe9162312a476b68b72b2133344738f645521a4276494e9"},{"arguments":["validate","--config","{input}"],"authority_ids":["OTEL-SPEC-1-60-0","OTEL-SEMCONV-1-37-0","OTEL-COLLECTOR-0-136-0"],"corpus":{"path":"standards/corpora/opentelemetry-0.136.0","sha256":"90cdf6a86d9f2f7c9b60f66c9be7c296b394dfef57ac5e28d78965565252f223"},"covers":["OpenTelemetry Collector configuration loading and unmodified Collector receipt/export of the declared OTLP trace, metric, and log signals"],"does_not_cover":["unbounded availability, network losslessness, and external exporter provider behavior"],"edition":"0.136.0","executable":"otelcol-contrib","expected_exits":["0=pass","nonzero=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"otel-collector-0.136.0","input_media_types":["application/yaml"],"memory_bytes":536870912,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":4194304,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":60000,"trusted_root":null,"upstream_payload_sha256":"b844833e8c72e2661275c911d79885a49a3171be9563a7c8b4827b202582b207","wrapper_sha256":"6f78669abd8fa0d56568a281b34e2d668506aec6eaa2001f62e937f870a6a07b"},{"arguments":["verify-blob","--bundle","{bundle}","--trusted-root","{trusted-root}","--certificate-identity","{identity}","--certificate-oidc-issuer","{issuer}","{subject}"],"authority_ids":["SIGSTORE-COSIGN-3-1-3"],"corpus":null,"covers":["bundle signature, certificate identity, issuer, and transparency policy under an explicitly supplied pinned Sigstore trusted root"],"does_not_cover":["subject semantics and undeclared builder authorization"],"edition":"3.1.3","executable":"cosign","expected_exits":["0=pass","nonzero=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"sigstore-cosign-3.1.3","input_media_types":["application/octet-stream"],"memory_bytes":536870912,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":4194304,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":120000,"trusted_root":{"path":"standards/trust/sigstore-trusted-root-cosign-3.1.3.json","role":"sigstore-verification-root","sha256":"844a1c6de3986c9f02070266b25e0d1a2fa99ceccc89f6b9ad90aae47b62a16e"},"upstream_payload_sha256":"3a718446bac51466efff6853639e1ca108b456ecbf07cd92938f548715d22d6b","wrapper_sha256":"08a1ef2aec1e5ed35fe9162312a476b68b72b2133344738f645521a4276494e9"},{"arguments":["--provenance","{provenance}","--trusted-root","{trusted-root}","--source-uri","{source-uri}","--certificate-identity","{identity}","--certificate-oidc-issuer","{issuer}","{subject}"],"authority_ids":["SLSA-1-2","SLSA-VERIFIER-2-7-1","INTOTO-STATEMENT-1-0"],"corpus":null,"covers":["SLSA v1 provenance subject, source, builder/signing workflow identity, issuer, and embedded transparency evidence under an explicit pinned trust policy"],"does_not_cover":["the complete slsa-verifier 2.7.1 policy surface and a higher SLSA build level than the hosted platform evidence establishes"],"edition":"1.2","executable":"slsa-validator","expected_exits":["0=pass","nonzero=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"slsa-provenance-1.2","input_media_types":["application/vnd.in-toto+json"],"memory_bytes":536870912,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":4194304,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":120000,"trusted_root":{"path":"standards/trust/sigstore-trusted-root-cosign-3.1.3.json","role":"sigstore-verification-root","sha256":"844a1c6de3986c9f02070266b25e0d1a2fa99ceccc89f6b9ad90aae47b62a16e"},"upstream_payload_sha256":"c1ed640d3f775d09549488d120f7d02694c1bbf5bf885c302a7916660c62056d","wrapper_sha256":"08a1ef2aec1e5ed35fe9162312a476b68b72b2133344738f645521a4276494e9"},{"arguments":["/opt/prismpm/share/standards/oracles/spdx-json-schema-3.0.1/spdx-json-schema.json","{input}"],"authority_ids":["SPDX-3-0-1","SPDX-SCHEMA-3-0-1"],"corpus":{"path":"standards/oracles/spdx-3.0.1-model","sha256":"8db53aa63cfc7565f79e057a4da362d4144c546d56320a51b838befe8371b17d"},"covers":["the complete published SPDX 3.0.1 JSON schema over the official model plus positive and planted-invalid core/software documents"],"does_not_cover":["truth of submitted checksums and facts omitted by an upstream package manager or image scanner"],"edition":"3.0.1","executable":"spdx-validator","expected_exits":["0=pass","1=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"spdx-3.0.1-model","input_media_types":["application/spdx+json;version=3.0.1"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":30000,"trusted_root":null,"upstream_payload_sha256":"ff322ecc07bff0ec705f5e51c28002bc4d996de949cda0aedf456da4614eaaf7","wrapper_sha256":"6f78669abd8fa0d56568a281b34e2d668506aec6eaa2001f62e937f870a6a07b"},{"arguments":["oracle","unicode-normalization","{input}"],"authority_ids":["UNICODE-17-0-0"],"corpus":{"path":"standards/corpora/unicode-17.0.0","sha256":"1885ce2b3409b4f2b4a569c378d243f4a75e22fc10d59a69a69a1cacc16dda9e"},"covers":["every normalization assertion in the official Unicode 17.0.0 NormalizationTest.txt corpus and the UTF-8 scalar boundary"],"does_not_cover":["Unicode properties other than normalization and scalar-safe text handling"],"edition":"17.0.0","executable":"prismpm","expected_exits":["0=pass","4=invalid"],"failure_mapping":{"invalid":"PP5404","unavailable-or-untrusted":"PP5403"},"id":"unicode-normalization-17.0.0","input_media_types":["text/plain;profile=unicode-normalization-test"],"memory_bytes":268435456,"network":"deny","normalization":"prismpm/oracle-diagnostics/1","output_bytes":1048576,"output_schema":"prismpm/validation-result/1","subject":null,"supported_platforms":["linux/amd64","linux/arm64"],"timeout_ms":30000,"trusted_root":null,"upstream_payload_sha256":"2066d1909b2ea93916ce092da1c0ee4808ea3ef8407c94b4f14f5b7eb263d28e","wrapper_sha256":"6f78669abd8fa0d56568a281b34e2d668506aec6eaa2001f62e937f870a6a07b"}],"schema":"prismpm/standards-lock/1"} \ No newline at end of file diff --git a/tests/authenticated-signaling.test.js b/tests/authenticated-signaling.test.js new file mode 100644 index 0000000..ebf8c31 --- /dev/null +++ b/tests/authenticated-signaling.test.js @@ -0,0 +1,134 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { SignalSession } from '../src/layer5-transport/signaling.js'; +import { WebRtcTransportNode } from '../src/layer5-transport/index.js'; + +async function pair() { + const a = new SignalSession('mesh'), b = new SignalSession('mesh'); + const challenge = await b.receive(await a.sign({ kind: 'announce' })); + const response = await a.receive(await b.sign(challenge.reply)); + const joined = await b.receive(await a.sign(response.reply)); + assert.equal(joined.message.kind, 'announce'); + return { a, b }; +} + +test('public discovery requires signed session challenge before SDP admission', async () => { + const a = new SignalSession('mesh'), b = new SignalSession('mesh'); + const announce = await a.sign({ kind: 'announce' }); + const result = await b.receive(announce); + assert.equal(result.message, undefined); + assert.equal(result.reply.kind, 'hello'); + assert.equal(await b.receive({kind:'offer',from:a.id,channelKey:'mesh',sdp:{}}), null); + assert.equal(await b.receive(await a.sign({kind:'offer',to:(await b.identity()).id,targetSession:b.session,sdp:{type:'offer'}})), null); +}); + +test('signed SDP binds key/channel/destination/session and rejects concurrent replay', async () => { + const {a,b} = await pair(); + const offer = await a.sign({kind:'offer',to:b.id,sdp:{type:'offer',sdp:'signed'}}); + const results = await Promise.all([b.receive(offer),b.receive(offer)]); + assert.equal(results.filter(Boolean).length,1); + assert.equal(results.find(Boolean).message.sdp.sdp,'signed'); + for (const change of [{from:'key-forged'},{channelKey:'other'},{targetSession:a.session},{payload:{kind:'offer',sdp:{sdp:'injected'}}}]) { + assert.equal(await b.receive({...offer,...change}), null); + } +}); + +test('new key cannot impersonate bound key; reconnect invalidates old directed envelopes', async () => { + const {a,b} = await pair(), attacker = new SignalSession('mesh'); + const forged = await attacker.sign({kind:'offer',to:b.id,targetSession:b.session,sdp:{}}); + assert.equal(await b.receive({...forged,from:a.id}),null); + const old = await a.sign({kind:'offer',to:b.id,sdp:{}}); + b.close(); const fresh = new SignalSession('mesh'); + assert.equal(await b.receive(old),null); + assert.equal(await fresh.receive(old),null); +}); + +test('bounded discovery and authentication do not evict anti-replay records', async () => { + const b = new SignalSession('mesh',{maxPeers:1}); + const a = new SignalSession('mesh'), c = new SignalSession('mesh'); + assert.ok(await b.receive(await a.sign({kind:'announce'}))); + assert.equal(await b.receive(await c.sign({kind:'announce'})),null); + assert.equal(b.pending.size,1); +}); + +test('live transport rejects unsigned SDP before allocating RTC peers', async () => { + const node = new WebRtcTransportNode({channelKey:'mesh'}); + await node.handleSignal({kind:'offer',from:'claimed-victim',channelKey:'mesh',sdp:{}}); + assert.equal(node.peers.size,0); + node.close(); +}); + +test('two transport nodes negotiate using only authenticated relay envelopes', async t => { + let dataChannelsCreated = 0; + class Peer { + signalingState = 'stable'; connectionState = 'new'; + createDataChannel() { dataChannelsCreated++; return { readyState:'connecting',close(){} }; } + async createOffer() { return {type:'offer',sdp:'offer'}; } + async createAnswer() { return {type:'answer',sdp:'answer'}; } + async setLocalDescription(sdp) { this.localDescription=sdp; this.signalingState=sdp.type==='offer'?'have-local-offer':'stable'; } + async setRemoteDescription(sdp) { this.remoteDescription=sdp; this.signalingState=sdp.type==='offer'?'have-remote-offer':'stable'; } + close() {} + } + for (const [name,value] of Object.entries({RTCPeerConnection:Peer,RTCSessionDescription:class {constructor(sdp){Object.assign(this,sdp);}}})) { + const old=Object.getOwnPropertyDescriptor(globalThis,name); + Object.defineProperty(globalThis,name,{value,configurable:true,writable:true}); + t.after(()=>old?Object.defineProperty(globalThis,name,old):delete globalThis[name]); + } + const a=new WebRtcTransportNode({channelKey:'mesh'}),b=new WebRtcTransportNode({channelKey:'mesh'}), queue=[]; + t.after(()=>{a.close();b.close();}); + for(const [node,other] of [[a,b],[b,a]]) t.mock.method(node,'_queueRelay',async snapshot=>{queue.push([other,JSON.parse(snapshot.raw)]);return true;}); + a.sendSignal({kind:'announce'}); + for(let step=0;step<20;step++) { + await Promise.all([a,b].flatMap(n=>[...n.signalSigning.values()].map(j=>j.completion))); + if(!queue.length)break; + const [node,message]=queue.shift(); await node.handleSignal(message); + } + assert.equal(queue.length,0); + assert.equal(dataChannelsCreated,1, 'a pair must negotiate exactly one application channel, not crossing channels'); + assert.equal(a.peers.size,1);assert.equal(b.peers.size,1); + assert.ok(a.peers.get(b.signaling.id).pc.remoteDescription); + assert.ok(b.peers.get(a.signaling.id).pc.remoteDescription); + const before=a.peers.get(b.signaling.id).pc.remoteDescription; + await a.handleSignal({kind:'offer',from:b.signaling.id,channelKey:'mesh',sdp:{type:'offer',sdp:'evil'}}); + assert.equal(a.peers.get(b.signaling.id).pc.remoteDescription,before); +}); + +test('storage placement uses authenticated route identity rather than display label', async t => { + const {LiveUorMeshDatabase}=await import('../src/layer3-storage/index.js'); + const {createObject}=await import('../src/layer3-storage/custody.js'); + const node=new WebRtcTransportNode({peerId:'friendly-label',channelKey:'mesh'}); + t.after(()=>node.close()); + await node.signaling.identity(); + assert.notEqual(node.routingPeerId,node.peerId); + const db=new LiveUorMeshDatabase({transport:node}); + const bundle=await createObject(new Uint8Array([1,2,3])); + const packet=db._packet({manifest:bundle.manifest,label:'sample'},0,bundle.fragments[0].bytes, + {purpose:'placement',requestId:'request-1',holder:node.routingPeerId,leaseExpiresAt:Date.now()+10000}); + assert.equal(db._readPacket(packet).holder,node.routingPeerId); + assert.throws(()=>db._readPacket({...packet,holder:node.peerId})); +}); + +test('distinct offer and ICE remain in arrival order across delayed verification and RTC application', async t => { + const {a,b}=await pair(); + const offer=await a.sign({kind:'offer',to:b.id,sdp:{type:'offer',sdp:'ordered'}}); + const ice=await a.sign({kind:'ice',to:b.id,candidate:{candidate:'ordered'}}); + let releaseVerify,releaseApply,enteredVerify,enteredApply; + const verifyGate=new Promise(r=>releaseVerify=r), applyGate=new Promise(r=>releaseApply=r); + const verifying=new Promise(r=>enteredVerify=r), applying=new Promise(r=>enteredApply=r); + const original=crypto.subtle.verify.bind(crypto.subtle);let calls=0; + t.mock.method(crypto.subtle,'verify',async(...args)=>{ + if(++calls===1){enteredVerify();await verifyGate;} + return original(...args); + }); + const order=[]; + const first=b.receive(offer,async result=>{order.push(result.message.kind);enteredApply();await applyGate;}); + await verifying; + const second=b.receive(ice,result=>{order.push(result.message.kind);}); + await Promise.resolve();assert.equal(calls,1); + releaseVerify();await applying; + await Promise.resolve();assert.equal(calls,1);assert.deepEqual(order,['offer']); + releaseApply();const results=await Promise.all([first,second]); + assert.ok(results.every(Boolean));assert.deepEqual(order,['offer','ice']); + assert.equal(await b.receive(offer),null);assert.equal(await b.receive(ice),null); + assert.equal(b.verifying,0);assert.equal(b.queuedBytes,0); +}); diff --git a/tests/authority-ui.test.js b/tests/authority-ui.test.js new file mode 100644 index 0000000..eed56bd --- /dev/null +++ b/tests/authority-ui.test.js @@ -0,0 +1,78 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { installAuthorityControls } from '../src/authority-ui.js'; +import { SyntheticAuthorityStore } from './helpers/transactional-authority.js'; +import { generateAuthority, signPointer, PointerObserver } from '../src/layer1-uor/pointer.js'; +const name = 'state.example.test'; +async function pointer(authority) { return signPointer({ version:1, name, authorityKey: authority.publicKey, revision:0, previousDigest:null, + objectRoot:`sha256:${'d'.repeat(64)}`, validFromMs:0, validUntilMs:Number.MAX_SAFE_INTEGER }, authority.privateKey); } +async function setup() { + const store = new SyntheticAuthorityStore(), authority = await store.setupAuthority(), head = await pointer(authority); + const elements = new Map(), pins = new Map(), changed = [], downloads = []; + function element() { return { value:'', checked:false, open:true, textContent:'', hidden:false, disabled:false, attributes:{}, listeners:{}, + setAttribute(key,value) { this.attributes[key] = value; }, addEventListener(type,handler) { (this.listeners[type] ??= []).push(handler); }, + async emit(type) { for (const handler of this.listeners[type] ?? []) await handler(); } }; } + const document = { getElementById(id) { if (!elements.has(id)) elements.set(id,element()); return elements.get(id); } }; + const get = id => document.getElementById(id); + get('dnsQueryInput').value = name; get('pointerAuthorityInput').value = authority.publicKey; + const observer = () => { + const key = `${get('dnsQueryInput').value}:${get('pointerAuthorityInput').value}`; + if (!pins.has(key)) pins.set(key,new PointerObserver({ name:get('dnsQueryInput').value, trustedAuthorityKey:get('pointerAuthorityInput').value, clock:()=>5, trustStore:store })); + return pins.get(key); + }; + await observer().admit(head); + const ui = installAuthorityControls({ document, store, pointerObserver:observer, onAuthorityChanged:status=>changed.push(status), download:text=>downloads.push(text) }); + await ui.refresh(); + return { store, authority, head, ui, observer, get, changed, downloads, click:id=>get(id).emit('click') }; +} +test('rotation is contextual, exact-key confirmed and leaves visible pin and observer unchanged', async () => { + const t = await setup(), old = t.observer(); + await t.click('rotateAuthorityBtn'); assert.equal((await t.store.authorityStatus()).publicKey,t.authority.publicKey); + t.get('authorityExpectedKey').value = t.authority.publicKey; t.get('authorityLifecycleConsent').checked = true; + await t.click('rotateAuthorityBtn'); + assert.equal(t.changed.length,1); assert.notEqual(t.changed[0].publicKey,t.authority.publicKey); + assert.equal(t.get('pointerAuthorityInput').value,t.authority.publicKey); assert.equal(old.head.pointerDigest,t.head.pointerDigest); + assert.equal(t.get('authorityLifecycleConsent').checked,false); assert.match(t.get('authorityLifecycleStatus').textContent,/No trust pin or DNS record changed/); +}); +test('closing a pending lifecycle operation cancels commit; repeated click cannot repeat it', async () => { + const t = await setup(); let release, reached; + const gate = new Promise(r=>release=r), entered = new Promise(r=>reached=r); + const rotate = t.store.rotateAuthority.bind(t.store); let calls = 0; + t.store.rotateAuthority = async args => { calls++; reached(); await gate; return rotate(args); }; + t.get('authorityExpectedKey').value = t.authority.publicKey; t.get('authorityLifecycleConsent').checked = true; + const operation = t.click('rotateAuthorityBtn'); await entered; + assert.equal(t.get('authorityLifecyclePanel').attributes['aria-busy'],'true'); + await t.click('rotateAuthorityBtn'); assert.equal(calls,1); + t.get('authorityLifecyclePanel').open = false; await t.get('authorityLifecyclePanel').emit('toggle'); + release(); await operation; + assert.equal(t.get('authorityLifecyclePanel').attributes['aria-busy'],'false'); + assert.equal((await t.store.authorityStatus()).publicKey,t.authority.publicKey); + assert.match(t.get('authorityLifecycleStatus').textContent,/Refused or interrupted/); + t.get('authorityLifecyclePanel').open=true; await t.get('authorityLifecyclePanel').emit('toggle'); + assert.equal(calls,1); +}); +test('saving, migrating and restoring trust are separate explicit actions', async () => { + const t = await setup(); + t.get('authorityAnchorKey').value=t.authority.publicKey; t.get('authorityAnchorDigest').value=t.head.pointerDigest; t.get('authorityAnchorConsent').checked=true; + await t.click('saveTrustedAnchorBtn'); assert.equal((await t.store.trustedAnchor(name)).publicKey,t.authority.publicKey); + const replacement = await generateAuthority(), next = await pointer(replacement); + t.get('authorityAnchorKey').value=replacement.publicKey; t.get('authorityAnchorDigest').value=next.pointerDigest; + t.get('pointerJsonInput').value=JSON.stringify(next); t.get('authorityAnchorConsent').checked=true; + await t.click('migrateTrustedAnchorBtn'); + assert.equal((await t.store.trustedAnchor(name)).publicKey,replacement.publicKey); + assert.equal(t.get('pointerAuthorityInput').value,t.authority.publicKey); assert.equal(t.observer().head.pointerDigest,t.head.pointerDigest); + t.get('pointerAuthorityInput').value=replacement.publicKey; await t.get('pointerAuthorityInput').emit('input'); + await t.ui.refresh(); assert.equal(t.observer().head,null); + await t.click('restoreTrustedAnchorBtn'); assert.equal(t.observer().head.pointerDigest,next.pointerDigest); +}); +test('changing scope or anchor input clears consent, failed storage does not reset evidence, journal export is public', async () => { + const t = await setup(); + for (const id of ['dnsQueryInput','pointerAuthorityInput','authorityExpectedKey','authorityAnchorKey','authorityAnchorDigest','pointerJsonInput']) { + t.get('authorityAnchorConsent').checked=true; t.get('authorityLifecycleConsent').checked=true; + await t.get(id).emit('input'); assert.equal(t.get('authorityAnchorConsent').checked,false); assert.equal(t.get('authorityLifecycleConsent').checked,false); + } + await t.click('exportAuthorityJournalBtn'); assert.equal(t.downloads.length,1); assert.equal(t.downloads[0].includes('privateKey'),false); + t.store.fail = true; await t.click('inspectAuthorityStorageBtn'); t.store.fail = false; + assert.equal((await t.store.authorityStatus()).publicKey,t.authority.publicKey); + assert.match(t.get('authorityLifecycleStatus').textContent,/Nothing was reset|not reset/); +}); diff --git a/tests/browser-authority-lifecycle.test.js b/tests/browser-authority-lifecycle.test.js new file mode 100644 index 0000000..059a350 --- /dev/null +++ b/tests/browser-authority-lifecycle.test.js @@ -0,0 +1,198 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { SyntheticAuthorityStore } from './helpers/transactional-authority.js'; +import { BrowserAuthorityStore } from '../src/layer1-uor/browser-authority.js'; +import { generateAuthority, signPointer, PointerObserver, PointerPublisher } from '../src/layer1-uor/pointer.js'; +import { model } from '../src/layer1-uor/generated-model.js'; +const name = 'state.example.test', zoneId = 'b'.repeat(32), objectRoot = `sha256:${'a'.repeat(64)}`; +async function pointer(authority, revision = 0, previousDigest = null) { + return signPointer({ version: 1, name, authorityKey: authority.publicKey, revision, previousDigest, + objectRoot, validFromMs: 0, validUntilMs: 100 }, authority.privateKey); +} +async function save(store, candidate) { + return store.saveTrustedAnchor({ candidate, expectedAuthorityKey: candidate.authorityKey, expectedPointerDigest: candidate.pointerDigest, confirmed: true, nowMs: 5 }); +} +function observer(store, publicKey) { return new PointerObserver({ name, trustedAuthorityKey: publicKey, clock: () => 5, trustStore: store }); } +function pending(candidate, recordId = null) { return { outcome: 'unknown', candidate, pointerDigest: candidate.pointerDigest, recordId }; } +function scope(candidate) { return JSON.stringify([zoneId, candidate.name, candidate.authorityKey]); } + +test('model refuses absent/changed/unconfirmed lifecycle decisions and any uncertain journal removal', () => { + const rule = (name, ...args) => model[`Stitch.Authority.${name}`](...args); + for (const op of ['rotationAllowed','revocationAllowed','migrationAllowed']) { + const count = op === 'rotationAllowed' ? 4 : op === 'migrationAllowed' ? 5 : 3; + assert.equal(rule(op, ...Array(count).fill(true)), true); + for (let n = 0; n < count; n++) { const args = Array(count).fill(true); args[n] = false; assert.equal(rule(op, ...args), false); } + } + assert.equal(rule('publicationAllowed', true, true), false); + assert.equal(rule('publicationAllowed', false, false), false); + for (const confirmed of [true, false]) for (const noIdentity of [true, false]) assert.equal(rule('journalRemovalAllowed', confirmed, false, noIdentity), false); +}); +test('explicit rotation retains tombstones, all journals and saved trust, never repins', async () => { + const store = new SyntheticAuthorityStore(), first = await store.setupAuthority(), p = await pointer(first); + await save(store, p); await store.claimPublication(scope(p), pending(p)); + const next = await store.rotateAuthority({ expectedPublicKey: first.publicKey, confirmed: true, nowMs: 10 }); + assert.notEqual(next.publicKey, first.publicKey); assert.equal(next.generation, 1); + assert.deepEqual(next.history, [{ publicKey: first.publicKey, generation: 0, revokedAtMs: 10 }]); + assert.equal((await store.restoreAuthority()).privateKey.extractable, false); + assert.equal((await store.setupAuthority()).publicKey, next.publicKey); + assert.equal((await store.trustedAnchor(name)).publicKey, first.publicKey); + assert.deepEqual((await store.readPublication(scope(p))).candidate, p); + const otherName = { ...p, name: 'other.example.test' }; + await assert.rejects(store.claimPublication(scope(otherName), pending(otherName)), /revoked\/changed/); + await assert.rejects(store.signPointer({ ...p }, first.publicKey), /changed/); +}); +test('revocation survives restart and refuses setup and saved signing without pretending to retract signatures', async () => { + const store = new SyntheticAuthorityStore(), first = await store.setupAuthority(), candidate = await pointer(first); + await store.revokeAuthority({ expectedPublicKey: first.publicKey, confirmed: true, nowMs: 10 }); + const restart = new SyntheticAuthorityStore(store.state); + assert.equal((await restart.authorityStatus()).status, 'revoked'); + await assert.rejects(restart.restoreAuthority(), /revoked/); await assert.rejects(restart.setupAuthority(), /revoked/); + await assert.rejects(restart.signPointer(candidate, first.publicKey), /revoked/); + assert.equal(store.state.records.get('authority').privateKey, null); + // Local revocation is intentionally not cryptographic erasure of old handles. + const { verifyPointer } = await import('../src/layer1-uor/pointer.js'); + await verifyPointer(candidate, first.publicKey); + const next = await restart.rotateAuthority({ expectedPublicKey: first.publicKey, confirmed: true }); + assert.notEqual(next.publicKey, first.publicKey); +}); +test('wrong exact key, no consent, stale UI and commit failure preserve authority and journals', async () => { + const store = new SyntheticAuthorityStore(), first = await store.setupAuthority(), candidate = await pointer(first); + await store.claimPublication(scope(candidate), pending(candidate)); + const before = structuredClone([...store.state.records]); + for (const args of [{ expectedPublicKey: first.publicKey }, { expectedPublicKey: 'f'.repeat(64), confirmed: true }, + { expectedPublicKey: first.publicKey, confirmed: true, scopeStillCurrent: () => false }]) { + await assert.rejects(store.rotateAuthority(args)); + await assert.rejects(store.revokeAuthority(args)); + } + store.fail = true; + await assert.rejects(store.rotateAuthority({ expectedPublicKey: first.publicKey, confirmed: true }), /quota/); + await assert.rejects(store.revokeAuthority({ expectedPublicKey: first.publicKey, confirmed: true }), /quota/); + store.fail = false; assert.deepEqual([...store.state.records], before); +}); +test('origin lock waits for dispatch, revocation then blocks new old-key writes but permits exact reconciliation', async () => { + const store = new SyntheticAuthorityStore(), authority = await store.setupAuthority(), candidate = await pointer(authority); + let release, entered; const gate = new Promise(r => release = r), reached = new Promise(r => entered = r); + let records = [], writes = 0; + const resolver = { async listCloudflareRecords() { return records; }, async writeCloudflareRecord(input) { + writes++; entered(); await gate; records = [{ ...input, id: 'record-one' }]; throw Error('lost acknowledgement'); + } }; + const publisher = () => new PointerPublisher({ journal: new SyntheticAuthorityStore(store.state), resolver, clock: () => 5 }); + const request = { zoneId, name, apiToken: 'not-exportable', trustedAuthorityKey: authority.publicKey, candidate }; + const first = publisher().publish(request); await reached; + let revoked = false; + const revocation = store.revokeAuthority({ expectedPublicKey: authority.publicKey, confirmed: true }).then(() => revoked = true); + await new Promise(r => setTimeout(r, 10)); assert.equal(revoked, false); + release(); assert.equal((await first).outcome, 'unknown'); await revocation; + assert.equal((await publisher().publish(request)).outcome, 'published'); assert.equal(writes, 1); + const next = await pointer(authority, 1, candidate.pointerDigest); + await assert.rejects(publisher().publish({ ...request, candidate: next }), /revoked\/changed/); + assert.equal(writes, 1); +}); +test('saved exact heads restore explicitly, advance transactionally and reject stale reload bootstrap', async () => { + const store = new SyntheticAuthorityStore(), authority = await generateAuthority(), first = await pointer(authority); + await save(store, first); + const live = observer(store, authority.publicKey); + assert.equal(live.head, null); + await live.restoreFromTrustedAnchor({ expectedDigest: first.pointerDigest }); + const next = await pointer(authority, 1, first.pointerDigest); + store.fail = true; await assert.rejects(live.admit(next)); store.fail = false; + assert.equal(live.head.pointerDigest, first.pointerDigest); + await live.admit(next); assert.equal((await store.trustedAnchor(name)).head.pointerDigest, next.pointerDigest); + const reloaded = observer(new SyntheticAuthorityStore(store.state), authority.publicKey); + await assert.rejects(reloaded.admit(first), /pointer-conflict|restore/); assert.equal(reloaded.head, null); + await assert.rejects(reloaded.restoreFromTrustedAnchor({ expectedDigest: first.pointerDigest }), /changed/); + await reloaded.restoreFromTrustedAnchor({ expectedDigest: next.pointerDigest }); + assert.equal(reloaded.head.pointerDigest, next.pointerDigest); +}); +test('migration requires exact independently accepted scope, refuses stale/canceled acceptance, never changes old observer', async () => { + const store = new SyntheticAuthorityStore(), old = await generateAuthority(), replacement = await generateAuthority(); + const a = await pointer(old), b = await pointer(replacement, 7, objectRoot); await save(store, a); + const live = observer(store, old.publicKey); await live.restoreFromTrustedAnchor({ expectedDigest: a.pointerDigest }); + const migration = { name, expectedAuthorityKey: old.publicKey, expectedPointerDigest: a.pointerDigest, + newAuthorityKey: replacement.publicKey, newPointerDigest: b.pointerDigest, candidate: b, confirmed: true, nowMs: 5 }; + for (const patch of [{ confirmed: false }, { newPointerDigest: objectRoot }, { expectedPointerDigest: objectRoot }, + { newAuthorityKey: old.publicKey }, { scopeStillCurrent: () => false }, { nowMs: 100 }]) await assert.rejects(store.migrateTrustedAnchor({ ...migration, ...patch })); + await store.migrateTrustedAnchor(migration); + assert.equal(live.trustedAuthorityKey, old.publicKey); assert.equal(live.head.pointerDigest, a.pointerDigest); + await assert.rejects(live.admit(await pointer(old, 1, a.pointerDigest)), /different or revoked/); + const newLive = observer(store, replacement.publicKey); + await assert.rejects(newLive.admit(b), /bootstrap/); + await newLive.restoreFromTrustedAnchor({ expectedDigest: b.pointerDigest }); + await newLive.admit(await pointer(replacement, 8, b.pointerDigest)); + await assert.rejects(store.migrateTrustedAnchor(migration), /changed/); +}); +test('local trust revocation blocks admission and new claims while retaining head, journal and migration path', async () => { + const store = new SyntheticAuthorityStore(), authority = await generateAuthority(), p = await pointer(authority); await save(store, p); + const live = observer(store, authority.publicKey); await live.restoreFromTrustedAnchor({ expectedDigest: p.pointerDigest }); + await store.claimPublication(scope(p), pending(p)); + await store.revokeTrustedAnchor({ name, expectedAuthorityKey: authority.publicKey, expectedPointerDigest: p.pointerDigest, confirmed: true }); + await assert.rejects(live.admit(await pointer(authority, 1, p.pointerDigest)), /revoked/); + await assert.rejects(observer(store, authority.publicKey).restoreFromTrustedAnchor({ expectedDigest: p.pointerDigest }), /revoked/); + const replacement = await generateAuthority(), next = await pointer(replacement); + await assert.rejects(store.migrateTrustedAnchor({ name, expectedAuthorityKey: authority.publicKey, expectedPointerDigest: p.pointerDigest, + newAuthorityKey: authority.publicKey, newPointerDigest: p.pointerDigest, candidate: p, confirmed: true, nowMs: 5 }), /retired/); + await store.migrateTrustedAnchor({ name, expectedAuthorityKey: authority.publicKey, expectedPointerDigest: p.pointerDigest, + newAuthorityKey: replacement.publicKey, newPointerDigest: next.pointerDigest, candidate: next, confirmed: true, nowMs: 5 }); + assert.deepEqual((await store.readPublication(scope(p))).candidate, p); +}); +test('anchor validity and UI scope are checked at transaction commit after crypto', async () => { + const store = new SyntheticAuthorityStore(), authority = await generateAuthority(), p = await pointer(authority); + let now = 5; store.clock = () => now; + const original = store.transaction.bind(store); + store.transaction = (key, work) => { if (key.startsWith('trust:')) now = 100; return original(key, work); }; + await assert.rejects(store.saveTrustedAnchor({ candidate: p, expectedAuthorityKey: authority.publicKey, expectedPointerDigest: p.pointerDigest, confirmed: true }), /expired/); + assert.equal(await store.trustedAnchor(name), null); +}); +test('quota inspection, explicit persistence and public export do not leak keys, tokens or mutation ownership', async () => { + const store = new SyntheticAuthorityStore(), a = await store.setupAuthority(), p = await pointer(a); await save(store, p); + await store.claimPublication(scope(p), pending(p)); + let asks = 0; store.storage = { estimate: async () => ({ usage: 100, quota: 900 }), persisted: async () => false, persist: async () => { asks++; return false; } }; + assert.deepEqual(await store.inspectStorage(), { usageBytes: 100, quotaBytes: 900, persistent: false, journalEntries: 1, unknownEntries: 1, + assurance: 'Origin-wide estimates and persistence permission do not guarantee retention or provide a backup.' }); + await assert.rejects(store.requestPersistence()); assert.equal(asks, 0); + assert.equal(await store.requestPersistence({ confirmed: true }), false); assert.equal(asks, 1); + const wire = await store.exportPublicJournal(), data = JSON.parse(wire); + assert.deepEqual(data.publications[0].candidate, p); assert.equal(data.authority.publicKey, a.publicKey); + for (const secret of ['privateKey','owner','not-exportable']) assert.equal(wire.includes(secret), false); + assert.equal(await new BrowserAuthorityStore({ indexedDB: null }).requestPersistence({ confirmed: true }).catch(() => 'unsupported'), 'unsupported'); +}); +test('compaction never removes unknown writes, published heads, provider identities or trust/key tombstones', async () => { + const store = new SyntheticAuthorityStore(), a = await store.setupAuthority(), p = await pointer(a); await save(store, p); + for (const [suffix, state] of [['unknown', pending(p)], ['published',{ outcome:'published', pointerDigest:p.pointerDigest, recordId:'record-one' }], + ['refused-update',{ outcome:'refused', pointerDigest:p.pointerDigest, recordId:'record-one' }], ['refused-create',{ outcome:'refused', pointerDigest:p.pointerDigest, recordId:null }]]) store.state.records.set(`dns:${suffix}`, state); + await assert.rejects(store.compactRefusedJournal()); + assert.equal(await store.compactRefusedJournal({ confirmed:true }), 1); + assert.equal(store.state.records.has('dns:refused-create'), false); + for (const key of ['authority',`trust:${name}`,'dns:unknown','dns:published','dns:refused-update']) assert.equal(store.state.records.has(key), true); +}); + +test('same-key reanchoring refuses rollback and forks and does not pretend missing intermediate links were checked', async () => { + const store = new SyntheticAuthorityStore(), authority = await generateAuthority(), first = await pointer(authority); await save(store, first); + const jump = await pointer(authority, 9, objectRoot); + const request = { name, expectedAuthorityKey:authority.publicKey, expectedPointerDigest:first.pointerDigest, + newAuthorityKey:authority.publicKey, newPointerDigest:jump.pointerDigest, candidate:jump, confirmed:true, nowMs:5 }; + await store.migrateTrustedAnchor(request); + assert.equal((await store.trustedAnchor(name)).head.pointerDigest,jump.pointerDigest); + await assert.rejects(store.migrateTrustedAnchor({ ...request, expectedPointerDigest:jump.pointerDigest, newPointerDigest:first.pointerDigest, candidate:first }), /rollback/); + const fork = await pointer(authority,9,first.pointerDigest); + await assert.rejects(store.migrateTrustedAnchor({ ...request, expectedPointerDigest:jump.pointerDigest, newPointerDigest:fork.pointerDigest, candidate:fork }), /fork/); + const adjacent = await pointer(authority,10,first.pointerDigest); + await assert.rejects(store.migrateTrustedAnchor({ ...request, expectedPointerDigest:jump.pointerDigest, newPointerDigest:adjacent.pointerDigest, candidate:adjacent }), /predecessor/); + await assert.rejects(store.retainTrustedHead({ name, expectedPointerDigest:jump.pointerDigest, candidate:{ ...jump, revision:0 }, nowMs:5 }), /integrity/); +}); + +test('saved trust revocation waits for a provider dispatch and never discards its unresolved candidate', async () => { + const store = new SyntheticAuthorityStore(), authority = await generateAuthority(), p = await pointer(authority); await save(store, p); + let reached, release, writes = 0; const entered = new Promise(r=>reached=r), gate = new Promise(r=>release=r); + const resolver = { async listCloudflareRecords() { return []; }, async writeCloudflareRecord() { writes++; reached(); await gate; throw Error('interrupted'); } }; + const publisher = new PointerPublisher({ journal:store, resolver, clock:()=>5 }); + const publication = publisher.publish({ zoneId, name, trustedAuthorityKey:authority.publicKey, candidate:p, apiToken:'never-export' }); + await entered; + let finished = false; + const revoke = store.revokeTrustedAnchor({ name, expectedAuthorityKey:authority.publicKey, expectedPointerDigest:p.pointerDigest, confirmed:true }).then(()=>finished=true); + await new Promise(r=>setTimeout(r,10)); assert.equal(finished,false); + release(); assert.equal((await publication).outcome,'unknown'); await revoke; + assert.deepEqual((await store.readPublication(scope(p))).candidate,p); assert.equal(writes,1); + assert.equal((await publisher.publish({ zoneId, name, trustedAuthorityKey:authority.publicKey, candidate:p, apiToken:'never-export' })).outcome,'unknown'); + assert.equal(writes,1); +}); diff --git a/tests/browser-authority.test.js b/tests/browser-authority.test.js new file mode 100644 index 0000000..ec59624 --- /dev/null +++ b/tests/browser-authority.test.js @@ -0,0 +1,136 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { SyntheticAuthorityStore } from './helpers/transactional-authority.js'; +import { BrowserAuthorityStore } from '../src/layer1-uor/browser-authority.js'; +import { generateAuthority, signPointer, PointerPublisher, pointerDnsText } from '../src/layer1-uor/pointer.js'; +async function fixture() { + const journal = new SyntheticAuthorityStore(), authority = await generateAuthority(); + const name = 'state.example.test', zoneId = 'a'.repeat(32); + const candidate = await signPointer({ version: 1, name, authorityKey: authority.publicKey, revision: 0, + previousDigest: null, objectRoot: `sha256:${'f'.repeat(64)}`, validFromMs: 0, validUntilMs: 100 }, authority.privateKey); + let records = [], writes = 0, mode = 'lost'; + const resolver = { + async listCloudflareRecords() { return structuredClone(records); }, + async writeCloudflareRecord(input) { + writes++; + const saved = await journal.readPublication(JSON.stringify([zoneId, name, authority.publicKey])); + assert.deepEqual(saved.candidate, candidate); assert.equal(saved.outcome, 'unknown'); + if (mode !== 'absent') records = [{ ...input, id: 'record-1' }]; + if (mode !== 'success') throw Error('lost response'); + return { outcome: 'published', ok: true, id: 'record-1' }; + } + }; + const args = { zoneId, name, trustedAuthorityKey: authority.publicKey, candidate, apiToken: 'never-save-this' }; + const publisher = () => new PointerPublisher({ resolver, journal: new SyntheticAuthorityStore(journal.state), clock: () => 5 }); + return { journal, authority, args, publisher, resolver, writes: () => writes, mode: value => mode = value, + rows: value => records = value }; +} +test('explicit setup persists nonextractable same authority; restore never creates or rotates', async () => { + const store = new SyntheticAuthorityStore(); + assert.equal(await store.restoreAuthority(), null); + const [a, b] = await Promise.all([store.setupAuthority(), store.setupAuthority()]); + assert.equal(a.publicKey, b.publicKey); assert.equal(a.privateKey.extractable, false); + assert.equal((await new SyntheticAuthorityStore(store.state).restoreAuthority()).publicKey, a.publicKey); + await assert.rejects(crypto.subtle.exportKey('pkcs8', a.privateKey)); + store.fail = true; await assert.rejects(store.setupAuthority()); store.fail = false; + assert.equal((await store.restoreAuthority()).publicKey, a.publicKey); +}); +test('unavailable or corrupt storage never substitutes a new signing authority', async () => { + await assert.rejects(new BrowserAuthorityStore({ indexedDB: null }).restoreAuthority()); + const store = new SyntheticAuthorityStore(); store.state.records.set('authority', { version: 1 }); + await assert.rejects(store.setupAuthority()); assert.deepEqual(store.state.records.get('authority'), { version: 1 }); +}); +test('lost result survives restart and exact read reconciles with no repeated mutation', async () => { + const f = await fixture(); assert.equal((await f.publisher().publish(f.args)).outcome, 'unknown'); + const restarted = f.publisher(); assert.deepEqual(await restarted.restore(f.args), f.args.candidate); + assert.equal((await restarted.publish(f.args)).outcome, 'published'); assert.equal(f.writes(), 1); + assert.equal(JSON.stringify([...f.journal.state.records]).includes('never-save-this'), false); +}); +test('absent observation after interruption cannot authorize retry, even for a new candidate', async () => { + const f = await fixture(); f.mode('absent'); await f.publisher().publish(f.args); + const next = await signPointer({ ...Object.fromEntries(Object.entries(f.args.candidate).filter(([k]) => !['signature','pointerDigest'].includes(k))), + revision: 1, previousDigest: f.args.candidate.pointerDigest }, f.authority.privateKey); + assert.equal((await f.publisher().publish({ ...f.args, candidate: next })).outcome, 'unknown'); + assert.equal(f.writes(), 1); +}); +test('concurrent tabs obtain one transactional mutation owner', async () => { + const f = await fixture(); f.mode('absent'); + const results = await Promise.all([f.publisher().publish(f.args), f.publisher().publish(f.args)]); + assert.deepEqual(results.map(x => x.outcome), ['unknown', 'unknown']); assert.equal(f.writes(), 1); +}); +test('claim commit failure prevents all provider mutation and preserves prior bytes', async () => { + const f = await fixture(); f.journal.fail = true; + const publisher = new PointerPublisher({ resolver: f.resolver, journal: f.journal, clock: () => 5 }); + await assert.rejects(publisher.publish(f.args)); assert.equal(f.writes(), 0); assert.equal(f.journal.state.records.size, 0); +}); +test('failure to commit exact post-read intent blocks dispatch and permits repaired explicit retry', async () => { + const f = await fixture(); f.journal.fail = 2; + const publisher = new PointerPublisher({ resolver: f.resolver, journal: f.journal, clock: () => 5 }); + await assert.rejects(publisher.publish(f.args), /quota/); assert.equal(f.writes(), 0); + assert.equal(await f.publisher().restore(f.args), null); + assert.equal((await f.publisher().publish(f.args)).outcome, 'unknown'); assert.equal(f.writes(), 1); +}); +test('completion persistence failure retains unknown and later reads reconcile', async () => { + const f = await fixture(); f.mode('success'); + // load prior, claim exact pending, adapter inspection read, then completion + f.journal.fail = 4; + const publisher = new PointerPublisher({ resolver: f.resolver, journal: f.journal, clock: () => 5 }); + assert.equal((await publisher.publish(f.args)).outcome, 'unknown'); + assert.equal((await f.publisher().publish(f.args)).outcome, 'published'); assert.equal(f.writes(), 1); +}); +test('missing Web Locks refuses publication instead of unsafe cross-tab fallback', async () => { + const f = await fixture(); + const store = new BrowserAuthorityStore({ locks: null }); + const publisher = new PointerPublisher({ resolver: f.resolver, journal: store }); + await assert.rejects(publisher.publish(f.args), /Web Locks/); assert.equal(f.writes(), 0); +}); +test('a suspended live writer holds the lock until completion; another tab cannot reconcile past it', async () => { + const f = await fixture(); let unblock, entered; + const reached = new Promise(resolve => entered = resolve), gate = new Promise(resolve => unblock = resolve); + const original = f.resolver.writeCloudflareRecord; + f.resolver.writeCloudflareRecord = async input => { entered(); await gate; return original(input); }; + const first = f.publisher().publish(f.args); await reached; + let secondDone = false; + const second = f.publisher().publish(f.args).then(value => { secondDone = true; return value; }); + await new Promise(resolve => setTimeout(resolve, 10)); + assert.equal(secondDone, false); assert.equal(f.writes(), 0); + unblock(); await first; assert.equal((await second).outcome, 'published'); assert.equal(f.writes(), 1); +}); +test('provider read failure leaves no unknown claim and repaired explicit retry writes once', async () => { + const f = await fixture(); const original = f.resolver.listCloudflareRecords; + f.resolver.listCloudflareRecords = async () => { throw Error('read unavailable'); }; + await assert.rejects(f.publisher().publish(f.args), /read unavailable/); + assert.equal(await f.publisher().restore(f.args), null); assert.equal(f.writes(), 0); + f.resolver.listCloudflareRecords = original; + assert.equal((await f.publisher().publish(f.args)).outcome, 'unknown'); assert.equal(f.writes(), 1); + assert.equal((await f.publisher().publish(f.args)).outcome, 'published'); assert.equal(f.writes(), 1); +}); +test('exhausted admission before provider read does not wedge publication after renewal', async () => { + const f = await fixture(); let exhausted = true, reads = 0; + f.resolver.admission = { reserve() { if (exhausted) throw Error('resource epoch exhausted'); } }; + const original = f.resolver.listCloudflareRecords; + f.resolver.listCloudflareRecords = async () => { reads++; return original(); }; + await assert.rejects(f.publisher().publish(f.args), /epoch exhausted/); + assert.equal(reads, 0); assert.equal(f.writes(), 0); assert.equal(await f.publisher().restore(f.args), null); + exhausted = false; + await f.publisher().publish(f.args); assert.equal(f.writes(), 1); + await f.publisher().publish(f.args); assert.equal(f.writes(), 1); +}); +test('provably undispatched adapter refusal settles owned claim and permits explicit repair', async () => { + const f = await fixture(); const original = f.resolver.writeCloudflareRecord; + f.resolver.writeCloudflareRecord = async () => { throw Object.assign(Error('local adapter refusal'), { effectDispatched: false }); }; + await assert.rejects(f.publisher().publish(f.args), /local adapter refusal/); + assert.equal(await f.publisher().restore(f.args), null); assert.equal(f.writes(), 0); + assert.equal([...f.journal.state.records.values()][0].outcome, 'refused'); + f.resolver.writeCloudflareRecord = original; + await f.publisher().publish(f.args); await f.publisher().publish(f.args); assert.equal(f.writes(), 1); +}); +test('failure to save definite undispatched refusal remains conservatively unknown', async () => { + const f = await fixture(); + f.resolver.writeCloudflareRecord = async () => { throw Object.assign(Error('local adapter refusal'), { effectDispatched: false }); }; + f.journal.fail = 3; // load, claim, then refusal settlement abort + const publisher = new PointerPublisher({ resolver: f.resolver, journal: f.journal, clock: () => 5 }); + assert.equal((await publisher.publish(f.args)).outcome, 'unknown'); + assert.deepEqual(await f.publisher().restore(f.args), f.args.candidate); + assert.equal((await f.publisher().publish(f.args)).outcome, 'unknown'); assert.equal(f.writes(), 0); +}); diff --git a/tests/browser-transport.test.js b/tests/browser-transport.test.js new file mode 100644 index 0000000..21d0297 --- /dev/null +++ b/tests/browser-transport.test.js @@ -0,0 +1,72 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { WebRtcTransportNode } from '../src/layer5-transport/index.js'; + +function replace(t, name, value) { + const prior = Object.getOwnPropertyDescriptor(globalThis, name); + Object.defineProperty(globalThis, name, { value, writable: true, configurable: true }); + t.after(() => prior ? Object.defineProperty(globalThis, name, prior) : delete globalThis[name]); +} + +test('explicit local-only ICE and caller configuration are snapshotted before browser allocation', t => { + const seen = []; + replace(t, 'RTCPeerConnection', class { + constructor(config) { seen.push(config); } + close() {} + }); + const input = [{ urls: ['turn:example.test:3478'], username: 'scoped-user', credential: 'test-only' }]; + const node = new WebRtcTransportNode({ iceServers: input }); + t.after(() => node.close()); + input[0].urls[0] = 'stun:changed.test'; input[0].credential = 'changed'; input.push({ urls: 'stun:new.test' }); + node.getOrCreatePeer('remote'); + assert.deepEqual(seen[0], { iceServers: [{ urls: ['turn:example.test:3478'], username: 'scoped-user', credential: 'test-only' }] }); + const local = new WebRtcTransportNode({ iceServers: [] }); + t.after(() => local.close()); local.getOrCreatePeer('remote'); + assert.deepEqual(seen[1], { iceServers: [] }); +}); + +test('malformed or excessive ICE configuration refuses before allocating peers', t => { + let calls = 0; + replace(t, 'RTCPeerConnection', class { constructor() { calls++; } }); + for (const iceServers of [{}, [{}], [{ urls: [] }], [{ urls: 'https://example.test' }], + [{ urls: 'stun:with space' }], [{ urls: 'stun:example.test', credential: {} }], + [{ urls: 'stun:example.test', unsupported: true }], Array(17).fill({ urls: 'stun:example.test' })]) { + assert.throws(() => new WebRtcTransportNode({ iceServers }), /Invalid ICE server configuration/); + } + assert.equal(calls, 0); +}); + +test('same-origin discovery announces without waiting for an unavailable public signaling socket', async t => { + const frames = [], sockets = []; + replace(t, 'BroadcastChannel', class { + postMessage(value) { frames.push(value); } + close() {} + }); + replace(t, 'WebSocket', class { + constructor() { sockets.push(this); } + close() {} + }); + t.mock.method(globalThis, 'fetch', async () => { throw Error('provider unreachable'); }); + const node = new WebRtcTransportNode({ iceServers: [] }); + t.after(() => node.close()); + node.connect(); + await node.signalTail; + assert.equal(sockets.length, 1); + assert.equal(frames.length, 1); + assert.equal(frames[0].payload.kind, 'announce'); + assert.equal(frames[0].from, node.routingPeerId); + assert.match(frames[0].signature, /^[A-Za-z0-9_-]+$/); +}); + +test('explicit local signaling mode cannot open provider sockets or POST, even while fetch exists', async t => { + let sockets = 0, fetches = 0; + const frames = []; + replace(t, 'BroadcastChannel', class { postMessage(frame) { frames.push(frame); } close() {} }); + replace(t, 'WebSocket', class { constructor() { sockets++; } close() {} }); + t.mock.method(globalThis, 'fetch', async () => { fetches++; throw Error('No provider access allowed'); }); + const node = new WebRtcTransportNode({ iceServers: [], publicSignaling: false }); + t.after(() => node.close()); + node.connect(); await node.signalTail; + assert.equal(sockets, 0); assert.equal(fetches, 0); assert.equal(frames.length, 1); + assert.equal(frames[0].payload.kind, 'announce'); +}); diff --git a/tests/browser/README.md b/tests/browser/README.md new file mode 100644 index 0000000..8b32588 --- /dev/null +++ b/tests/browser/README.md @@ -0,0 +1,62 @@ +# Native Chromium qualification + +Run with Node 22+ and Python 3: + +```sh +npm ci --ignore-scripts +npx playwright install --with-deps chromium --only-shell +npm run test:browser +``` + +`@playwright/test` is exactly pinned in the package lock. The browser job in +`.github/workflows/prism.yml` runs once per submitted revision, without retries, +with one worker, a five-minute suite bound and a ten-minute job bound. The test +server binds only loopback. Failures retain an HTML report, screenshots and +traces. `--list` validates discovery without attempting to start a browser. + +These are actual Chromium tests, not the Node synthetic fixtures: + +- The shipped page initializes its actual module graph and model-derived journey + controls. Navigation uses real focus and keyboard activation, preserves inputs + and mesh hash/history, and retains explicit disclosure guards. +- Real origin-local IndexedDB transactions serialize concurrent authority setup. + A nonextractable Ed25519 private CryptoKey survives reload and signs a pointer + that the shipped observer verifies. Reload alone does not pin its public key. +- Actual Web Locks serialize two tabs. Terminating the owner releases the lock + but preserves its unknown publication intent in IndexedDB. This test writes + no provider record and does not claim provider reconciliation evidence. +- Two actual pages use authenticated BroadcastChannel signaling, native host-only + ICE/RTCPeerConnection/SCTP and the shipped ChannelFlow. Large fragmented UTF-8 + payloads are digest-compared after delivery, a real storage fragment receives + its exact custody acknowledgment, and a remote pure-job checkpoint is replayed. + One remote holder remains partial, not fabricated recovery. A separate three-page + trial commits two distinct holders, clears the writer RAM and recovers the exact + object through actual peer fragment requests. These pages are not independent + physical failure domains. Reconnection rejects + an old authenticated incarnation. No fake RTC implementation is installed. +- The actual bundled v86 JavaScript, WASM, BIOS and kernel boot through the shipped + page. A guest shell command produces observed marker and Linux output, which + is retained and reconciled before explicit stop/destroy administration. +- Two actual production VMs use explicit distinct static IPv4 addresses and + exchange real ARP/ICMP over authenticated host-only RTC. Absent network + configuration refuses grants; default-denied ping, bilateral consent, + natural ARP recovery within three bounded probes, reverse ping and receiver + revocation are checked. No neighbor cache is flushed. Serial shell output, + peer identities, bounded frame headers and command outputs are retained. + The ordinary browser job runs this regression against the shipped image; + no candidate substitution or environment opt-in is required. + +All external HTTP and WebSocket destinations are aborted before provider +communication. The RTC test passes `iceServers: []` and `publicSignaling: false`; +this disables public signaling sockets and POSTs by construction, and no public +STUN/TURN is used. +Native DOM, WebCrypto, IndexedDB, Web Locks, BroadcastChannel and RTC APIs are not +replaced. Provider unavailability is intentional and not counted as successful +provider interoperability. No user credentials, paid operations or third-party +writes are used. + +A green run establishes only this Chromium/runner combination and these bounded +scenarios on its exact revision. It does not establish cross-device authority, +NAT traversal, public signaling/relay/DNS availability, provider writes, durable +remote custody, browser compatibility beyond Chromium or complete guest isolation. +Native Prism/Lean gates and vendor redistribution evidence remain independent. diff --git a/tests/browser/authority.spec.mjs b/tests/browser/authority.spec.mjs new file mode 100644 index 0000000..b972675 --- /dev/null +++ b/tests/browser/authority.spec.mjs @@ -0,0 +1,79 @@ +import { test, expect, harness } from './fixtures.mjs'; + +test('real IndexedDB serializes concurrent setup and persists nonextractable Ed25519 signing across reload', async ({ page, context }) => { + const second = await context.newPage(); + await Promise.all([harness(page), harness(second)]); + const database = `stitch-browser-${crypto.randomUUID()}`; + async function setup(target) { + return target.evaluate(async database => { + const { BrowserAuthorityStore } = await import('/src/layer1-uor/browser-authority.js'); + const store = new BrowserAuthorityStore({ database }); + const key = await store.setupAuthority(); + let exported = false; + try { await crypto.subtle.exportKey('pkcs8', key.privateKey); exported = true; } catch {} + return { key: key.publicKey, extractable: key.privateKey.extractable, exported }; + }, database); + } + const [first, other] = await Promise.all([setup(page), setup(second)]); + expect(first).toEqual(other); + expect(first).toEqual({ key: expect.stringMatching(/^[a-f0-9]{64}$/), extractable: false, exported: false }); + await page.reload(); + const result = await page.evaluate(async database => { + const { BrowserAuthorityStore } = await import('/src/layer1-uor/browser-authority.js'); + const { signPointer, PointerObserver } = await import('/src/layer1-uor/pointer.js'); + const authority = await new BrowserAuthorityStore({ database }).restoreAuthority(); + const name = 'browser.example.test', now = Date.now(); + const candidate = await signPointer({ version: 1, name, authorityKey: authority.publicKey, + revision: 0, previousDigest: null, objectRoot: `sha256:${'f'.repeat(64)}`, + validFromMs: now - 1000, validUntilMs: now + 60000 }, authority.privateKey); + const observer = new PointerObserver({ name, trustedAuthorityKey: authority.publicKey, clock: () => now }); + const admitted = await observer.admit(candidate); + return { key: authority.publicKey, digest: admitted.pointerDigest, expected: candidate.pointerDigest }; + }, database); + expect(result.key).toBe(first.key); + expect(result.digest).toBe(result.expected); +}); + +test('real cross-tab Web Lock blocks another owner and tab termination releases only the lock, not unknown intent', async ({ page, context }) => { + const second = await context.newPage(); + await Promise.all([harness(page), harness(second)]); + const database = `stitch-lock-${crypto.randomUUID()}`, scope = 'browser-scope'; + await page.evaluate(async ({ database, scope }) => { + const { BrowserAuthorityStore } = await import('/src/layer1-uor/browser-authority.js'); + const store = new BrowserAuthorityStore({ database }); + window.lockHeld = false; + window.owner = store.exclusivePublication(scope, async () => { + const candidate = { pointerDigest: 'sha256:' + 'a'.repeat(64) }; + await store.claimPublication(scope, { outcome: 'unknown', candidate, pointerDigest: candidate.pointerDigest }); + window.lockHeld = true; + await new Promise(() => {}); + }); + }, { database, scope }); + await expect.poll(() => page.evaluate(() => window.lockHeld)).toBe(true); + await second.evaluate(async ({ database, scope }) => { + const { BrowserAuthorityStore } = await import('/src/layer1-uor/browser-authority.js'); + const store = new BrowserAuthorityStore({ database }); + window.secondAcquired = false; + window.waiter = store.exclusivePublication(scope, async () => { + window.retained = await store.readPublication(scope); + window.secondAcquired = true; + }); + }, { database, scope }); + const lockNames = { authority: `stitch-authority:${database}`, publication: `stitch-dns:${database}:${scope}` }; + await expect.poll(() => second.evaluate(async names => { + const state = await navigator.locks.query(); + // Publication first owns the lifecycle lock, preventing rotation/revocation + // during dispatch. The waiter must stop there, before requesting its DNS lock. + return { + authorityHeld: state.held.filter(x => x.name === names.authority).length, + authorityPending: state.pending.filter(x => x.name === names.authority).length, + publicationHeld: state.held.filter(x => x.name === names.publication).length, + publicationPending: state.pending.filter(x => x.name === names.publication).length, + }; + }, lockNames)).toEqual({ authorityHeld: 1, authorityPending: 1, publicationHeld: 1, publicationPending: 0 }); + expect(await second.evaluate(() => window.secondAcquired)).toBe(false); + await page.close(); + await expect.poll(() => second.evaluate(() => window.secondAcquired)).toBe(true); + expect(await second.evaluate(() => window.retained.outcome)).toBe('unknown'); + expect(await second.evaluate(() => window.retained.candidate.pointerDigest)).toBe(`sha256:${'a'.repeat(64)}`); +}); diff --git a/tests/browser/fixtures.mjs b/tests/browser/fixtures.mjs new file mode 100644 index 0000000..9a6d5d8 --- /dev/null +++ b/tests/browser/fixtures.mjs @@ -0,0 +1,31 @@ +import { test as base, expect } from '@playwright/test'; + +// Prevent test bytes or credentials from ever reaching an external provider. +// Aborted provider traffic is NOT counted as provider interoperability evidence. +export const test = base.extend({ + context: async ({ context }, use) => { + await context.route('**/*', route => { + const url = new URL(route.request().url()); + return url.origin === 'http://127.0.0.1:8080' ? route.continue() : route.abort('blockedbyclient'); + }); + await context.routeWebSocket('**/*', socket => socket.close()); + await use(context); + }, + page: async ({ page }, use) => { + const failures = []; + page.on('pageerror', error => failures.push(error.message)); + await use(page); + expect(failures, 'uncaught browser JavaScript errors').toEqual([]); + }, +}); +export { expect }; + +export async function harness(page) { + await page.goto('/tests/browser/harness.html'); + return page; +} + +export async function selectJourney(page, name) { + await page.locator(`#operatorJourneyNav button[aria-controls="${name}Panel"]`).click(); + await expect(page.locator(`#${name}Panel`)).toBeVisible(); +} diff --git a/tests/browser/harness.html b/tests/browser/harness.html new file mode 100644 index 0000000..cbd8bcf --- /dev/null +++ b/tests/browser/harness.html @@ -0,0 +1,7 @@ + + + +Stitch native host qualification harness + +

Native browser qualification for the shipped Stitch runtime.

+ diff --git a/tests/browser/mesh.spec.mjs b/tests/browser/mesh.spec.mjs new file mode 100644 index 0000000..72ae555 --- /dev/null +++ b/tests/browser/mesh.spec.mjs @@ -0,0 +1,311 @@ +import { test, expect, harness } from './fixtures.mjs'; + +async function startNode(page, channelKey, label) { + await harness(page); + await page.evaluate(async ({ channelKey, label }) => { + const { WebRtcTransportNode } = await import('/src/layer5-transport/index.js'); + const { LiveUorMeshDatabase } = await import('/src/layer3-storage/index.js'); + const { LiveDistributedComputeCoordinator } = await import('/src/layer4-compute/index.js'); + const events = [], errors = []; + const transport = new WebRtcTransportNode({ peerId: label, channelKey, iceServers: [], publicSignaling: false, heartbeatIntervalMs: 250, + publicRelayConsent: () => false, + onEvent: event => { + events.push(event); + if (event.type === 'mesh_message') { + const work = event.msg.type === 'compute_ckpt' ? compute.handleMeshMessage(event.from, event.msg) + : event.msg.type.startsWith('uor_') ? db.handleMeshMessage(event.from, event.msg) : null; + work?.catch(error => errors.push(error.code || error.message)); + } + } }); + const db = new LiveUorMeshDatabase({ transport }); + const compute = new LiveDistributedComputeCoordinator({ transport, liveDb: db, allowPublicRelay: false }); + window.stitch = { transport, db, compute, events, errors }; + transport.connect(); + }, { channelKey, label }); +} + +async function attachHostDiagnostics(pages, testInfo) { + const snapshots = []; + for (const [index, page] of pages.entries()) { + if (page.isClosed()) { snapshots.push({ page: index, closed: true }); continue; } + try { + snapshots.push(await page.evaluate(index => { + const state = window.stitch; + if (!state) return { page: index, initialized: false }; + const { transport, events, errors } = state; + return { + page: index, routingPeerId: transport.routingPeerId, generation: transport.generation, + closed: transport.closed, bytesSent: transport.bytesSent, bytesReceived: transport.bytesReceived, + peers: [...transport.peers].map(([remoteId, peer]) => ({ + remoteId, connection: peer.pc.connectionState, signaling: peer.pc.signalingState, + ice: peer.pc.iceConnectionState, flow: peer.flow?.state, + channel: peer.dc && { id: peer.dc.id, state: peer.dc.readyState, protocol: peer.dc.protocol, + buffered: peer.dc.bufferedAmount, label: peer.dc.label }, + })), + events: events.slice(-32).map(({ type, code, reason, outcome, remoteId, from, frames, bytes }) => + ({ type, code, reason, outcome, remoteId, from, frames, bytes })), + errors: errors.slice(-32), + }; + }, index)); + } catch (error) { snapshots.push({ page: index, diagnosticError: error.message }); } + } + await testInfo.attach('mesh-host-diagnostics', { body: Buffer.from(JSON.stringify(snapshots, null, 2)), contentType: 'application/json' }); +} + +async function connected(page, count = 1) { + await expect.poll(() => page.evaluate(() => window.stitch.transport.openPeers().length), { timeout: 20_000 }).toBe(count); +} + +test('native authenticated local RTC carries fragmented bytes, custody receipts and replayed checkpoints; reconnect fences old sessions', async ({ page, context }, testInfo) => { + test.setTimeout(60_000); + const other = await context.newPage(); + const channel = `browser-${crypto.randomUUID()}`; + await startNode(page, channel, 'browser-a'); + await startNode(other, channel, 'browser-b'); + try { + await Promise.all([connected(page), connected(other)]); + const identities = await Promise.all([page, other].map(target => target.evaluate(() => { + const t = window.stitch.transport, peer = t.openPeers()[0]; + return { own: t.routingPeerId, remote: peer.remoteId, authenticated: t.signaling.peers.has(peer.remoteId), + ordered: peer.dc.ordered, protocol: peer.dc.protocol, iceServers: peer.pc.getConfiguration().iceServers }; + }))); + expect(identities[0].own).toBe(identities[1].remote); + expect(identities[1].own).toBe(identities[0].remote); + for (const identity of identities) { + expect(identity.own).toMatch(/^key-/); + expect(identity.authenticated).toBe(true); + expect(identity.ordered).toBe(true); + expect(identity.protocol).toBe('stitch.channel/1'); + expect(identity.iceServers).toEqual([]); + } + + // Larger than the negotiated/default 64KiB application frame bound. Native + // SCTP must carry all frames; equality is checked after real host delivery. + const sentDigest = await page.evaluate(async () => { + const value = 'é😀'.repeat(40_000); + const bytes = new TextEncoder().encode(value); + const digest = Array.from(new Uint8Array(await crypto.subtle.digest('SHA-256', bytes)), x => x.toString(16).padStart(2, '0')).join(''); + const t = window.stitch.transport; + if (!t.sendToPeer(t.openPeers()[0].remoteId, { type: 'browser_probe', value })) throw Error('Native channel refused the probe'); + return { digest, length: bytes.length }; + }); + await expect.poll(() => other.evaluate(() => window.stitch.events.filter(x => x.type === 'mesh_message' && x.msg.type === 'browser_probe').length)).toBe(1); + const received = await other.evaluate(async () => { + const packet = window.stitch.events.find(x => x.type === 'mesh_message' && x.msg.type === 'browser_probe'); + const bytes = new TextEncoder().encode(packet.msg.value); + return { digest: Array.from(new Uint8Array(await crypto.subtle.digest('SHA-256', bytes)), x => x.toString(16).padStart(2, '0')).join(''), length: bytes.length }; + }); + expect(received).toEqual(sentDigest); + expect(await page.evaluate(() => window.stitch.events.some(x => x.type === 'channel_send_result' && x.outcome === 'submitted' && x.frames > 1))).toBe(true); + + const address = await page.evaluate(async () => (await window.stitch.db.put('native-browser-custody-é😀', { label: 'native.txt' })).addressHex); + await expect.poll(() => page.evaluate(address => window.stitch.db.objects.get(address).placementStatus.committedFragments, address)).toBe(1); + const partial = await other.evaluate(address => { + const { db, transport } = window.stitch, object = db.objects.get(address); + return { fragments: object.shards.filter(Boolean).length, held: [...object.heldIndices], + verified: object.verified, readable: db.get(address).ok, source: object.source, + sender: transport.openPeers()[0].remoteId }; + }, address); + expect(partial.fragments).toBe(1); + expect(partial.held).toEqual([0]); + expect(partial.verified).toBe(false); + expect(partial.readable).toBe(false); + expect(partial.source).toBe(`webrtc:${partial.sender}`); + const status = await page.evaluate(address => window.stitch.db.objects.get(address).placementStatus, address); + expect(status.canRecoverFromCommitted).toBe(false); + expect(status.distinctHolders).toBe(1); + + const jobId = `browser-job-${crypto.randomUUID()}`; + const local = await page.evaluate(async jobId => { + const job = await window.stitch.compute.startOrResumeJob({ jobId, totalSteps: 3, stepDelayMs: 100 }); + return { value: job.currentValueHex, step: job.stepIndex }; + }, jobId); + await expect.poll(() => other.evaluate(jobId => window.stitch.compute.jobs.get(jobId)?.status, jobId)).toBe('completed'); + expect(await other.evaluate(jobId => { + const job = window.stitch.compute.jobs.get(jobId); + return { value: job.currentValueHex, step: job.stepIndex, verification: job.verification, source: job.sourceTag }; + }, jobId)).toEqual({ ...local, verification: 'replayed', source: `webrtc:${identities[0].own}` }); + + // Keep an authentic old envelope. A new local incarnation must reject it, + // even when the same peer display label and channel name are reused. + const stale = await page.evaluate(() => window.stitch.transport.signaling.sign({ kind: 'ice', to: window.stitch.transport.openPeers()[0].remoteId, candidate: { candidate: 'old-incarnation' } })); + await page.evaluate(() => window.stitch.transport.close()); + await other.evaluate(() => window.stitch.transport.close()); + expect(await page.evaluate(() => ({ peers: window.stitch.transport.peers.size, sent: window.stitch.transport.broadcast({ type: 'after_close' }) }))).toEqual({ peers: 0, sent: 0 }); + await other.evaluate(() => window.stitch.transport.connect()); + await page.evaluate(() => window.stitch.transport.connect()); + await Promise.all([connected(page), connected(other)]); + expect(await other.evaluate(stale => window.stitch.transport.signaling.receive(stale), stale)).toBeNull(); + const newId = await page.evaluate(() => window.stitch.transport.routingPeerId); + expect(newId).not.toBe(identities[0].own); + for (const target of [page, other]) { + expect(await target.evaluate(() => window.stitch.errors)).toEqual([]); + expect(await target.evaluate(() => window.stitch.events.filter(x => x.type === 'signal_error'))).toEqual([]); + } + } catch (error) { + await attachHostDiagnostics([page, other], testInfo).catch(() => {}); + throw error; + } finally { + for (const target of [page, other]) if (!target.isClosed()) await target.evaluate(() => window.stitch?.transport.close()); + } +}); + + +test('native two-holder custody restores exact object bytes after writer RAM is cleared', async ({ page, context }, testInfo) => { + test.setTimeout(50_000); + const holders = [await context.newPage(), await context.newPage()]; + const pages = [page, ...holders], channel = `recovery-${crypto.randomUUID()}`; + try { + for (const [index, target] of pages.entries()) await startNode(target, channel, `recovery-${index}`); + await Promise.all(pages.map(target => connected(target, 2))); + const payload = `native-two-holder-recovery-${crypto.randomUUID()}-` + 'é😀'.repeat(1000); + const address = await page.evaluate(async payload => (await window.stitch.db.put(payload, { label: 'recoverable.txt' })).addressHex, payload); + await expect.poll(() => page.evaluate(address => window.stitch.db.objects.get(address).placementStatus.committedFragments, address)).toBe(2); + expect(await page.evaluate(address => window.stitch.db.objects.get(address).placementStatus.canRecoverFromCommitted, address)).toBe(true); + const remoteFragments = await Promise.all(holders.map(target => target.evaluate(address => { + const object = window.stitch.db.objects.get(address); + return { held: [...object.heldIndices], verified: object.verified }; + }, address))); + expect(remoteFragments.flatMap(value => value.held).sort()).toEqual([0, 1]); + expect(remoteFragments.every(value => value.verified === false)).toBe(true); + + await page.evaluate(async () => { + await window.stitch.db.clearLocal(); + if (window.stitch.db.objects.size !== 0) throw Error('Local wipe did not clear writer objects'); + await window.stitch.db.syncFromNetwork('30m', { publicData: false }); + }); + await expect.poll(() => page.evaluate(address => window.stitch.db.get(address).ok, address)).toBe(true); + expect(await page.evaluate(address => { + const recovered = window.stitch.db.get(address); + return { text: recovered.text, address: recovered.entry.addressHex, source: recovered.entry.source }; + }, address)).toEqual({ text: payload, address, source: expect.stringMatching(/^webrtc:key-/) }); + for (const target of pages) expect(await target.evaluate(() => window.stitch.errors)).toEqual([]); + } catch (error) { + await attachHostDiagnostics(pages, testInfo).catch(() => {}); + throw error; + } finally { + for (const target of pages) if (!target.isClosed()) await target.evaluate(() => window.stitch?.transport.close()); + } +}); + +test('native compute retains a reachable authenticated owner and resumes its checkpoint only after owner tab closes', async ({ page, context }, testInfo) => { + test.setTimeout(60_000); + const receiver = await context.newPage(), pages = [page, receiver]; + const channel = `compute-owner-${crypto.randomUUID()}`, jobId = `failover-${crypto.randomUUID()}`; + try { + await startNode(page, channel, 'compute-owner-label'); + await startNode(receiver, channel, 'compute-receiver-label'); + await Promise.all(pages.map(target => connected(target))); + const owner = await page.evaluate(jobId => { + const { transport, compute, errors } = window.stitch; + // Six ADD3 steps from2 have the independent expected final value20 (0x14). + // The bounded inter-step delay leaves a genuine unfinished owner task, + // without pausing, replacing or mocking any coordinator/transport method. + const program = { version: 1, bits: 64, initialValueHex: '0x2', + instructions: Array.from({ length: 6 }, () => ({ op: 4, argHex: '0x3' })) }; + window.stitch.ownerWork = compute.startOrResumeJob({ jobId, program, stepDelayMs: 5000 }) + .catch(error => errors.push(error.code || error.message)); + return { key: transport.routingPeerId, label: transport.peerId }; + }, jobId); + expect(owner.key).toMatch(/^key-/); + expect(owner.key).not.toBe(owner.label); + await expect.poll(() => receiver.evaluate(jobId => { + const job = window.stitch.compute.jobs.get(jobId); + return !!job && job.status === 'running' && job.verification === 'replayed' && job.stepIndex > 0; + }, jobId)).toBe(true); + const reachable = await receiver.evaluate(async jobId => { + const { transport, compute } = window.stitch; + const resumed = await compute.syncAndTakeOverJobs(); + const job = compute.jobs.get(jobId); + return { resumed, runningLocally: compute.running.has(jobId), status: job.status, + owner: job.ownerPeerId, step: job.stepIndex, value: job.currentValueHex, + reachable: transport.openPeers().some(peer => peer.remoteId === job.ownerPeerId), source: job.sourceTag }; + }, jobId); + expect(reachable).toEqual({ resumed: [], runningLocally: false, status: 'running', owner: owner.key, + step: expect.any(Number), value: expect.any(String), reachable: true, source: `webrtc:${owner.key}` }); + expect(reachable.step).toBeLessThan(6); + expect(reachable.value).toBe(`0x${(2 + 3 * reachable.step).toString(16)}`); + + // Closing the actual page destroys its native RTC connection and owner task. + await page.close(); + await expect.poll(() => receiver.evaluate(ownerKey => { + const { transport, events } = window.stitch; + return transport.openPeers().length === 0 && transport.peers.size === 0 && events.some(event => + ['channel_close', 'peer_disconnected'].includes(event.type) && event.remoteId === ownerKey); + }, owner.key), { timeout: 20_000 }).toBe(true); + const result = await receiver.evaluate(async jobId => { + const { transport, compute, db } = window.stitch; + const retained = compute.jobs.get(jobId), step = retained.stepIndex, digest = retained.checkpoint.checkpointDigest; + const updates = []; + compute.onJobUpdate = job => { + if (job.jobId === jobId && job.sourceTag.startsWith('local:')) updates.push({ + step: job.stepIndex, previous: job.checkpoint.previousDigest, owner: job.ownerPeerId }); + }; + const resumed = await compute.syncAndTakeOverJobs(); + await compute.running.get(jobId); + const job = compute.jobs.get(jobId), stored = db.get(job.resultAddressHex); + return { resumed, retainedStep: step, retainedDigest: digest, updates, + receiverKey: transport.routingPeerId, owner: job.ownerPeerId, status: job.status, + verification: job.verification, step: job.stepIndex, value: job.currentValueHex, + stored: stored.ok && stored.entry.verified, result: stored.ok ? JSON.parse(stored.text) : null }; + }, jobId); + expect(result.retainedStep).toBeGreaterThan(0); + expect(result.retainedStep).toBeLessThan(6); + expect(result.resumed).toEqual([jobId]); + expect(result.receiverKey).toMatch(/^key-/); + expect(result.owner).toBe(result.receiverKey); + expect(result.owner).not.toBe(owner.key); + expect(result.updates[0]).toEqual({ step: result.retainedStep + 1, previous: result.retainedDigest, owner: result.receiverKey }); + expect(result).toMatchObject({ status: 'completed', verification: 'replayed', step: 6, value: '0x14', stored: true }); + expect(result.result.jobId).toBe(jobId); + expect(result.result.checkpoint).toMatchObject({ stepIndex: 6, stateHex: '0x14' }); + expect(await receiver.evaluate(() => window.stitch.errors)).toEqual([]); + } catch (error) { + await attachHostDiagnostics(pages, testInfo).catch(() => {}); + throw error; + } finally { + for (const target of pages) if (!target.isClosed()) await target.evaluate(() => window.stitch?.transport.close()); + } +}); + +test('native pre-join store repairs three distinct holders, replaces a departed holder and recovers after writer wipe', async ({ page, context }, testInfo) => { + test.setTimeout(90_000); + const channel = `placement-repair-${crypto.randomUUID()}`, pages = [page]; + try { + await startNode(page, channel, 'repair-writer'); + const payload = `retained-before-peers-${crypto.randomUUID()}-é😀`; + const address = await page.evaluate(async payload => (await window.stitch.db.put(payload)).addressHex, payload); + expect(await page.evaluate(address => window.stitch.db.placementSummary(address).committedFragments, address)).toBe(0); + const holders = []; + for (let i = 0; i < 3; i++) { + const holder = await context.newPage(); pages.push(holder); holders.push(holder); + await startNode(holder, channel, `repair-holder-${i}`); + } + await Promise.all(pages.map(target => connected(target, 3))); + await page.evaluate(address => window.stitch.db.repairPlacement(address), address); + await expect.poll(() => page.evaluate(address => window.stitch.db.placementSummary(address).committedFragments, address)).toBe(3); + const departedId = await holders[0].evaluate(() => window.stitch.transport.routingPeerId); + await holders[0].evaluate(() => window.stitch.transport.close()); + await connected(page, 2); + expect(await page.evaluate(address => window.stitch.db.placementSummary(address).committedFragments, address)).toBe(2); + const replacement = await context.newPage(); pages.push(replacement); + await startNode(replacement, channel, 'repair-replacement'); + await connected(page, 3); + await page.evaluate(address => window.stitch.db.repairPlacement(address), address); + await expect.poll(() => page.evaluate(address => window.stitch.db.placementSummary(address).committedFragments, address)).toBe(3); + expect(await page.evaluate(({ address, departedId }) => { + const { db } = window.stitch; + return { copies: db.placementSummary(address).assertedCopies, + departed: db.placements.get(address).copies.find(c => c.holder === departedId)?.status }; + }, { address, departedId })).toEqual({ copies: 4, departed: 'superseded' }); + await page.evaluate(async () => { await window.stitch.db.clearLocal(); await window.stitch.db.syncFromNetwork(); }); + await expect.poll(() => page.evaluate(address => window.stitch.db.get(address).ok, address)).toBe(true); + expect(await page.evaluate(address => window.stitch.db.get(address).text, address)).toBe(payload); + for (const target of pages) expect(await target.evaluate(() => window.stitch.errors)).toEqual([]); + } catch (error) { + await attachHostDiagnostics(pages, testInfo).catch(() => {}); + throw error; + } finally { + for (const target of pages) if (!target.isClosed()) await target.evaluate(() => window.stitch?.transport.close()); + } +}); diff --git a/tests/browser/playwright.config.mjs b/tests/browser/playwright.config.mjs new file mode 100644 index 0000000..1432fdb --- /dev/null +++ b/tests/browser/playwright.config.mjs @@ -0,0 +1,32 @@ +import { defineConfig, devices } from '@playwright/test'; + +export default defineConfig({ + testDir: '.', + testMatch: '*.spec.mjs', + fullyParallel: false, + workers: 1, + retries: 0, + forbidOnly: !!process.env.CI, + timeout: 30_000, + globalTimeout: 300_000, + expect: { timeout: 10_000 }, + reporter: [['list'], ['html', { outputFolder: new URL('../../verification-output/browser/report', import.meta.url).pathname, open: 'never' }]], + outputDir: new URL('../../verification-output/browser/results', import.meta.url).pathname, + use: { + ...devices['Desktop Chrome'], + baseURL: 'http://127.0.0.1:8080', + serviceWorkers: 'block', + actionTimeout: 10_000, + navigationTimeout: 15_000, + trace: 'retain-on-failure', + screenshot: 'only-on-failure', + }, + projects: [{ name: 'chromium', use: { browserName: 'chromium' } }], + webServer: { + command: 'python3 -m http.server 8080 --bind 127.0.0.1', + url: 'http://127.0.0.1:8080/tests/browser/harness.html', + cwd: new URL('../..', import.meta.url).pathname, + reuseExistingServer: false, + timeout: 15_000, + }, +}); diff --git a/tests/browser/product.spec.mjs b/tests/browser/product.spec.mjs new file mode 100644 index 0000000..00df99c --- /dev/null +++ b/tests/browser/product.spec.mjs @@ -0,0 +1,63 @@ +import { test, expect, selectJourney } from './fixtures.mjs'; + +test('shipped UI navigation preserves inputs, mesh hash and explicit disclosure guards', async ({ page }) => { + await page.goto('/#browser-qualification'); + const nav = page.locator('#operatorJourneyNav button'); + await expect(nav).toHaveCount(6); + await expect(page.locator('#meshPanel')).toBeVisible(); + await expect(page.locator('#reconnectBtn')).toBeDisabled(); + await expect(page.locator('#allowMeshSignalingInput')).not.toBeChecked(); + await expect(page.locator('#allowPublicRelayInput')).not.toBeChecked(); + await page.locator('#allowMeshSignalingInput').check(); + await expect(page.locator('#reconnectBtn')).toBeEnabled(); + // Consent alone never joins. No click of Join and no public traffic is allowed. + await expect(page.locator('#peerCountLabel')).toHaveText('0'); + await page.locator('#allowMeshSignalingInput').uncheck(); + await expect(page.locator('#reconnectBtn')).toBeDisabled(); + + const before = await page.evaluate(() => ({ hash: location.hash, history: history.length })); + for (const name of ['objects', 'compute', 'vm', 'pointers', 'resources', 'mesh']) { + await selectJourney(page, name); + await expect(page.locator(`#${name}Panel`)).toBeFocused(); + await expect(page.locator('#operatorJourneyNav [aria-current="location"]')).toHaveCount(1); + await expect(page.locator(`#${name}Evidence`)).not.toHaveText(''); + await expect(page.locator('section[id$="Panel"]:visible')).toHaveCount(1); + } + expect(await page.evaluate(() => ({ hash: location.hash, history: history.length }))).toEqual(before); + + await selectJourney(page, 'objects'); + await page.locator('#dbLabelInput').fill('retained-label.txt'); + await selectJourney(page, 'compute'); + await page.locator('#jobStepsInput').fill('3'); + await selectJourney(page, 'objects'); + await expect(page.locator('#dbLabelInput')).toHaveValue('retained-label.txt'); + await selectJourney(page, 'compute'); + await expect(page.locator('#jobStepsInput')).toHaveValue('3'); + // Keyboard navigation uses actual native button focus/activation. + await page.locator('#operatorJourneyNav button[aria-controls="vmPanel"]').focus(); + await page.keyboard.press('Enter'); + await expect(page.locator('#vmPanel')).toBeFocused(); + await expect(page.locator('#runVmCmdBtn')).toBeDisabled(); +}); + +test('saved UI authority survives reload without silently pinning or replacing a key', async ({ page }) => { + await page.goto('/'); + await selectJourney(page, 'pointers'); + await expect(page.locator('#authorityStorageStatus')).toContainText('No saved signing key'); + await page.locator('#authorityLifecyclePanel > summary').click(); + await page.locator('#saveAuthorityBtn').click(); + await expect(page.locator('#authorityStorageStatus')).toContainText('Saved'); + const key = await page.evaluate(async () => { + const { BrowserAuthorityStore } = await import('/src/layer1-uor/browser-authority.js'); + return (await new BrowserAuthorityStore().restoreAuthority()).publicKey; + }); + expect(key).toMatch(/^[a-f0-9]{64}$/); + await page.reload(); + await selectJourney(page, 'pointers'); + await expect(page.locator('#authorityStorageStatus')).toContainText('Saved signing key restored'); + await expect(page.locator('#pointerAuthorityInput')).toHaveValue(''); + expect(await page.evaluate(async () => { + const { BrowserAuthorityStore } = await import('/src/layer1-uor/browser-authority.js'); + return (await new BrowserAuthorityStore().restoreAuthority()).publicKey; + })).toBe(key); +}); diff --git a/tests/browser/site.spec.mjs b/tests/browser/site.spec.mjs new file mode 100644 index 0000000..6764fb0 --- /dev/null +++ b/tests/browser/site.spec.mjs @@ -0,0 +1,99 @@ +import { test, expect } from './fixtures.mjs'; +import { mkdirSync } from 'node:fs'; +const screenshots = new URL('../../verification-output/browser/reader/', import.meta.url).pathname; + +async function expectResult(page, state) { + await expect(page.locator('#exampleResult')).toHaveAttribute('data-state', state); +} + +test('reader explorer recovers, withholds and refuses exact bytes without joining the network', async ({ page }) => { + await page.setViewportSize({ width: 1440, height: 1000 }); + await page.goto('/#reader-test-mesh'); + await expectResult(page, 'recovered'); + await expect(page.locator('#recoveredText')).toHaveText('Keep the bytes. Change the peers.'); + const before = await page.evaluate(() => ({ hash: location.hash, history: history.length })); + await page.getByRole('button', { name: 'Try losing a fragment ↓' }).click(); + await expect(page.locator('#protocolExplorer')).toBeFocused(); + await page.locator('#presetone').click(); await expectResult(page, 'recovered'); + await expect(page.locator('#recoveryCount')).toHaveText('2 / 3'); + await page.locator('#presettwo').click(); await expectResult(page, 'insufficient'); + await expect(page.locator('#recoveredText')).toHaveText('No recovered output accepted.'); + await page.locator('#presettamper').click(); await expectResult(page, 'refused'); + await expect(page.locator('#exampleResultDetail')).toContainText('FragmentDigestMismatch'); + await page.locator('#available0').uncheck(); await expectResult(page, 'recovered'); + await page.locator('#presetcomplete').click(); await expectResult(page, 'recovered'); + await page.locator('#exampleInput').fill('Updated object 🧵'); + await page.locator('#encodeExample').click(); await expectResult(page, 'recovered'); + await expect(page.locator('#recoveredText')).toHaveText('Updated object 🧵'); + await page.locator('#exampleInput').fill('🧵'.repeat(65)); + await page.locator('#encodeExample').click(); + await expect(page.locator('#exampleInputStatus')).toContainText('at most 256 UTF-8 bytes'); + await expect(page.locator('#exampleControls')).toBeHidden(); + await page.locator('#exampleInput').fill(''); + await page.locator('#encodeExample').click(); await expectResult(page, 'recovered'); + await expect(page.locator('#recoveredText')).toHaveText('(empty object)'); + for (const id of ['corrupt0', 'corrupt1', 'corrupt2']) await expect(page.locator(`#${id}`)).toBeDisabled(); + await page.getByRole('button', { name: 'Open console ↗' }).click(); + await expect(page.locator('#operatorConsole')).toBeFocused(); + expect(await page.evaluate(() => ({ hash: location.hash, history: history.length }))).toEqual(before); + await expect(page.locator('#allowMeshSignalingInput')).not.toBeChecked(); + await expect(page.locator('#allowPublicRelayInput')).not.toBeChecked(); + await expect(page.locator('#peerCountLabel')).toHaveText('0'); +}); + +test('interrupted encoding and repeated scenarios cannot publish stale results or strand busy state', async ({ page }) => { + await page.goto('/'); await expectResult(page, 'recovered'); + await page.evaluate(() => { + const original = crypto.subtle.digest.bind(crypto.subtle); + let hold = true; + crypto.subtle.digest = async (...args) => { + if (hold) { hold = false; await new Promise(resolve => { window.releaseExampleDigest = resolve; }); } + return original(...args); + }; + }); + await page.locator('#exampleInput').fill('First in flight'); + await page.locator('#encodeExample').click(); + await expect(page.locator('#exampleControls')).toBeHidden(); + await expect(page.locator('#encodeExample')).toBeDisabled(); + // Synthetic events also exercise busy guards; users cannot click hidden controls. + await page.evaluate(() => document.getElementById('presettamper').click()); + await page.locator('#exampleInput').fill('The latest input'); + await page.evaluate(() => document.getElementById('exampleForm').dispatchEvent(new Event('submit', { cancelable: true }))); + await expectResult(page, 'recovered'); + await expect(page.locator('#recoveredText')).toHaveText('The latest input'); + await page.evaluate(() => window.releaseExampleDigest()); + await expect(page.locator('#encodeExample')).toBeEnabled(); + await expect(page.locator('#exampleInputStatus')).not.toContainText('Encoding'); + await expect(page.locator('#recoveredText')).toHaveText('The latest input'); + await page.evaluate(() => { + for (let i = 0; i < 5; i++) { + document.getElementById('presettamper').click(); + document.getElementById('presettwo').click(); + document.getElementById('presetone').click(); + } + }); + await expectResult(page, 'recovered'); + await expect(page.locator('#recoveryCount')).toHaveText('2 / 3'); +}); + +for (const viewport of [{ name: 'desktop', width: 1440, height: 1000 }, { name: 'mobile', width: 390, height: 844 }]) { + test(`reader layout stays within ${viewport.name} viewport and supplies accessible navigation`, async ({ page }) => { + await page.setViewportSize({ width: viewport.width, height: viewport.height }); + await page.goto('/'); await expectResult(page, 'recovered'); + await expect(page.locator('.facet-card')).not.toHaveCount(0); + expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true); + mkdirSync(screenshots, { recursive: true }); + await page.screenshot({ path: `${screenshots}${viewport.name}-hero.png` }); + await page.locator('#exampleForm').scrollIntoViewIfNeeded(); + await page.locator('.example-box').screenshot({ path: `${screenshots}${viewport.name}-explorer.png` }); + await page.getByRole('button', { name: 'How Stitch works' }).focus(); + await page.keyboard.press('Enter'); + await expect(page.locator('#protocolMap')).toBeFocused(); + await page.getByRole('button', { name: 'Open console ↗' }).click(); + await page.locator('#operatorJourneyNav button[aria-controls="objectsPanel"]').click(); + await page.locator('#dbPutBtn').click(); + await expect(page.locator('#liveDbBody')).toContainText('sha256:'); + expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true); + await expect(page.locator('#allowMeshSignalingInput')).not.toBeChecked(); + }); +} diff --git a/tests/browser/vm-peer.spec.mjs b/tests/browser/vm-peer.spec.mjs new file mode 100644 index 0000000..b34e723 --- /dev/null +++ b/tests/browser/vm-peer.spec.mjs @@ -0,0 +1,116 @@ +import { test, expect, harness } from './fixtures.mjs'; + +test('production VMs exchange real Ethernet over native RTC only with bilateral grants', async ({ page, context }, testInfo) => { + test.setTimeout(200_000); + const other = await context.newPage(); + const pages = [page, other], channelKey = `guest-${crypto.randomUUID()}`; + try { + await Promise.all(pages.map(async (target, index) => { + await harness(target); + await target.evaluate(() => { const base = document.createElement('base'); base.href = '/'; document.head.append(base); }); + await target.addScriptTag({ url: '/v86/libv86.js' }); + await target.evaluate(async ({ channelKey, index }) => { + const { LinuxVmNode } = await import('/src/layer4-compute/index.js'); + const { WebRtcTransportNode } = await import('/src/layer5-transport/index.js'); + const screen = document.createElement('div'); + screen.innerHTML = '
'; + document.body.append(screen); + const offline = new LinuxVmNode({ screenContainer: screen }); + if (offline.networkConfiguration !== null || offline.ipAddress !== null) throw Error('Absent network must remain unconfigured'); + let refused = false; + try { offline.setEthernetSharing(true); } catch (error) { refused = error.code === 'vm-network-required'; } + if (!refused || offline.ethernetSharing) throw Error('Absent network must refuse Ethernet sharing'); + const state = window.guest = { statuses: [], serial: '', frames: 0, packets: [], commands: [], events: [] }; + const transport = state.transport = new WebRtcTransportNode({ peerId: `vm-peer-${index}`, channelKey, + iceServers: [], publicSignaling: false, publicRelayConsent: () => false, + onEvent: event => { + if (['policy_refused', 'channel_open', 'channel_send_result'].includes(event.type)) state.events.push(event); + if (event.type === 'mesh_message' && event.msg.type === 'eth_frame') { + state.frames++; + state.packets.push({ direction: 'received', from: event.from, advertisedFrom: event.msg.from, length: event.msg.frame.length, header: event.msg.frame.slice(0, 42) }); + state.vm.handleIncomingEthFrame(event.msg.frame); + } + } }); + const vm = state.vm = new LinuxVmNode({ transport, screenContainer: screen, vmRuntimeMs: 180_000, + network: { address: `10.42.0.${index + 2}`, prefixLength: 24 }, + onStatus: status => state.statuses.push(status) }); + transport.connect(); + vm.boot(); + vm.v86.add_listener('net0-send', bytes => state.packets.push({ direction: 'guest-send', length: bytes.length, header: Array.from(bytes.slice(0, 42)), granted: vm.ethernetSharing })); + vm.v86.add_listener('serial0-output-byte', byte => { state.serial = (state.serial + String.fromCharCode(byte)).slice(-65536); }); + }, { channelKey, index }); + await expect.poll(() => target.evaluate(() => window.guest.vm.booted), { timeout: 75_000 }).toBe(true); + await expect.poll(() => target.evaluate(() => window.guest.transport.openPeers().length), { timeout: 20_000 }).toBe(1); + })); + const addresses = await Promise.all(pages.map(p => p.evaluate(() => window.guest.vm.ipAddress))); + expect(addresses).toEqual(['10.42.0.2', '10.42.0.3']); + const identities = await Promise.all(pages.map(target => target.evaluate(() => { + const transport = window.guest.transport, peer = transport.openPeers()[0]; + return { own: transport.routingPeerId, remote: peer.remoteId, + authenticated: transport.signaling.peers.has(peer.remoteId), + iceServers: peer.pc.getConfiguration().iceServers, protocol: peer.dc.protocol }; + }))); + expect(identities[0].own).toBe(identities[1].remote); + expect(identities[1].own).toBe(identities[0].remote); + for (const identity of identities) { + expect(identity.own).toMatch(/^key-/); + expect(identity.authenticated).toBe(true); + expect(identity.iceServers).toEqual([]); + expect(identity.protocol).toBe('stitch.channel/1'); + } + const command = async (target, text) => target.evaluate(async text => { + const output = new TextDecoder().decode(await window.guest.vm.executeShellCommand(text, 20_000)); + window.guest.commands.push({ text, output }); return output; + }, text); + // The boot nonce already read host input and wrote back over 9p. Also inspect + // both real consoles and kernel identity instead of inferring them from boot. + expect(await command(page, 'uname -r; printf stderr_probe >&2')).toContain('6.18.7'); + await page.evaluate(() => window.guest.vm.v86.serial0_send("printf 'SERIAL_%s\\n' QUALIFIED\n")); + await expect.poll(() => page.evaluate(() => window.guest.serial.includes('SERIAL_QUALIFIED'))).toBe(true); + expect(await command(page, `ping -c 1 -W 2 ${addresses[1]}; echo ping_exit:$?`)).toContain('ping_exit:1'); + expect(await page.evaluate(() => window.guest.vm.ethFramesSent)).toBe(0); + await Promise.all(pages.map(p => p.evaluate(() => window.guest.vm.setEthernetSharing(true)))); + // A denied ping may leave ARP probes exhausted. Exercise normal guest + // recovery after the grant with at most three real probes, without flushing + // neighbor state, increasing a global timeout, or replaying any shell effect. + const recovered = []; + for (let attempt = 0; attempt < 3; attempt++) { + const output = await command(page, `ping -c 1 -W 3 ${addresses[1]}; result=$?; ip neigh; echo ping_exit:$result`); + recovered.push(output); + if (output.includes('ping_exit:0')) break; + } + expect(recovered.some(output => output.includes('ping_exit:0')), JSON.stringify(recovered)).toBe(true); + expect(await command(other, `ping -c 1 -W 3 ${addresses[0]}; echo ping_exit:$?`)).toContain('ping_exit:0'); + for (const target of pages) { + const counters = await target.evaluate(() => ({ sent: window.guest.vm.ethFramesSent, received: window.guest.vm.ethFramesReceived })); + expect(counters.sent).toBeGreaterThan(0); expect(counters.received).toBeGreaterThan(0); + const receivedLengths = await target.evaluate(() => window.guest.packets.filter(p => p.direction === 'received').map(p => p.length)); + expect(receivedLengths.length).toBeGreaterThan(0); + for (const length of receivedLengths) { expect(length).toBeGreaterThanOrEqual(14); expect(length).toBeLessThanOrEqual(1518); } + } + await other.evaluate(() => window.guest.vm.setEthernetSharing(false)); + const before = await other.evaluate(() => window.guest.vm.ethFramesReceived); + expect(await command(page, `ping -c 1 -W 2 ${addresses[1]}; echo ping_exit:$?`)).toContain('ping_exit:1'); + expect(await other.evaluate(() => window.guest.vm.ethFramesReceived)).toBe(before); + await page.evaluate(() => window.guest.vm.setEthernetSharing(false)); + // Exact configured budgets are unchanged, even though this test does not + // intentionally exhaust every limit (the source-derived boundary suite does). + expect(await page.evaluate(async () => { + const { vmLimits } = await import('/src/layer4-compute/vm-administration.js'); + return { limits: vmLimits, bytes: window.guest.vm.v86.fs9p.total_size }; + })).toMatchObject({ limits: { filesystemAllocationLimit: 67108864, filesystemMetadataLimit: 4096 }, bytes: 67108864 }); + } finally { + for (const [index, target] of pages.entries()) { + if (!target.isClosed()) { + await testInfo.attach(`vm-peer-${index}-state`, { body: Buffer.from(JSON.stringify(await target.evaluate(() => { + const g = window.guest; + return g ? { statuses: g.statuses, serial: g.serial, frames: g.frames, lifecycle: g.vm.lifecycle, + sent: g.vm.ethFramesSent, received: g.vm.ethFramesReceived, packets: g.packets, commands: g.commands, events: g.events, + routingId: g.transport.routingPeerId, peers: g.transport.openPeers().map(p => ({ remoteId: p.remoteId, state: p.dc.readyState, ice: p.pc.iceConnectionState })) } : null; + }), null, 2)), contentType: 'application/json' }); + await target.evaluate(async () => { if (window.guest) { await window.guest.vm.destroy(); window.guest.transport.close(); } }); + } + } + await other.close(); + } +}); diff --git a/tests/browser/vm.spec.mjs b/tests/browser/vm.spec.mjs new file mode 100644 index 0000000..70e91cc --- /dev/null +++ b/tests/browser/vm.spec.mjs @@ -0,0 +1,103 @@ +import { test, expect, selectJourney } from './fixtures.mjs'; + +test('bundled v86 boots the actual guest, captures shell bytes and stops/destroys through operator controls', async ({ page }, testInfo) => { + test.setTimeout(200_000); + const loaded = new Set(); + page.on('response', response => { + if (response.ok()) loaded.add(new URL(response.url()).pathname); + }); + await page.goto('/'); + await selectJourney(page, 'vm'); + await expect(page.locator('#bootVmBtn')).toBeEnabled(); + await expect(page.locator('#runVmCmdBtn')).toBeDisabled(); + await expect(page.locator('#vmNetworkPanel')).not.toHaveAttribute('open', ''); + await expect(page.locator('#vmIpv4Address')).not.toBeVisible(); + await page.evaluate(() => { + window.vmEvidenceTransitions = []; + new MutationObserver(records => { + for (const record of records) for (const node of record.removedNodes) window.vmEvidenceTransitions.push(node.textContent); + window.vmEvidenceTransitions.push(document.getElementById('vmEvidence').textContent); + }).observe(document.getElementById('vmEvidence'), { childList: true, subtree: true }); + }); + await page.locator('#vmLimitsPanel > summary').click(); + await expect(page.locator('#vmRuntimeSeconds')).toBeVisible(); + await page.locator('#vmRuntimeSeconds').fill('120'); + await page.locator('#vmNetworkPanel > summary').click(); + await page.locator('#vmIpv4Address').fill('10.42.0.2'); + await page.locator('#vmNetworkPanel > summary').click(); + await page.locator('#vmLimitsPanel > summary').click(); + await page.locator('#bootVmBtn').click(); + await expect(page.locator('#bootVmBtn')).toBeDisabled(); + await expect(page.locator('#vmStatusLabel')).toContainText('ONLINE', { timeout: 70_000 }); + for (const path of ['/v86/libv86.js', '/v86/v86.wasm', '/v86/seabios.bin', '/v86/vgabios.bin', '/images/buildroot-bzimage.bin']) expect(loaded.has(path), `${path} loaded successfully`).toBe(true); + await expect(page.locator('#vmShareObjects')).not.toBeChecked(); + await expect(page.locator('#vmShareEthernet')).not.toBeChecked(); + const marker = `stitch_native_guest_${crypto.randomUUID().replaceAll('-', '')}`; + await page.locator('#vmCmdInput').fill(`printf '${marker}\\n'; uname -s`); + await page.locator('#runVmCmdBtn').click(); + await expect(page.locator('#vmStdoutText')).toContainText(marker, { timeout: 20_000 }); + await expect(page.locator('#vmStdoutText')).toContainText('Linux'); + await expect(page.locator('#vmCommandOutcome')).toContainText('completed'); + await expect(page.locator('#vmCommandSelection option')).toHaveCount(1); + await expect(page.locator('#vmActionStatus')).toContainText('VM-DONE'); + await page.locator('#reconcileVmCommandBtn').click(); + await expect(page.locator('#vmCommandSelection option')).toHaveCount(1); + await expect(page.locator('#vmStdoutText')).toContainText(marker); + await testInfo.attach('candidate-ready-operator', { body: await page.screenshot({ fullPage: true }), contentType: 'image/png' }); + await page.locator('#vmShareObjects').check(); + await page.locator('#stopVmBtn').click(); + await expect(page.locator('#vmShareObjects')).not.toBeChecked(); + await expect(page.locator('#runVmCmdBtn')).toBeDisabled(); + await expect(page.locator('#bootVmBtn')).toBeDisabled(); + await expect(page.locator('#destroyVmBtn')).toBeEnabled(); + await expect(page.locator('#stopVmBtn')).toBeDisabled(); + await expect(page.locator('#vmEvidence')).toContainText('HOST-OBSERVED STOPPED'); + await testInfo.attach('stopped-reconciled-operator', { body: await page.screenshot({ fullPage: true }), contentType: 'image/png' }); + await page.locator('#destroyVmBtn').click(); + await expect(page.locator('#bootVmBtn')).toBeEnabled(); + await expect(page.locator('#destroyVmBtn')).toBeDisabled(); + await expect(page.locator('#vmEvidence')).toContainText('HOST-OBSERVED DESTROYED'); + await expect(page.locator('#vmIpv4Address')).toBeEnabled(); + await expect(page.locator('#vmPrefixLength')).toBeEnabled(); + await expect(page.locator('#vmRuntimeSeconds')).toBeEnabled(); + await expect(page.locator('#vmNetworkSummary')).not.toContainText('configuration locked'); + await expect(page.locator('#vmNetworkStatus')).toContainText('Applied at next boot.'); + // Restart a fresh actual guest; the previous command evidence remains selected. + await page.locator('#bootVmBtn').click(); + await expect(page.locator('#vmStatusLabel')).toContainText('ONLINE', { timeout: 70_000 }); + await page.locator('#vmShareEthernet').check(); + await page.locator('#vmCmdInput').fill('sleep 30; printf late_completion'); + await page.locator('#runVmCmdBtn').click(); + await expect(page.locator('#cancelVmObservationBtn')).toBeEnabled(); + // Wait until the genuine keyboard dispatch has completed; do not mistake a + // before-dispatch cancellation for proof of whole-emulator termination. + await expect(page.locator('#vmScreenContainer')).toContainText('sh /mnt/job_', { timeout: 10_000 }); + await page.locator('#cancelVmObservationBtn').click(); + await expect(page.locator('#vmCommandOutcome')).toContainText('vm-stopped'); + await expect(page.locator('#vmCommandOutcome')).toContainText('unknown'); + await expect(page.locator('#vmEvidence')).toContainText('HOST-OBSERVED STOPPED'); + await expect(page.locator('#stopVmBtn')).toBeDisabled(); + await expect(page.locator('#destroyVmBtn')).toBeEnabled(); + await testInfo.attach('cancelled-command-confirmed-stop', { body: await page.screenshot({ fullPage: true }), contentType: 'image/png' }); + await expect(page.locator('#vmShareEthernet')).not.toBeChecked(); + await expect(page.locator('#runVmCmdBtn')).toBeDisabled(); + await expect(page.locator('#bootVmBtn')).toBeDisabled(); + await page.locator('#destroyVmBtn').click(); + await expect(page.locator('#bootVmBtn')).toBeEnabled(); + await expect(page.locator('#vmCommandSelection option')).toHaveCount(2); + await expect(page.locator('#vmEvidence')).toContainText('HOST-OBSERVED DESTROYED'); + await expect(page.locator('#vmIpv4Address')).toBeEnabled(); + await expect(page.locator('#vmPrefixLength')).toBeEnabled(); + await expect(page.locator('#vmRuntimeSeconds')).toBeEnabled(); + await expect(page.locator('#vmNetworkSummary')).not.toContainText('configuration locked'); + await expect(page.locator('#vmNetworkStatus')).toContainText('Applied at next boot.'); + await expect(page.locator('#vmCommandOutcome')).toContainText('unknown'); + await testInfo.attach('destroyed-retained-unknown-command', { body: await page.screenshot({ fullPage: true }), contentType: 'image/png' }); + const transitions = await page.evaluate(() => window.vmEvidenceTransitions); + expect(transitions.some(text => text.includes('HOST TERMINATION PENDING'))).toBe(true); + await testInfo.attach('actual-termination-transitions', { body: Buffer.from(JSON.stringify(transitions)), contentType: 'application/json' }); + await page.locator('#vmCommandSelection').selectOption({ index: 0 }); + // Successful administration never erases resolved command evidence. + await expect(page.locator('#vmCommandOutcome')).toContainText('completed'); + await expect(page.locator('#vmStdoutText')).toContainText(marker); +}); diff --git a/tests/canonical-json.test.js b/tests/canonical-json.test.js new file mode 100644 index 0000000..195ba18 --- /dev/null +++ b/tests/canonical-json.test.js @@ -0,0 +1,94 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { canonicalBytes, parseCanonicalJson, CUSTODY_LIMITS } from '../src/layer1-uor/custody.js'; +const encoded = value => new TextDecoder().decode(canonicalBytes(value)); +const invalid = action => assert.throws(action, error => error.code === 'InvalidCanonicalValue'); + +// Numerical facts from RFC8785 AppendixB, not a reimplementation of the ECMAScript +// serialization algorithm. Every finite bit pattern listed by the RFC is covered. +const numbers = [ + ['0000000000000000','0'], ['8000000000000000','0'], + ['0000000000000001','5e-324'], ['8000000000000001','-5e-324'], + ['7fefffffffffffff','1.7976931348623157e+308'], ['ffefffffffffffff','-1.7976931348623157e+308'], + ['4340000000000000','9007199254740992'], ['c340000000000000','-9007199254740992'], + ['4430000000000000','295147905179352830000'], + ['44b52d02c7e14af5','9.999999999999997e+22'], ['44b52d02c7e14af6','1e+23'], + ['44b52d02c7e14af7','1.0000000000000001e+23'], + ['444b1ae4d6e2ef4e','999999999999999700000'], ['444b1ae4d6e2ef4f','999999999999999900000'], + ['444b1ae4d6e2ef50','1e+21'], ['3eb0c6f7a0b5ed8c','9.999999999999997e-7'], + ['3eb0c6f7a0b5ed8d','0.000001'], ['41b3de4355555553','333333333.3333332'], + ['41b3de4355555554','333333333.33333325'], ['41b3de4355555555','333333333.3333333'], + ['41b3de4355555556','333333333.3333334'], ['41b3de4355555557','333333333.33333343'], + ['becbf647612f3696','-0.0000033333333333333333'], ['43143ff3c1cb0959','1424953923781206.2'], +]; +test('RFC8785 Appendix B finite IEEE754 bit patterns and nonfinite rejection', () => { + for (const [hex, expected] of numbers) { + const value = Buffer.from(hex, 'hex').readDoubleBE(); + assert.equal(encoded(value), expected, hex); + assert.equal(encoded(parseCanonicalJson(expected)), expected, hex); + } + for (const hex of ['7fffffffffffffff', '7ff0000000000000', 'fff0000000000000']) + invalid(() => canonicalBytes(Buffer.from(hex, 'hex').readDoubleBE())); +}); +test('RFC8785 string escaping, UTF16 property ordering, recursive objects and arrays', () => { + const object = { '\u20ac':'Euro Sign', '\r':'Carriage Return', '\ufb33':'Hebrew Letter Dalet With Dagesh', + '1':'One', '\ud83d\ude00':'Emoji: Grinning Face', '\u0080':'Control', '\u00f6':'Latin Small Letter O With Diaeresis' }; + const ordered = ['\r', '1', '\u0080', '\u00f6', '\u20ac', '\ud83d\ude00', '\ufb33']; + assert.equal(encoded(object), '{' + ordered.map(k => JSON.stringify(k) + ':' + JSON.stringify(object[k])).join(',') + '}'); + assert.equal(encoded({ z:[{ b:1, a:2 },false], a:null }), '{"a":null,"z":[{"a":2,"b":1},false]}'); + assert.equal(encoded('\u0000\b\t\n\f\r\u001f"\\/€'), '"\\u0000\\b\\t\\n\\f\\r\\u001f\\"\\\\/€"'); + assert.notEqual(encoded('\u00e9'), encoded('e\u0301'), 'Unicode must not be normalized'); + assert.equal(encoded(-0), '0'); +}); +test('wire parser detects duplicate and escape-equivalent names before signature admission', () => { + for (const value of ['{"a":1,"a":2}', '{"a":1,"\\u0061":1}', '{"x":[{"nested":1,"nested":2}]}', + '{"__proto__":1,"__proto__":2}']) invalid(() => parseCanonicalJson(value)); + const parsed = parseCanonicalJson('{"__proto__":{"polluted":true},"constructor":3}'); + assert.equal(Object.getPrototypeOf(parsed), null); + assert.equal({}.polluted, undefined); + assert.equal(parsed.__proto__.polluted, true); + assert.equal(encoded(parsed), '{"__proto__":{"polluted":true},"constructor":3}'); +}); +test('wire parser refuses malformed JSON, Unicode and UTF8 without value coercion', () => { + for (const value of ['', 'undefined', 'NaN', 'Infinity', '1e999', '-1e999', '01', '+1', '1.', '1e', '[1,]', + '{"a":1,}', '{a:1}', 'null true', '/*x*/1', '\ufeff{}', '"\\ud800"', '"\\udfff"', '"\ud800"', + '"\\v"', '"\\uXX00"', '"unfinished', '"line\nfeed"', '{"a" 1}', '[,1]']) invalid(() => parseCanonicalJson(value)); + for (const bytes of [[0xc0,0xaf], [34,0xed,0xa0,0x80,34], [0xef,0xbb,0xbf,123,125]]) + invalid(() => parseCanonicalJson(Uint8Array.from(bytes))); + for (const value of [null, {}, 1]) invalid(() => parseCanonicalJson(value)); + assert.equal(encoded(parseCanonicalJson(' \n {"n":4.50,"s":"\\u0065\\u0301"}\t ')), '{"n":4.5,"s":"é"}'); +}); +test('parser bounds are explicit resource policies and run before uncontrolled allocation', () => { + const limit = action => assert.throws(action, e => e.code === 'SizeLimit'); + limit(() => parseCanonicalJson('"€"', {maxBytes:4})); + limit(() => parseCanonicalJson('[[null]]', {maxDepth:1})); + limit(() => parseCanonicalJson('[1,2,3]', {maxEntries:3})); + limit(() => parseCanonicalJson('"four"', {maxStringLength:3})); + limit(() => parseCanonicalJson('null', {maxBytes:Infinity})); + assert.equal(parseCanonicalJson('"longer"', {maxStringLength:10}), 'longer'); + assert.equal(parseCanonicalJson(' '.repeat(100) + 'null', {maxBytes:104}), null); + limit(() => canonicalBytes('a'.repeat(CUSTODY_LIMITS.maxStringLength + 1))); +}); +test('legacy safe-integer canonical values retain exact bytes; schema validation remains separate', () => { + const old = v => v === null || typeof v !== 'object' ? JSON.stringify(v) : Array.isArray(v) + ? '[' + v.map(old).join(',') + ']' : '{' + Object.keys(v).sort().map(k => JSON.stringify(k)+':'+old(v[k])).join(',') + '}'; + for (let i=0; i<1000; i++) { + const v={z:[i, -i || 0, Number.MAX_SAFE_INTEGER-i, true, null], a:{'😀':`row${i}`, 'é':'é', one:1}}; + assert.equal(encoded(v), old(v)); + } +}); + +test('RFC7493 I-JSON noncharacters are rejected in values and keys, raw and escaped', () => { + const points = [...Array.from({length:32}, (_,i)=>0xfdd0+i), ...Array.from({length:17},(_,i)=>[i*65536+65534,i*65536+65535]).flat()]; + for (const point of points) { + const s = String.fromCodePoint(point); + invalid(() => canonicalBytes(s)); invalid(() => canonicalBytes({[s]:1})); + invalid(() => parseCanonicalJson(JSON.stringify(s))); + invalid(() => parseCanonicalJson(JSON.stringify({[s]:1}))); + const escaped = s.split('').map(c=>'\\u'+c.charCodeAt(0).toString(16).padStart(4,'0')).join(''); + invalid(() => parseCanonicalJson('"'+escaped+'"')); + invalid(() => parseCanonicalJson('{"'+escaped+'":1}')); + } + for (const point of [0xfdd0-1, 0xfdef+1, 0xfffd, 0x1fffd, 0x10fffd]) + assert.equal(parseCanonicalJson(JSON.stringify(String.fromCodePoint(point))),String.fromCodePoint(point)); +}); diff --git a/tests/channel-flow.test.js b/tests/channel-flow.test.js new file mode 100644 index 0000000..462c286 --- /dev/null +++ b/tests/channel-flow.test.js @@ -0,0 +1,132 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { ChannelFlow, CHANNEL_LIMITS, channelMaximum } from '../src/layer5-transport/channel-flow.js'; +function fixture(t, maximum = 1024, options = {}) { + const sent = [], messages = [], results = [], charges = []; + const channel = { readyState: 'open', ordered: true, bufferedAmount: 0, + send(data) { sent.push(data); this.bufferedAmount += typeof data === 'string' ? new TextEncoder().encode(data).length : data.byteLength; }, + close() { this.readyState = 'closed'; } }; + const flow = new ChannelFlow({ channel, pc: { sctp: { maxMessageSize: maximum } }, + admission: { reserve(kind, values) { charges.push({ kind, ...values }); } }, + onMessage: value => messages.push(value), onResult: value => results.push(value), ...options }); + t.after(() => flow.dispose()); + return { flow, channel, sent, messages, results, charges }; +} +test('negotiated size, UTF8 wire accounting and complete 128KiB object JSON roundtrip', t => { + const sender = fixture(t, 1024), receiver = fixture(t, 1024); + const value = { type: 'uor_shard', bytes: Array.from({ length: 128 * 1024 }, (_, i) => i % 256) }; + assert.equal(sender.flow.enqueue(value), true); + assert.ok(sender.sent.length > 100); + assert.ok(sender.sent.every(frame => frame.byteLength <= 1024)); + for (const frame of sender.sent) receiver.flow.receive(frame); + assert.equal(JSON.stringify(receiver.messages), JSON.stringify([value])); + assert.equal(receiver.flow.state.receiving, 0); + assert.equal(sender.charges[0].transferBytes, sender.sent.reduce((n, f) => n + f.byteLength, 0)); + assert.equal(sender.results[0].outcome, 'submitted'); + assert.equal(sender.results[0].delivered, false); +}); +test('zero/unbounded negotiation, absent default, small limit and malformed negotiation', t => { + for (const value of [0, Infinity, undefined]) assert.equal(channelMaximum({ sctp: { maxMessageSize: value } }), 65536); + const { flow } = fixture(t, 16); + assert.throws(() => flow.enqueue({ long: 'x'.repeat(40) }), e => e.code === 'channel-framing-size-unsupported'); + assert.equal(flow.enqueue({ x: 1 }), true); + assert.throws(() => channelMaximum({ sctp: { maxMessageSize: -1 } })); +}); +test('bufferedAmountLow resumes FIFO queue without growing browser buffer beyond budget', t => { + const f = fixture(t, 1024); f.channel.bufferedAmount = CHANNEL_LIMITS.buffered; + assert.equal(f.flow.enqueue({ text: 'é😀' }), true); + assert.equal(f.flow.enqueue({ second: true }), true); + assert.equal(f.sent.length, 0); + f.channel.bufferedAmount = 0; f.channel.onbufferedamountlow(); + assert.deepEqual(f.sent.map(JSON.parse), [{ text: 'é😀' }, { second: true }]); + assert.equal(f.flow.state.retained, 0); + assert.equal(f.charges[0].transferBytes, new TextEncoder().encode(f.sent[0]).length); +}); +test('queue exhaustion refuses synchronously and disposal releases aggregate reservations', t => { + const pool = { queued: 0, messages: 0, receiving: 0, assemblies: 0 }; + const f = fixture(t, 65536, { pool }); f.channel.bufferedAmount = CHANNEL_LIMITS.buffered; + for (let i = 0; i < 64; i++) f.flow.enqueue({ i }); + assert.throws(() => f.flow.enqueue({ overflow: true }), e => e.code === 'channel-queue-capacity'); + f.flow.dispose('generation-changed'); assert.equal(pool.queued, 0); assert.equal(pool.messages, 0); + f.channel.bufferedAmount = 0; f.channel.onbufferedamountlow(); assert.equal(f.sent.length, 0); + assert.equal(f.results.filter(x => x.outcome === 'cancelled').length, 64); +}); +for (const failure of ['order', 'duplicate', 'corrupt', 'truncated', 'mixed']) test(`fragment ${failure} never exposes partial JSON`, t => { + const s = fixture(t, 64), r = fixture(t, 64); s.flow.enqueue({ text: 'x'.repeat(1000) }); + if (failure === 'order') r.flow.receive(s.sent[1]); + if (failure === 'duplicate') { r.flow.receive(s.sent[0]); r.flow.receive(s.sent[0]); } + if (failure === 'corrupt') { const bad = s.sent.at(-1).slice(0); new Uint8Array(bad)[16] = 0xff; for (const f of [...s.sent.slice(0, -1), bad]) r.flow.receive(f); } + if (failure === 'truncated') r.flow.receive(s.sent[0].slice(0, 14)); + if (failure === 'mixed') { r.flow.receive(s.sent[0]); r.flow.receive('{"other":true}'); } + assert.deepEqual(r.messages, []); assert.equal(r.flow.state.disposed, true); assert.equal(r.flow.state.receiving, 0); +}); +test('partial send failure and incomplete receive are classified, never replayed', t => { + const s = fixture(t, 64), r = fixture(t, 64); + const send = s.channel.send.bind(s.channel); let n = 0; + s.channel.send = data => { if (++n === 3) throw Error('host failure'); send(data); }; + s.flow.enqueue({ text: 'x'.repeat(1000) }); + assert.equal(s.results.find(x => x.outcome === 'partial').frames, 2); + r.flow.receive(s.sent[0]); r.flow.dispose('channel-closed'); + assert.ok(r.results.some(x => x.outcome === 'incomplete-receive')); + assert.equal(r.flow.state.receiving, 0); +}); +test('generation changes fence enqueue, buffered callbacks and incomplete receive', t => { + let current = true; + const s = fixture(t, 64, { current: () => current }), r = fixture(t, 64, { current: () => current }); + s.flow.enqueue({ text: 'x'.repeat(1000) }); r.flow.receive(s.sent[0]); + s.channel.bufferedAmount = CHANNEL_LIMITS.buffered; s.flow.enqueue({ later: true }); + const count = s.sent.length; current = false; + s.channel.bufferedAmount = 0; s.channel.onbufferedamountlow(); + for (const f of s.sent.slice(1)) r.flow.receive(f); + assert.equal(s.sent.length, count); assert.deepEqual(r.messages, []); + assert.equal(s.flow.enqueue({ stale: true }), false); +}); +test('incomplete assembly expires and closes poisoned stream', t => { + let now = 0, callback; + t.mock.method(globalThis, 'setTimeout', fn => { callback = fn; return { unref() {} }; }); + t.mock.method(globalThis, 'clearTimeout', () => {}); + const s = fixture(t, 64), r = fixture(t, 64, { clock: () => now }); + s.flow.enqueue({ text: 'x'.repeat(1000) }); r.flow.receive(s.sent[0]); + now = CHANNEL_LIMITS.age; callback(); + assert.equal(r.channel.readyState, 'closed'); assert.equal(r.flow.state.receiving, 0); +}); +test('binary frame replay after completion is refused and fresh flow starts at sequence one', t => { + const s = fixture(t, 64), r = fixture(t, 64), fresh = fixture(t, 64); + s.flow.enqueue({ text: 'x'.repeat(500) }); + for (const frame of s.sent) { r.flow.receive(frame); fresh.flow.receive(frame); } + r.flow.receive(s.sent[0]); + assert.equal(r.messages.length, 1); assert.equal(fresh.messages.length, 1); assert.equal(r.flow.state.disposed, true); +}); +test('unreliable and unordered channels refuse sends explicitly', t => { + const f = fixture(t, 64); f.channel.ordered = false; + assert.throws(() => f.flow.enqueue({ test: 'x'.repeat(100) }), e => e.code === 'channel-framing-requires-reliable-ordered'); +}); +test('queued consent and resource epoch expiration fence deferred sends', t => { + let consent = true, now = 1; + const f = fixture(t), g = fixture(t, 1024, { admission: { reserve() {}, clock: () => now, + get state() { return { lastObservedMs: 1, endMs: 10 }; } } }); + for (const x of [f, g]) x.channel.bufferedAmount = CHANNEL_LIMITS.buffered; + f.flow.enqueue({ eth_frame: [1] }, { consentCurrent: () => consent }); + g.flow.enqueue({ test: true }); consent = false; now = 11; + for (const x of [f, g]) { x.channel.bufferedAmount = 0; x.channel.onbufferedamountlow(); assert.equal(x.sent.length, 0); assert.equal(x.flow.state.disposed, true); } +}); +test('legacy peer without framing protocol retains small JSON, rejects oversize precisely', t => { + const f = fixture(t, 64); f.channel.protocol = ''; + assert.equal(f.flow.enqueue({ small: true }), true); + assert.throws(() => f.flow.enqueue({ big: 'x'.repeat(1000) }), e => e.code === 'channel-peer-framing-unsupported'); +}); +test('multiple fragmented messages retain ordering across UTF8 chunk boundaries', t => { + const s = fixture(t, 73), r = fixture(t, 73); + const values = [{ text: '😀é'.repeat(400) }, { type: 'eth_frame', frame: Array.from({ length: 1500 }, (_, i) => i % 256) }, { last: true }]; + for (const v of values) s.flow.enqueue(v); + for (const frame of s.sent) r.flow.receive(frame); + assert.equal(JSON.stringify(r.messages), JSON.stringify(values)); +}); +test('retained byte ceiling spans peers, even below message count ceiling', t => { + const pool = { queued: 0, messages: 0, receiving: 0, assemblies: 0 }, a = fixture(t, 65536, { pool }), b = fixture(t, 65536, { pool }); + a.channel.bufferedAmount = b.channel.bufferedAmount = CHANNEL_LIMITS.buffered; + const value = { text: 'x'.repeat(500000) }; + for (const f of [a, b, a, b]) f.flow.enqueue(value); + assert.throws(() => a.flow.enqueue(value), e => e.code === 'channel-queue-capacity'); + assert.equal(pool.messages, 4); a.flow.dispose(); b.flow.dispose(); assert.equal(pool.queued, 0); +}); diff --git a/tests/connection-measurement.test.js b/tests/connection-measurement.test.js new file mode 100644 index 0000000..7486e39 --- /dev/null +++ b/tests/connection-measurement.test.js @@ -0,0 +1,106 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { WebRtcTransportNode, ExperimentTrialLogger } from '../src/layer5-transport/index.js'; +import { c1SampleQualified } from '../src/layer1-uor/effects.js'; +function fixture(t, candidateType = 'host') { + let now = 0, timer = 1; + const timers = new Map(), events = [], sent = []; + t.mock.method(performance, 'now', () => now); + t.mock.method(globalThis, 'setTimeout', (fn, delay) => { const id = timer++; timers.set(id, { fn, delay }); return id; }); + t.mock.method(globalThis, 'clearTimeout', id => timers.delete(id)); + t.mock.method(globalThis, 'setInterval', () => 1000); + t.mock.method(globalThis, 'clearInterval', () => {}); + class Channel { ordered = true; readyState = 'open'; send(raw) { sent.push(JSON.parse(raw)); } close() { this.readyState = 'closed'; } } + class Peer { + connectionState = 'new'; + createDataChannel() { return new Channel(); } + close() {} + async getStats() { return new Map([ + ['transport', { type: 'transport', selectedCandidatePairId: 'pair' }], + ['pair', { type: 'candidate-pair', state: 'succeeded', localCandidateId: 'local', remoteCandidateId: 'remote' }], + ['local', { type: 'local-candidate', candidateType: 'host' }], + ['remote', { type: 'remote-candidate', candidateType }] + ]); } + } + const before = Object.getOwnPropertyDescriptor(globalThis, 'RTCPeerConnection'); + Object.defineProperty(globalThis, 'RTCPeerConnection', { value: Peer, configurable: true }); + t.after(() => before ? Object.defineProperty(globalThis, 'RTCPeerConnection', before) : delete globalThis.RTCPeerConnection); + const logger = new ExperimentTrialLogger(), node = new WebRtcTransportNode({ peerId: 'local', trialLogger: logger, onEvent: event => events.push(event) }); + const entry = node.getOrCreatePeer('remote', true); entry.dc.onopen(); + t.after(() => node.close()); + return { node, entry, logger, events, sent, timers, + at(value) { now = value; }, + probe(sequence, changes = {}) { + const ping = { type: 'ping', seq: sequence, sentAtMs: 123000 + sequence, from: 'local' }; + node.sendToPeer('remote', ping); + node.handleDataMessage('remote', { ...ping, type: 'pong', from: 'remote', ...changes }); + }, + deadline() { for (const item of [...timers.values()]) if (item.delay === 10000) item.fn(); } + }; +} +const settle = async () => { await Promise.resolve(); await Promise.resolve(); }; + +test('C1 source/runtime count only issued exact ordered probe echoes, not pings, duplicates or out-of-order responses', async t => { + const f = fixture(t); + for (let seq = 1; seq <= 12; seq++) { + f.node.handleDataMessage('remote', { type: 'pong', seq, sentAtMs: 1, from: 'remote' }); + f.node.handleDataMessage('remote', { type: 'ping', seq, sentAtMs: 1, from: 'remote' }); + } + assert.equal(f.entry.heartbeatsPassed, 0); + f.at(100); f.probe(1); assert.equal(f.entry.heartbeatsPassed, 1); + f.node.handleDataMessage('remote', { type: 'pong', seq: 1, sentAtMs: 123001, from: 'remote' }); + assert.equal(f.entry.heartbeatsPassed, 1); + f.at(200); f.probe(3); assert.equal(f.entry.heartbeatsPassed, 1, 'sequence gap resets consecutive run'); + f.at(300); f.probe(4); assert.equal(f.entry.heartbeatsPassed, 2); + f.at(400); f.probe(2); assert.equal(f.entry.heartbeatsPassed, 2, 'late old sequence cannot complete another heartbeat'); + f.at(500); f.probe(5, { from: 'someone-else' }); assert.equal(f.entry.heartbeatsPassed, 2); + f.at(600); f.probe(6, { sentAtMs: 7 }); assert.equal(f.entry.heartbeatsPassed, 2); + assert.equal(f.logger.entries.length, 0); +}); + +test('ten consecutive correlated heartbeats inside the frozen window require selected direct path evidence', async t => { + const f = fixture(t); + for (let sequence = 1; sequence <= 10; sequence++) { f.at(sequence * 900); f.probe(sequence); } + await settle(); + assert.equal(f.logger.entries.length, 1); + const sample = f.logger.entries[0]; + assert.equal(sample.contract_version, '1.1.0'); assert.equal(sample.success, true); + assert.equal(sample.connection_qualified, true); assert.equal(sample.selected_path_observed, true); + assert.equal(sample.qualification_elapsed_sec, 9); assert.equal(sample.heartbeats_passed, 10); + assert.equal(f.node.lifecycle.canSend, true); +}); + +for (const mode of ['remote-relay', 'missing-stats', 'unordered']) test(`C1 does not fabricate direct success for ${mode}`, async t => { + const f = fixture(t, mode === 'remote-relay' ? 'relay' : 'host'); + if (mode === 'missing-stats') f.entry.pc.getStats = async () => { throw Error('unsupported'); }; + if (mode === 'unordered') f.entry.dc.ordered = false; + for (let sequence = 1; sequence <= 10; sequence++) { f.at(sequence * 800); f.probe(sequence); } + await settle(); + if (mode === 'unordered') { f.at(10000); f.deadline(); } + assert.equal(f.logger.entries.length, 1); assert.equal(f.logger.entries[0].success, false); + assert.equal(f.node.lifecycle.canSend, true, 'measurement does not gate transport'); + if (mode === 'remote-relay') assert.equal(f.logger.entries[0].used_turn, true); +}); + +test('frozen10s deadline records failure without increasing default5s traffic or closing the channel', t => { + const f = fixture(t); assert.equal(f.node.heartbeatIntervalMs, 5000); + f.at(5000); f.probe(1); f.at(10000); f.probe(2); f.deadline(); + assert.equal(f.logger.entries[0].success, false); + assert.equal(f.logger.entries[0].heartbeats_passed, 2); + assert.equal(f.entry.dc.readyState, 'open'); assert.equal(f.node.lifecycle.canSend, true); + f.at(10001); f.probe(3); assert.equal(f.entry.heartbeatsPassed, 2); + assert.equal(f.logger.entries.length, 1); +}); + +test('C1 summary refuses success booleans without coherent ordered/sequence/time/path evidence', () => { + const sample = { success: true, network_pair_class: 'declared', used_turn: false, selected_path_observed: true, + ordered_channel: true, heartbeats_passed: 10, ice_setup_sec: 1, qualification_elapsed_sec: 9 }; + assert.equal(c1SampleQualified(sample), true); + for (const changes of [{ heartbeats_passed: 9 }, { ordered_channel: false }, { selected_path_observed: false }, { used_turn: true }, + { qualification_elapsed_sec: 10.1 }, { ice_setup_sec: 50, qualification_elapsed_sec: 1 }, { ice_setup_sec: 10, qualification_elapsed_sec: 9 }, { heartbeats_passed: undefined }]) assert.equal(c1SampleQualified({ ...sample, ...changes }), false, JSON.stringify(changes)); + const logger = new ExperimentTrialLogger(); + for (let index = 0; index < 30; index++) logger.logTrial('C1', { success: true, network_pair_class: 'declared', used_turn: false, ice_setup_sec: 1 }); + assert.equal(logger.summarizeC1('declared').direct_success_rate, 0); + assert.equal(logger.summarizeC1('declared').c1_status, 'INSUFFICIENT_EVIDENCE'); + assert.equal(logger.summarizeC1('declared').invalid_samples, 30); +}); diff --git a/tests/contracts.test.js b/tests/contracts.test.js new file mode 100644 index 0000000..1220d40 --- /dev/null +++ b/tests/contracts.test.js @@ -0,0 +1,165 @@ +import test from 'node:test'; +import { Datum, applyPrimitiveOp } from '../src/layer1-uor/index.js'; +import assert from 'node:assert/strict'; +import { canonicalBytes, sha256Bytes } from '../src/layer1-uor/custody.js'; +import { createCheckpoint, verifyCheckpoint, resumeProgram, replayProgram, demoProgram, identifyProgram } from '../src/layer4-compute/replay.js'; +import { generateAuthority, signPointer, admitPointer } from '../src/layer1-uor/pointer.js'; +import { createBudget, reserveAction, settleAction, zeroCost } from '../src/layer2-schedulers/policy.js'; +import { BudgetPacedSurvivalScheduler } from '../src/layer2-schedulers/index.js'; +import { LiveDistributedComputeCoordinator } from '../src/layer4-compute/index.js'; +const code = expected => e => e.code === expected; + +test('checkpoints replay every operation and resume equals uninterrupted execution', async () => { + for (const bits of [8, 16, 32, 64, 128]) { + const instructions = []; + for (const op of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16]) { + instructions.push(op <= 3 ? { op } : { op, argHex: '0x3' }); + } + const program = { version: 1, bits, initialValueHex: '0x7', instructions }; + let independent = new Datum(bits, 7n); + for (const instr of instructions) independent = applyPrimitiveOp(instr.op, independent, instr.argHex ? new Datum(bits, BigInt(instr.argHex)) : null); + assert.equal(replayProgram(program).stateHex, '0x' + independent.value.toString(16)); + for (let cut = 0; cut <= instructions.length; cut++) { + const cp = await createCheckpoint(program, cut); + assert.equal((await verifyCheckpoint(program, cp)).execution, 'replayed'); + assert.equal((await resumeProgram(program, cp)).stateHex, replayProgram(program).stateHex); + } + } +}); + +test('checkpoint tampering, semantic forgery, wrong program and broken links fail', async () => { + const program = demoProgram(9); + const first = await createCheckpoint(program, 3); + const next = await createCheckpoint(program, 6, first); + assert.equal((await verifyCheckpoint(program, next, first)).predecessor, 'checked'); + await assert.rejects(verifyCheckpoint(program, { ...first, stateHex: '0x0' }), code('checkpoint-integrity')); + const body = { ...first, stateHex: '0x0' }; delete body.checkpointDigest; + const forged = { ...body, checkpointDigest: await sha256Bytes(canonicalBytes(body), 'checkpoint') }; + await assert.rejects(verifyCheckpoint(program, forged), code('checkpoint-replay')); + await assert.rejects(verifyCheckpoint(demoProgram(9, 1n), first), code('program-mismatch')); + await assert.rejects(verifyCheckpoint(program, next, await createCheckpoint(program, 2)), code('checkpoint-predecessor')); + await assert.rejects(verifyCheckpoint(program, { ...first, trusted: true }), code('invalid-record')); + await assert.rejects(identifyProgram({ ...program, instructions: [{ op: 18, argHex: '0x2' }] }), code('unsupported-operation')); + await assert.rejects(identifyProgram({ ...program, initialValueHex: '0x00' }), code('invalid-ring-value')); + await assert.rejects(identifyProgram({ ...program, instructions: new Array(4097).fill({ op: 2 }) }), code('program-limit')); + assert.equal((await createCheckpoint(demoProgram(0), 0)).stateHex, '0x19919'); +}); + +test('single-writer pointers require pinned authority, exact successor and fresh signed data', async () => { + const alice = await generateAuthority(); const mallory = await generateAuthority(); + const objectRoot = 'sha256:' + 'a'.repeat(64); + const body = { version: 1, name: 'workspace', authorityKey: alice.publicKey, revision: 0, + previousDigest: null, objectRoot, validFromMs: 100, validUntilMs: 200 }; + const genesis = await signPointer(body, alice.privateKey); + const options = { name: 'workspace', trustedAuthorityKey: alice.publicKey, nowMs: 150 }; + assert.deepEqual(await admitPointer(null, genesis, options), genesis); + const successor = await signPointer({ ...body, revision: 1, previousDigest: genesis.pointerDigest }, alice.privateKey); + assert.deepEqual(await admitPointer(genesis, successor, options), successor); + await assert.rejects(admitPointer(successor, genesis, options), code('pointer-conflict')); + await assert.rejects(admitPointer(null, successor, options), code('pointer-bootstrap')); + await assert.rejects(admitPointer(genesis, successor, { ...options, nowMs: 200 }), code('pointer-expired')); + const attacker = await signPointer({ ...body, authorityKey: mallory.publicKey }, mallory.privateKey); + await assert.rejects(admitPointer(null, attacker, options), code('wrong-authority')); + const wrongSigner = await signPointer(body, mallory.privateKey); + await assert.rejects(admitPointer(null, wrongSigner, options), code('pointer-signature')); + await assert.rejects(admitPointer(null, { ...genesis, objectRoot: 'sha256:' + 'b'.repeat(64) }, options), code('pointer-integrity')); + await assert.rejects(admitPointer(null, genesis, { ...options, name: 'other' }), code('pointer-name')); +}); + +test('budget admission is bounded, monotonic, duplicate-safe, and conservative on ambiguous effects', () => { + const limit = { requests: 2, transferBytes: 100, storageBytes: 50, computeSteps: 10 }; + const initial = createBudget({ epoch: 'run-1', startMs: 100, endMs: 200, limit }); + const requested = { requests: 1, transferBytes: 80, storageBytes: 50, computeSteps: 5 }; + const reserved = reserveAction(initial, { id: 'a', kind: 'place', cost: requested }, 120); + assert.deepEqual(initial.spent, zeroCost()); + assert.deepEqual(reserved.spent, requested); + assert.throws(() => reserveAction(reserved, { id: 'b', kind: 'repair', cost: requested }, 130), code('budget-exhausted')); + assert.throws(() => reserveAction(reserved, { id: 'a', kind: 'repair', cost: zeroCost() }, 130), code('duplicate-action')); + assert.throws(() => reserveAction(reserved, { id: 'b', kind: 'repair', cost: zeroCost() }, 119), code('clock-regression')); + assert.throws(() => reserveAction(reserved, { id: 'b', kind: 'repair', cost: zeroCost() }, 200), code('epoch-expired')); + assert.throws(() => settleAction(reserved, 'a', { ...requested, transferBytes: 81 }), code('reservation-exceeded')); + const actual = { requests: 1, transferBytes: 20, storageBytes: 25, computeSteps: 3 }; + const settled = settleAction(reserved, 'a', actual); + assert.deepEqual(settled.spent, actual); + assert.throws(() => settleAction(settled, 'a', zeroCost()), code('unknown-reservation')); + assert.throws(() => reserveAction({ ...reserved, spent: zeroCost() }, { id: 'b', kind: 'place', cost: requested }, 130), code('invalid-budget')); +}); + +test('live scheduler uses an elapsed epoch and enforces its own budget', () => { + for (const origin of [0, 1700000000]) { + const scheduler = new BudgetPacedSurvivalScheduler({ durationSeconds: 100, maxRefreshBudget: 2, minFloorSeconds: 1 }); + scheduler.markRefreshed(origin); + assert.equal(scheduler.markRefreshed(origin + 30), true); + assert.equal(scheduler.markRefreshed(origin + 60), true); + assert.equal(scheduler.evaluate(origin + 90).shouldRefresh, false); + assert.equal(scheduler.markRefreshed(origin + 90), false); + assert.equal(scheduler.refreshCount - 1, 2); + assert.throws(() => scheduler.evaluate(origin + 89), /Clock regression/); + } +}); + +test('live coordinator rejects forged/legacy checkpoints and replays takeover with no relay by default', async () => { + const warm = []; const sent = []; + const transport = { peerId: 'peer-b', openPeers: () => [], broadcast: p => sent.push(p), + publishWarmEnvelope: async p => warm.push(p), fetchWarmEnvelopes: async () => { throw Error('must not contact relay'); } }; + const coordinator = new LiveDistributedComputeCoordinator({ transport, liveDb: { put: async () => ({ addressHex: 'result' }) } }); + assert.equal(await coordinator.ingestCheckpoint({ type: 'compute_ckpt', verified: true, jobId: 'fake' }), false); + const program = demoProgram(9); + const checkpoint = await createCheckpoint(program, 3); + assert.equal(await coordinator.ingestCheckpoint({ type: 'compute_ckpt', jobId: 'job-1', program, checkpoint, ownerPeerId: 'peer-a' }), true); + assert.deepEqual(await coordinator.syncAndTakeOverJobs(), ['job-1']); + await coordinator.running.get('job-1'); + assert.equal(coordinator.jobs.get('job-1').currentValueHex, replayProgram(program).stateHex); + assert.equal(coordinator.jobs.get('job-1').verification, 'replayed'); + assert.equal(warm.length, 0); + assert.equal(sent.length, 6); +}); + +test('live compute publishes stable authenticated owners and takes over only absent routing identities', async () => { + let initialized = false; + const sent = []; + const peers = [{ remoteId: 'key-remote' }]; + const transport = { peerId: 'friendly-local', + get routingPeerId() { return initialized ? 'key-local' : this.peerId; }, + signaling: { async identity() { initialized = true; return { id: 'key-local' }; } }, + openPeers: () => peers, + broadcast: packet => sent.push(packet) + }; + const coordinator = new LiveDistributedComputeCoordinator({ transport, + liveDb: { put: async () => ({ addressHex: 'result' }) } }); + await coordinator.startOrResumeJob({ jobId: 'own', totalSteps: 0, stepDelayMs: 0 }); + assert.equal(sent[0].ownerPeerId, 'key-local', 'initial work must not publish a transient display identity'); + assert.equal(coordinator.jobs.get('own').sourceTag, 'local:friendly-local'); + const program = demoProgram(3), checkpoint = await createCheckpoint(program, 1); + assert.equal(await coordinator.ingestCheckpoint({ type: 'compute_ckpt', jobId: 'remote', program, + checkpoint, ownerPeerId: 'key-remote' }), true); + assert.equal(await coordinator.ingestCheckpoint({ type: 'compute_ckpt', jobId: 'retained-own', program, + checkpoint, ownerPeerId: 'key-local' }), true); + assert.deepEqual(await coordinator.syncAndTakeOverJobs(), [], 'a connected authenticated owner and our own owner are present'); + peers.length = 0; + assert.deepEqual(await coordinator.syncAndTakeOverJobs(), ['remote']); + await coordinator.running.get('remote'); + assert.equal(coordinator.jobs.get('remote').status, 'completed'); + assert.equal(coordinator.jobs.get('remote').ownerPeerId, 'key-local'); + assert.equal(coordinator.jobs.get('retained-own').stepIndex, 1, 'local pending work is not a missing remote owner'); +}); + +test('replaced signaling session cannot publish a transient owner while identity resolves', async () => { + let releaseIdentity, enteredIdentity; + const gate = new Promise(resolve => { releaseIdentity = resolve; }); + const entered = new Promise(resolve => { enteredIdentity = resolve; }); + const sent = []; + const transport = { peerId: 'label', routingPeerId: 'key-new', + signaling: { async identity() { enteredIdentity(); await gate; } }, + openPeers: () => [], broadcast: packet => sent.push(packet) + }; + const coordinator = new LiveDistributedComputeCoordinator({ transport, + liveDb: { put: async () => { throw Error('No completed result may be stored'); } } }); + const work = coordinator.startOrResumeJob({ jobId: 'changed-session', totalSteps: 0, stepDelayMs: 0 }); + await entered; + transport.signaling = { async identity() {} }; + releaseIdentity(); + await assert.rejects(work, code('transport-session-changed')); + assert.equal(sent.length, 0); + assert.equal(coordinator.jobs.size, 0); +}); diff --git a/tests/custody.test.js b/tests/custody.test.js new file mode 100644 index 0000000..7532be0 --- /dev/null +++ b/tests/custody.test.js @@ -0,0 +1,352 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import { + CustodyError, CUSTODY_LIMITS, canonicalBytes, sha256Bytes, commitObject, fragmentDigest, + verifyManifest, verifyFragment, manifestBody, +} from '../src/layer1-uor/custody.js'; +import { + createObject, recoverObject, createPlacement, requestPlacement, requestMigration, + acknowledgePlacement, commitPlacement, failPlacement, observeHolderLoss, retirePlacement, placementStatus, +} from '../src/layer3-storage/custody.js'; +import { LiveUorMeshDatabase } from '../src/layer3-storage/index.js'; + +const bytes = text => new TextEncoder().encode(text); +const clone = value => structuredClone(value); +const rejects = (action, code) => assert.rejects(action, e => e instanceof CustodyError && (!code || e.code === code)); +const throws = (action, code) => assert.throws(action, e => e instanceof CustodyError && (!code || e.code === code)); +const pairs = [[0, 1], [0, 2], [1, 2]]; +async function rehash(manifest) { + manifest.manifestDigest = await sha256Bytes(canonicalBytes(manifestBody(manifest)), 'manifest'); + return manifest; +} +function receipt(bundle, { requestId, index, holder, leaseExpiresAt = 1000 }) { + return { requestId, index, holder, leaseExpiresAt, manifestDigest: bundle.manifest.manifestDigest, + fragmentDigest: bundle.manifest.fragments.digests[index], bytes: bundle.fragments[index].bytes }; +} +async function place(s, bundle, index, holder = `peer-${index}`, requestId = `request-${index}`, nowMs = 10) { + const p = { requestId, index, holder, leaseExpiresAt: 1000 }; + s = await requestPlacement(s, p); + s = await acknowledgePlacement(s, receipt(bundle, p), nowMs); + return commitPlacement(s, requestId, nowMs); +} + +test('canonical encoding is deterministic, closed, bounded and does not execute accessors', () => { + assert.deepEqual(canonicalBytes({ z: [true, null, 123], a: '\u2603' }), canonicalBytes({ a: '\u2603', z: [true, null, 123] })); + assert.equal(new TextDecoder().decode(canonicalBytes({ b: 2, a: 1 })), '{"a":1,"b":2}'); + for (const value of [undefined, NaN, Infinity, -Infinity, 1n, new Date(), new Uint8Array(), '\ud800', '\udfff']) { + throws(() => canonicalBytes(value), 'InvalidCanonicalValue'); + } + for (const value of [[, 1], Object.assign([1], { extra: true }), Object.assign({}, { [Symbol('x')]: 1 })]) { + throws(() => canonicalBytes(value), 'InvalidCanonicalValue'); + } + let called = false; + const getter = Object.defineProperty({}, 'x', { enumerable: true, get() { called = true; return 1; } }); + throws(() => canonicalBytes(getter), 'InvalidCanonicalValue'); + assert.equal(called, false); + throws(() => canonicalBytes(Object.defineProperty({}, 'hidden', { value: 1 })), 'InvalidCanonicalValue'); + const cycle = {}; cycle.self = cycle; + throws(() => canonicalBytes(cycle), 'InvalidCanonicalValue'); + throws(() => canonicalBytes('a'.repeat(CUSTODY_LIMITS.maxStringLength + 1)), 'SizeLimit'); + let nested = null; for (let i = 0; i < 20; i++) nested = [nested]; + throws(() => canonicalBytes(nested), 'SizeLimit'); + throws(() => canonicalBytes(new Array(5000).fill(0)), 'SizeLimit'); +}); + +test('domain-separated full commitments agree with independent Python vectors', async () => { + const fixture = JSON.parse(await readFile(new URL('./fixtures/custody-vectors.json', import.meta.url), 'utf8')); + for (const vector of fixture.vectors) { + const original = Uint8Array.from(Buffer.from(vector.objectHex, 'hex')); + const actual = await createObject(original); + assert.deepEqual(actual.manifest, vector.manifest, vector.name); + for (let i = 0; i < 3; i++) assert.equal(Buffer.from(actual.fragments[i].bytes).toString('hex'), vector.fragments[i].hex); + for (const pair of pairs) assert.deepEqual(await recoverObject(vector.manifest, pair.map(i => actual.fragments[i])), original); + assert.notEqual(actual.manifest.object.contentDigest, actual.manifest.encoding.encodingDigest); + assert.equal(actual.manifest.object.contentDigest.length, 71); + } + for (const vector of fixture.invalidVectors) { + const fragments = vector.fragments.map(f => ({ index: f.index, bytes: Uint8Array.from(Buffer.from(f.hex, 'hex')) })); + await rejects(() => recoverObject(vector.manifest, fragments), vector.expectedError); + } + await rejects(() => sha256Bytes(bytes('x'), 'stitch/object/v1'), 'InvalidSchema'); + await rejects(() => commitObject('implicit text coercion'), 'InvalidBytes'); +}); + +test('every pair and triple recovers exact odd/even/empty bytes over deterministic corpus', async () => { + for (const length of [...Array(80).keys(), 127, 128, 129, 255, 256, 257, 1023, 1024, 1025]) { + const original = Uint8Array.from({ length }, (_, i) => (i * 71 + length * 19) & 255); + const bundle = await createObject(original); + for (const pair of pairs) assert.deepEqual(await recoverObject(bundle.manifest, pair.map(i => bundle.fragments[i])), original, `length ${length} pair ${pair}`); + assert.deepEqual(await recoverObject(bundle.manifest, bundle.fragments), original); + } +}); + +test('async boundaries snapshot original bytes, manifests and fragments', async () => { + const input = bytes('original'); + const pending = createObject(input); input.fill(255); + const bundle = await pending; + assert.deepEqual(await recoverObject(bundle.manifest, bundle.fragments.slice(0, 2)), bytes('original')); + const mutable = clone(bundle.manifest); + const checked = verifyManifest(mutable); mutable.object.byteLength = 1; + assert.equal((await checked).object.byteLength, 8); + const fragments = bundle.fragments.map(f => ({ index: f.index, bytes: new Uint8Array(f.bytes) })); + const recovering = recoverObject(bundle.manifest, fragments.slice(0, 2)); + fragments.forEach(f => f.bytes.fill(0)); + assert.deepEqual(await recovering, bytes('original')); +}); + +test('closed schemas reject truncated commitments, unsupported dependencies and hostile lengths', async () => { + const { manifest } = await createObject(bytes('schema')); + const mutations = [ + m => { m.extra = true; }, m => { delete m.object.digestAlgorithm; }, m => { m.version = 2; }, + m => { m.encoding.dependencies = ['missing-basis']; }, m => { m.encoding.format = 'external'; }, + m => { m.object.contentDigest = m.object.contentDigest.slice(0, 24); }, + m => { m.encoding.encodingDigest = m.encoding.encodingDigest.toUpperCase(); }, + m => { m.fragments.digests.pop(); }, m => { m.fragments.threshold = 1; }, + m => { m.fragments.byteLength += 1; }, m => { m.object.byteLength = -1; }, + m => { m.object.byteLength = Number.MAX_SAFE_INTEGER; }, m => { m.object.byteLength = 1.5; }, + ]; + for (const mutate of mutations) { const m = clone(manifest); mutate(m); await rejects(() => verifyManifest(m)); } + const m = clone(manifest); m.object.contentDigest = 'sha256:' + '0'.repeat(64); + await rejects(() => verifyManifest(m), 'ManifestDigestMismatch'); + const huge = new Uint8Array(CUSTODY_LIMITS.maxObjectBytes + 1); + await rejects(() => createObject(huge), 'SizeLimit'); +}); + +test('recovery rejects duplicate, invalid, truncated, mutated, mixed and extra corrupt fragments', async () => { + const a = await createObject(bytes('fragment-A')), b = await createObject(bytes('fragment-B')); + await rejects(() => recoverObject(a.manifest, [a.fragments[0]]), 'InsufficientFragments'); + await rejects(() => recoverObject(a.manifest, [a.fragments[0], a.fragments[0]]), 'DuplicateFragment'); + await rejects(() => recoverObject(a.manifest, [a.fragments[0], b.fragments[1]]), 'FragmentDigestMismatch'); + const malformed = [ + { index: 3, bytes: a.fragments[0].bytes }, { index: -1, bytes: a.fragments[0].bytes }, + { index: 0.5, bytes: a.fragments[0].bytes }, { index: 0, bytes: [1, 2] }, + { index: 0, bytes: a.fragments[0].bytes.subarray(1) }, + { index: 0, bytes: new Uint8Array(a.fragments[0].bytes.length + 1) }, + { index: 0, bytes: a.fragments[0].bytes, extra: true }, + ]; + for (const f of malformed) await rejects(() => verifyFragment(a.manifest, f)); + const corrupted = a.fragments.map(f => ({ index: f.index, bytes: new Uint8Array(f.bytes) })); + corrupted[2].bytes[0] ^= 1; + await rejects(() => recoverObject(a.manifest, corrupted), 'FragmentDigestMismatch'); + let called = false; + const f = { index: 0, get bytes() { called = true; return a.fragments[0].bytes; } }; + await rejects(() => verifyFragment(a.manifest, f), 'InvalidSchema'); + assert.equal(called, false); +}); + +test('recovery checks complete absent-fragment commitment, object, encoding and canonical padding', async () => { + const a = await createObject(new Uint8Array([1, 2, 3])); + const absent = clone(a.manifest); absent.fragments.digests[2] = 'sha256:' + '0'.repeat(64); + await rehash(absent); + await rejects(() => recoverObject(absent, a.fragments.slice(0, 2)), 'InvalidParity'); + const wrongObject = clone(a.manifest); wrongObject.object.contentDigest = 'sha256:' + '0'.repeat(64); + await rehash(wrongObject); + await rejects(() => recoverObject(wrongObject, a.fragments.slice(0, 2)), 'ObjectDigestMismatch'); + const wrongEncoding = clone(a.manifest); wrongEncoding.encoding.encodingDigest = 'sha256:' + '0'.repeat(64); + wrongEncoding.fragments.digests = await Promise.all(a.fragments.map(f => fragmentDigest(wrongEncoding.encoding.encodingDigest, f.index, f.bytes))); + await rehash(wrongEncoding); + await rejects(() => recoverObject(wrongEncoding, a.fragments.slice(0, 2)), 'EncodingDigestMismatch'); + const badPadding = a.fragments.map(f => ({ index: f.index, bytes: new Uint8Array(f.bytes) })); + badPadding[1].bytes[1] = 7; badPadding[2].bytes[1] ^= 7; + const paddingManifest = clone(a.manifest); + paddingManifest.fragments.digests = await Promise.all(badPadding.map(f => fragmentDigest(paddingManifest.encoding.encodingDigest, f.index, f.bytes))); + await rehash(paddingManifest); + await rejects(() => recoverObject(paddingManifest, badPadding.slice(0, 2)), 'InvalidPadding'); +}); + +test('placement requests and acknowledgements do not count before explicit commit', async () => { + const b = await createObject(bytes('custody')); + let s = await createPlacement(b.manifest); + const initial = s; + const p = { requestId: 'r0', index: 0, holder: 'p0', leaseExpiresAt: 1000 }; + s = await requestPlacement(s, p); + assert.equal(initial.requests.length, 0); + assert.equal(placementStatus(s, 10).committedFragments, 0); + await rejects(() => commitPlacement(s, 'r0', 10), 'InvalidTransition'); + s = await acknowledgePlacement(s, receipt(b, p), 10); + assert.equal(placementStatus(s, 10).committedFragments, 0); + assert.equal(placementStatus(s, 10).assertedCopies, 1); + s = await commitPlacement(s, 'r0', 10); + assert.equal(placementStatus(s, 10).canRecoverFromCommitted, false); + s = await place(s, b, 1); + assert.equal(placementStatus(s, 10).canRecoverFromCommitted, true); + assert.equal(placementStatus(s, 10).toleratesOneHolderLoss, false); + s = await place(s, b, 2); + assert.equal(placementStatus(s, 10).toleratesOneHolderLoss, true); + assert.equal(Object.isFrozen(s.requests[0]), true); + assert.equal(placementStatus(s, 1000).committedFragments, 0); +}); + +test('migration retains source on requested/failed/uncertain and accounts for superseded physical copies', async () => { + const b = await createObject(bytes('safe-migration')); + let s = await createPlacement(b.manifest); + for (let i = 0; i < 3; i++) s = await place(s, b, i); + const old = s; + const p = { requestId: 'migration', index: 0, holder: 'replacement', leaseExpiresAt: 1000 }; + s = await requestMigration(s, p); + assert.equal(placementStatus(s, 10).committedFragments, 3); + assert.equal(old.requests.length, 3); + const uncertain = await failPlacement(s, p.requestId, 'uncertain'); + assert.equal(placementStatus(uncertain, 10).committedFragments, 3); + assert.equal(placementStatus(uncertain, 10).uncertainTransfers, 1); + s = await acknowledgePlacement(s, receipt(b, p), 10); + assert.equal(placementStatus(s, 10).assertedCopies, 4); + const failed = await failPlacement(s, p.requestId); + assert.equal(placementStatus(failed, 10).assertedCopies, 4); + assert.equal(placementStatus(failed, 10).committedFragments, 3); + s = await commitPlacement(s, p.requestId, 10); + assert.equal(s.copies.find(c => c.holder === 'peer-0').status, 'superseded'); + assert.equal(placementStatus(s, 10).assertedCopies, 4); + s = await retirePlacement(s, { index: 0, holder: 'peer-0' }, 10); + assert.equal(placementStatus(s, 10).assertedCopies, 3); + assert.equal(placementStatus(s, 10).toleratesOneHolderLoss, true); +}); + +test('receipt binding, leases, replay, stale source and distinct-holder guards fail closed', async () => { + const b = await createObject(bytes('guards')); + let s = await createPlacement(b.manifest); + const p = { requestId: 'r', index: 0, holder: 'holder', leaseExpiresAt: 1000 }; + s = await requestPlacement(s, p); + for (const change of [r => { r.holder = 'other'; }, r => { r.index = 1; }, r => { r.manifestDigest = 'sha256:' + '0'.repeat(64); }, + r => { r.fragmentDigest = 'sha256:' + '0'.repeat(64); }, r => { r.leaseExpiresAt = 999; }]) { + const r = receipt(b, p); change(r); + await rejects(() => acknowledgePlacement(s, r, 10), 'ReceiptMismatch'); + } + await rejects(() => acknowledgePlacement(s, receipt(b, p), 1000), 'InvalidTransition'); + const ack = await acknowledgePlacement(s, receipt(b, p), 10); + await rejects(() => commitPlacement(ack, 'r', 9), 'ClockRegression'); + throws(() => placementStatus(ack, 9), 'ClockRegression'); + await rejects(() => commitPlacement(ack, 'r', 1000), 'InvalidTransition'); + await rejects(() => commitPlacement(ack, 'r'), 'InvalidSchema'); + s = await commitPlacement(ack, 'r', 10); + await rejects(() => acknowledgePlacement(s, receipt(b, p), 10), 'InvalidTransition'); + await rejects(() => requestPlacement(s, { requestId: 'same-holder', index: 1, holder: 'holder', leaseExpiresAt: 1000 }), 'HolderConflict'); + await rejects(() => requestPlacement(s, p), 'RequestConflict'); + const mp = { requestId: 'm', index: 0, holder: 'new-holder', leaseExpiresAt: 1000 }; + s = await requestMigration(s, mp); + s = await acknowledgePlacement(s, receipt(b, mp), 10); + s = await observeHolderLoss(s, 'holder'); + await rejects(() => commitPlacement(s, 'm', 10), 'StaleRequest'); + await rejects(() => retirePlacement(s, { index: 0, holder: 'new-holder' }, 10), 'InvalidTransition'); + const forged = clone(ack); forged.copies.push(clone(forged.copies[0])); + await rejects(() => commitPlacement(forged, 'r', 10), 'InvalidPlacement'); +}); + +test('concurrent target holder reuse cannot inflate recovery threshold', async () => { + const b = await createObject(bytes('same physical holder')); + let s = await createPlacement(b.manifest); + for (let i = 0; i < 2; i++) { + const p = { requestId: `r${i}`, index: i, holder: 'same', leaseExpiresAt: 1000 }; + s = await requestPlacement(s, p); + s = await acknowledgePlacement(s, receipt(b, p), 10); + } + s = await commitPlacement(s, 'r0', 10); + await rejects(() => commitPlacement(s, 'r1', 10), 'HolderConflict'); + assert.equal(placementStatus(s, 10).canRecoverFromCommitted, false); +}); + +function wire() { + const warm = [], nodes = []; + const node = peerId => { + const n = { peerId, peers: new Map(), sent: [], handlers: [], + openPeers() { return [...this.peers.keys()].map(remoteId => ({ remoteId })); }, + sendToPeer(remoteId, pkt) { + const target = this.peers.get(remoteId); + if (!target) return false; + this.sent.push({ remoteId, pkt: clone(pkt) }); + for (const h of target.handlers) h(this.peerId, clone(pkt)); + return true; + }, + broadcast(pkt) { let sent = 0; for (const id of this.peers.keys()) if (this.sendToPeer(id, pkt)) sent++; return sent; }, + async publishWarmEnvelope(pkt) { warm.push({ ...clone(pkt), from: this.peerId, tsMs: Date.now() }); return true; }, + async fetchWarmEnvelopes() { return clone(warm); }, + }; + n.db = new LiveUorMeshDatabase({ transport: n }); + n.handlers.push((from, msg) => n.db.handleMeshMessage(from, msg)); + nodes.push(n); + return n; + }; + const connect = (a, b) => { a.peers.set(b.peerId, b); b.peers.set(a.peerId, a); }; + const drain = async () => { for (let i = 0; i < 8; i++) await Promise.all(nodes.map(n => n.db.flush())); }; + return { node, connect, drain, warm }; +} + +test('live adapter places one fragment per distinct holder and recovers after a holder loss without relay', async () => { + const w = wire(), writer = w.node('writer'), holders = [w.node('h0'), w.node('h1'), w.node('h2')]; + for (const h of holders) w.connect(writer, h); + const entry = await writer.db.put('three separate fragment holders', { label: 'demo.txt' }); + await w.drain(); + assert.equal(w.warm.length, 0); + assert.equal(entry.addressHex, entry.manifest.object.contentDigest); + assert.equal(placementStatus(writer.db.placements.get(entry.addressHex), Date.now()).committedFragments, 3); + for (let i = 0; i < 3; i++) { + const e = holders[i].db.objects.get(entry.addressHex); + assert.deepEqual([...e.heldIndices], [i]); + assert.equal(e.shards.filter(Boolean).length, 1); + assert.equal(holders[i].db.get(entry.addressHex).ok, false); + } + writer.db.objects.clear(); // recovery no longer consults the creator's full copy + holders[2].db.objects.clear(); + const reader = w.node('reader'); + w.connect(reader, holders[0]); w.connect(reader, holders[1]); + await reader.db.syncFromNetwork(); await w.drain(); + assert.equal(reader.db.get(entry.addressHex).text, 'three separate fragment holders'); + const returned = reader.db.get(entry.addressHex).bytes; returned.fill(0); + assert.equal(reader.db.get(entry.addressHex).text, 'three separate fragment holders'); + assert.equal(reader.db.objects.get(entry.addressHex).shards.filter(Boolean).length, 2); + assert.deepEqual([...reader.db.objects.get(entry.addressHex).heldIndices], []); +}); + +test('live partial placement stays partial and legacy/corrupt/non-byte packets never become verified objects', async () => { + const w = wire(), a = w.node('a'), b = w.node('b'); w.connect(a, b); + const e = await a.db.put('partial'); await w.drain(); + assert.equal(placementStatus(a.db.placements.get(e.addressHex), Date.now()).committedFragments, 1); + assert.equal(b.db.get(e.addressHex).ok, false); + assert.equal(a.sent.filter(s => s.pkt.type === 'uor_shard').length, 1); + const victim = w.node('victim'); + assert.equal(await victim.db.ingestShardEnvelope({ type: 'uor_shard', addressHex: 'short', shardIndex: 0, shardBytes: [1] }), false); + const packet = clone(a.sent.find(s => s.pkt.type === 'uor_shard').pkt); + packet.purpose = 'recovery'; packet.requestId = null; packet.holder = null; packet.leaseExpiresAt = 0; + packet.shardBytes[0] ^= 1; + assert.equal(await victim.db.ingestShardEnvelope(packet), false); + for (const value of [-1, 256, 1.5, '2']) { + packet.shardBytes[0] = value; + assert.equal(await victim.db.ingestShardEnvelope(packet), false); + } + assert.equal(victim.db.objects.size, 0); +}); + +test('public relay requires explicit opt-in for publishing and recovery; cold reader needs retained information', async () => { + const w = wire(), writer = w.node('writer'); + await rejects(() => writer.db.put('private', { persistWarm: true }), 'PublicDataRequired'); + assert.equal(writer.db.objects.size, 0); assert.equal(w.warm.length, 0); + await rejects(() => writer.db.put(new Uint8Array(writer.db.maxWireObjectBytes + 1), { persistWarm: true, publicData: true }), 'SizeLimit'); + assert.equal(writer.db.objects.size, 0); + const entry = await writer.db.put('explicit public demo', { persistWarm: true, publicData: true }); + assert.equal(w.warm.length, 2); + writer.db.objects.clear(); + const reader = w.node('reader'); + assert.equal(await reader.db.syncFromNetwork(), 0); + assert.equal(reader.db.objects.size, 0); + assert.equal(await reader.db.syncFromNetwork('30m', { publicData: true }), 1); + assert.equal(reader.db.get(entry.addressHex).text, 'explicit public demo'); + w.warm.length = 0; + const cold = w.node('cold'); + assert.equal(await cold.db.syncFromNetwork('30m', { publicData: true }), 0); + assert.equal(cold.db.get(entry.addressHex).ok, false); +}); + +test('complete local put promotes a partial cache and repeated put honors a later relay opt-in', async () => { + const w = wire(), a = w.node('a'), b = w.node('b'); w.connect(a, b); + const original = await a.db.put('promote cached fragment'); await w.drain(); + assert.equal(b.db.get(original.addressHex).ok, false); + const promoted = await b.db.put('promote cached fragment'); await w.drain(); + assert.equal(b.db.get(original.addressHex).text, 'promote cached fragment'); + assert.deepEqual([...promoted.heldIndices], [0]); + assert.equal(b.db.placements.has(original.addressHex), true); + assert.equal(w.warm.length, 0); + await b.db.put('promote cached fragment', { persistWarm: true, publicData: true }); + assert.equal(w.warm.length, 2); + assert.equal(w.warm.every(p => p.from === 'b' && Number.isSafeInteger(p.tsMs)), true); +}); diff --git a/tests/dns-json.test.js b/tests/dns-json.test.js new file mode 100644 index 0000000..325b49b --- /dev/null +++ b/tests/dns-json.test.js @@ -0,0 +1,28 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { DohResolver, parseSrvRecord } from '../src/layer5-transport/index.js'; +const answer = (change = {}) => ({ name: 'wanted.example.', type: 16, TTL: 0, data: 'v=uor1;peer=peer', ...change }); +const resolve = body => new DohResolver({ format: "json", fetchImpl: async () => Response.json(body) }).resolve('wanted.example', 'TXT'); +test('SRV parsing rejects extra fields, non-UInt16 fields and invalid target names; root means unavailable', () => { + for (const value of ['-1 NaN 70000 target ignored', '-1 1 443 target', '1 65536 443 target', '1 1 65536 target', '1.5 1 443 target', '1 1 443 target extra', '1 1 443 bad..target', '1 1 443 _not-a-host.example', null]) assert.equal(parseSrvRecord(value), null, String(value)); + assert.deepEqual(parseSrvRecord('0 65535 65535 TARGET.Example.'), { priority: 0, weight: 65535, port: 65535, target: 'target.example' }); + assert.deepEqual(parseSrvRecord('0 0 0 .'), { priority: 0, weight: 0, port: 0, target: '.' }); +}); +test('provider JSON refuses NXDOMAIN, malformed status, truncation, unrelated owner/type and malformed TTL/class', async () => { + for (const Status of [undefined, -1, 3, '0', NaN]) await assert.rejects(resolve({ Status, Answer: [answer()] })); + for (const change of [{ name: 'wrong.example' }, { type: 1 }, { type: '16' }, { TTL: -1 }, { TTL: 0.5 }, { TTL: 2147483648 }, { TTL: undefined }, { class: 3 }, { data: null }]) await assert.rejects(resolve({ Status: 0, Answer: [answer(change)] }), JSON.stringify(change)); + for (const TC of [true, 'true', 1, null]) await assert.rejects(resolve({ Status: 0, TC, Answer: [answer()] })); + assert.equal((await resolve({ Status: 0, TC: false, Answer: [answer()] })).records.length, 1); + await assert.rejects(resolve({ Status: 0, Question: [{ name: 'other.example', type: 16 }], Answer: [answer()] })); +}); +test('JSON association accepts case/trailing-dot equivalence, zero TTL and one explicit CNAME chain', async () => { + const direct = await resolve({ Status: 0, Question: [{ name: 'WANTED.EXAMPLE.', type: 16 }], Answer: [answer({ name: 'WANTED.EXAMPLE' })] }); + assert.equal(direct.ttl_seconds, 0); assert.equal(direct.records[0].peer, 'peer'); + const aliased = await resolve({ Status: 0, Answer: [answer({ type: 5, TTL: 5, data: 'target.example.' }), answer({ name: 'target.example.', TTL: 30 })] }); + assert.equal(aliased.ttl_seconds, 5); assert.equal(aliased.records[0].peer, 'peer'); + for (const answers of [ + [answer({ type: 5, data: 'wanted.example.' })], + [answer({ type: 5, data: 'target.example' }), answer({ type: 5, data: 'other.example' })], + [answer({ type: 5, data: 'target.example' }), answer()] + ]) await assert.rejects(resolve({ Status: 0, Answer: answers })); +}); diff --git a/tests/dns-publication.test.js b/tests/dns-publication.test.js new file mode 100644 index 0000000..1b30dc9 --- /dev/null +++ b/tests/dns-publication.test.js @@ -0,0 +1,218 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { generateAuthority, signPointer, PointerPublisher, pointerDnsText, parsePointerDnsText } from '../src/layer1-uor/pointer.js'; +import { DohResolver } from '../src/layer5-transport/index.js'; +import { ResourceAdmission } from '../src/layer2-schedulers/policy.js'; + +const zoneId = 'a'.repeat(32), name = 'state.example.test'; +const code = expected => error => error.code === expected; +async function fixture() { + const authority = await generateAuthority(); + const make = (revision = 0, previousDigest = null, other = {}) => signPointer({ version: 1, name, + authorityKey: authority.publicKey, revision, previousDigest, objectRoot: 'sha256:' + 'f'.repeat(64), + validFromMs: 0, validUntilMs: 100, ...other }, authority.privateKey); + const first = await make(); + const calls = []; let rows = [], mode = 'success', listing = null; + const admission = new ResourceAdmission({ clock: () => 0 }); + const resolver = new DohResolver({ admission, fetchImpl: async (url, options) => { + const method = options.method ?? 'GET'; calls.push({ url, method, options }); + if (method === 'GET') { + if (mode === 'read-fails') throw Error('unavailable'); + return Response.json(listing ?? { success: true, result: rows, + result_info: { page: 1, count: rows.length, total_count: rows.length, total_pages: 1 } }); + } + if (mode === 'refused') return Response.json({ success: false, errors: [{ message: 'rejected' }] }, { status: 403 }); + if (mode === 'malformed') return new Response('broken'); + if (mode !== 'lost-not-created') rows = [{ id: 'record-1', ...JSON.parse(options.body) }]; + if (mode.startsWith('lost-')) throw Error('lost response'); + return Response.json({ success: true, result: { id: 'record-1' } }); + } }); + const publisher = new PointerPublisher({ resolver, clock: () => 5 }); + const args = candidate => ({ zoneId, apiToken: 'secret-token', name, trustedAuthorityKey: authority.publicKey, candidate }); + return { authority, make, first, calls, admission, resolver, publisher, args, + setMode(value) { mode = value; }, setRows(value) { rows = value; }, setListing(value) { listing = value; } }; +} + +test('lost POST response is reconciled by exact signed read without a duplicate write', async () => { + const f = await fixture(); f.setMode('lost-created'); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'unknown'); + assert.deepEqual(f.publisher.pending(f.args(f.first)), f.first); + assert.equal(JSON.stringify(f.publisher.pending(f.args(f.first))).includes('secret-token'), false); + const result = await f.publisher.publish(f.args(f.first)); + assert.equal(result.outcome, 'published'); assert.equal(result.reconciled, true); + assert.deepEqual(f.calls.map(c => c.method), ['GET', 'POST', 'GET']); + assert.equal(f.publisher.pending(f.args(f.first)), null); +}); + +test('unknown create with no visible record stays unknown across reads and zone case changes', async () => { + const f = await fixture(); f.setMode('lost-not-created'); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'unknown'); + assert.equal((await f.publisher.publish({ ...f.args(f.first), zoneId: zoneId.toUpperCase() })).outcome, 'unknown'); + f.setMode('read-fails'); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'unknown'); + assert.deepEqual(f.calls.map(c => c.method), ['GET', 'POST', 'GET', 'GET']); + const next = await f.make(1, f.first.pointerDigest); + assert.equal((await f.publisher.publish(f.args(next))).outcome, 'unknown'); + assert.equal(f.calls.length, 4); +}); + +test('successor publication reads exact predecessor and reuses provider ID for PUT', async () => { + const f = await fixture(); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'published'); + const next = await f.make(1, f.first.pointerDigest); + assert.equal((await f.publisher.publish(f.args(next))).outcome, 'published'); + assert.deepEqual(f.calls.map(c => c.method), ['GET', 'POST', 'GET', 'PUT']); + assert.ok(f.calls.at(-1).url.endsWith('/record-1')); + f.setRows([]); + await assert.rejects(f.publisher.publish(f.args(await f.make(2, next.pointerDigest))), code('dns-record-missing')); + assert.equal(f.calls.filter(c => c.method !== 'GET').length, 2); +}); + +test('foreign, forged, and conflicting DNS records never authorize overwrite', async () => { + const f = await fixture(); + const foreign = await generateAuthority(); + const wrong = await signPointer({ version: 1, name, authorityKey: foreign.publicKey, revision: 0, previousDigest: null, + objectRoot: 'sha256:' + 'a'.repeat(64), validFromMs: 0, validUntilMs: 100 }, foreign.privateKey); + const conflict = await f.make(0, null, { objectRoot: 'sha256:' + 'b'.repeat(64) }); + for (const candidate of [wrong, { ...f.first, signature: '0'.repeat(128) }, conflict]) { + f.setRows([{ id: 'record-1', name, type: 'TXT', content: pointerDnsText(candidate) }]); + await assert.rejects(f.publisher.publish(f.args(f.first))); + } + assert.ok(f.calls.every(c => c.method === 'GET')); +}); + +test('incomplete, paginated, multiple, and wrong-name provider listings refuse before mutation', async () => { + const f = await fixture(); + const row = { id: 'record-1', name, type: 'TXT', content: pointerDnsText(f.first) }; + for (const listing of [ + { success: true, result: [] }, + { success: true, result: [], result_info: { page: 1, count: 0, total_count: 1, total_pages: 2 } }, + { success: true, result: [row, row], result_info: { page: 1, count: 2, total_count: 2, total_pages: 1 } }, + { success: true, result: [{ ...row, name: 'other.test' }], result_info: { page: 1, count: 1, total_count: 1, total_pages: 1 } } + ]) { f.setListing(listing); await assert.rejects(f.publisher.publish(f.args(f.first))); } + assert.ok(f.calls.every(c => c.method === 'GET')); +}); + +test('provider rejection permits a later explicit retry; malformed mutation response remains unknown', async () => { + const f = await fixture(); f.setMode('refused'); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'refused'); + f.setMode('malformed'); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'unknown'); + f.setMode('success'); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'unknown'); + assert.deepEqual(f.calls.map(c => c.method), ['GET', 'POST', 'GET', 'POST', 'GET']); +}); + +test('concurrent calls refuse and candidate/credentials are snapshotted before async work', async () => { + const f = await fixture(); + const args = f.args(structuredClone(f.first)); + const work = f.publisher.publish(args); + args.apiToken = 'replacement-token'; args.zoneId = 'b'.repeat(32); args.candidate.objectRoot = 'sha256:' + '0'.repeat(64); + await assert.rejects(f.publisher.publish(f.args(f.first)), code('dns-publication-in-flight')); + assert.equal((await work).outcome, 'published'); + assert.equal(f.calls.filter(c => c.method === 'POST').length, 1); + for (const call of f.calls) { + assert.ok(call.url.includes(zoneId)); + assert.equal(call.options.headers.authorization, 'Bearer secret-token'); + } +}); + +test('DNS lookup reserves its bounded response before the GET and failed work retains charges', async () => { + let calls = 0; + const admission = new ResourceAdmission({ clock: () => 0, + limit: { requests: 1, transferBytes: 1000000, storageBytes: 0, computeSteps: 0 } }); + const resolver = new DohResolver({ admission, fetchImpl: async () => { calls++; throw Error('network'); } }); + await assert.rejects(resolver.listCloudflareRecords({ zoneId, apiToken: 'secret-token', name }), /network/); + assert.equal(admission.state.spent.requests, 1); + assert.ok(admission.state.spent.transferBytes >= resolver.maxResponseBytes); + await assert.rejects(resolver.listCloudflareRecords({ zoneId, apiToken: 'secret-token', name }), code('budget-exhausted')); + assert.equal(calls, 1); +}); + +test('uncertain PUT does not repeat against a still-visible predecessor', async () => { + const f = await fixture(); + await f.publisher.publish(f.args(f.first)); + const next = await f.make(1, f.first.pointerDigest); + f.setMode('lost-not-created'); + assert.equal((await f.publisher.publish(f.args(next))).outcome, 'unknown'); + assert.equal((await f.publisher.publish(f.args(next))).outcome, 'unknown'); + assert.deepEqual(f.calls.map(c => c.method), ['GET', 'POST', 'GET', 'PUT', 'GET']); +}); + +test('expired unresolved candidate can still reconcile its earlier provider write', async () => { + const f = await fixture(); f.setMode('lost-created'); + await f.publisher.publish(f.args(f.first)); + f.publisher.clock = () => 200; + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'published'); + assert.deepEqual(f.calls.map(c => c.method), ['GET', 'POST', 'GET']); +}); + +test('publication-state capacity is reserved before provider I/O', async () => { + const f = await fixture(); + f.resolver.admission = new ResourceAdmission({ clock: () => 0, + limit: { requests: 10, transferBytes: 1000000, storageBytes: 0, computeSteps: 0 } }); + await assert.rejects(f.publisher.publish(f.args(f.first)), code('budget-exhausted')); + assert.equal(f.calls.length, 0); + assert.equal(f.publisher.pending(f.args(f.first)), null); +}); + +test('definite local write refusal preserves spent reads but permits explicit repair and retry', async () => { + const f = await fixture(); + const admission = new ResourceAdmission({ clock: () => 0, + limit: { requests: 1, transferBytes: 1000000, storageBytes: 10000, computeSteps: 0 } }); + f.resolver.admission = admission; + await assert.rejects(f.publisher.publish(f.args(f.first)), code('budget-exhausted')); + assert.deepEqual(f.calls.map(c => c.method), ['GET']); + assert.equal(admission.state.spent.requests, 1); + assert.equal(f.publisher.status(f.args(f.first)).outcome, 'refused'); + assert.equal(f.publisher.status(f.args(f.first)).canPublish, true); + assert.equal(f.publisher.pending(f.args(f.first)), null); + f.resolver.admission = new ResourceAdmission({ clock: () => 0 }); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'published'); + assert.equal(admission.state.spent.requests, 1, 'repair never refunds the previous read'); + assert.deepEqual(f.calls.map(c => c.method), ['GET', 'GET', 'POST']); +}); + +test('an unclassified writer exception is unresolved and never implicitly retried', async () => { + const f = await fixture(); let mutations = 0; + f.resolver.writeCloudflareRecord = async () => { mutations++; throw Error('response lost after possible dispatch'); }; + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'unknown'); + assert.equal(f.publisher.status(f.args(f.first)).canPublish, false); + assert.equal(f.publisher.status(f.args(f.first)).canReconcile, true); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'unknown'); + assert.equal(mutations, 1); + assert.deepEqual(f.calls.map(c => c.method), ['GET', 'GET']); +}); + +test('success for a different provider record ID remains uncertain and cannot enable another PUT', async () => { + const f = await fixture(); await f.publisher.publish(f.args(f.first)); + const next = await f.make(1, f.first.pointerDigest); let writes = 0; + f.resolver.writeCloudflareRecord = async () => { writes++; return { ok: true, outcome: 'published', id: 'different-record' }; }; + assert.equal((await f.publisher.publish(f.args(next))).outcome, 'unknown'); + assert.equal(f.publisher.status(f.args(next)).recordId, 'record-1'); + assert.equal((await f.publisher.publish(f.args(next))).outcome, 'unknown'); + assert.equal(writes, 1); +}); + +test('a dispatched provider 503 JSON failure stays unknown and cannot authorize another write', async () => { + const f = await fixture(); let writes = 0; + const original = f.resolver.fetchImpl; + f.resolver.fetchImpl = async (url, options) => { + if (options.method) { writes++; return Response.json({ success: false, errors: [{ code: 1000 }] }, { status: 503 }); } + return original(url, options); + }; + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'unknown'); + assert.equal((await f.publisher.publish(f.args(f.first))).outcome, 'unknown'); + assert.equal(writes, 1); +}); + +test('duplicate or escape-equivalent keys in an externally signed DNS pointer are rejected before verification/write', async () => { + const f = await fixture(); + for (const key of ['objectRoot', 'object\\u0052oot']) { + const raw = `{"${key}":"sha256:${'0'.repeat(64)}",${JSON.stringify(f.first).slice(1)}`; + assert.throws(() => parsePointerDnsText(raw), /Duplicate|duplicate/); + f.setRows([{ id: 'record-1', name, type: 'TXT', content: raw }]); + await assert.rejects(f.publisher.publish(f.args(f.first)), /Duplicate|duplicate/); + } + assert.ok(f.calls.every(call => call.method === 'GET')); +}); diff --git a/tests/dns-wire.test.js b/tests/dns-wire.test.js new file mode 100644 index 0000000..7d23eaa --- /dev/null +++ b/tests/dns-wire.test.js @@ -0,0 +1,88 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { encodeDnsQuery, decodeDnsResponse, queryDnsMessage, readBoundedDnsBytes } from '../src/layer5-transport/dns-wire.js'; +const u16=n=>[n>>8&255,n&255],u32=n=>[n>>>24,n>>>16&255,n>>>8&255,n&255]; +const name=s=>s==='.'?[0]:[...s.split('.').flatMap(l=>[l.length,...Buffer.from(l)]),0]; +const txt=s=>[Buffer.byteLength(s),...Buffer.from(s)]; +function answer({type=16,ttl=60,owner=[0xc0,0x0c],data=txt('hello'),klass=1}={}){return [...owner,...u16(type),...u16(klass),...u32(ttl),...u16(data.length),...data];} +function packet({query=encodeDnsQuery('example.test','TXT'),flags=0x8180,answers=[answer()],authority=[],additional=[]}={}){ + const q=query.bytes;return Uint8Array.from([0,0,...u16(flags),0,1,...u16(answers.length),...u16(authority.length),...u16(additional.length),...q.subarray(12),...answers.flat(),...authority.flat(),...additional.flat()]); +} +const expected=encodeDnsQuery('example.test','TXT'); +const reject=(p,code)=>assert.throws(()=>decodeDnsResponse(p,expected),e=>!code||e.code===code); +test('RFC8484 query uses ID0, recursion desired, typed IN question and valid DNS names',()=>{ + assert.equal(Buffer.from(encodeDnsQuery('www.example.com','A').bytes).toString('hex'),'00000100000100000000000003777777076578616d706c6503636f6d0000010001'); + assert.equal(encodeDnsQuery('BÜCHER.Example.','TXT').name,'xn--bcher-kva.example'); + assert.equal(encodeDnsQuery('_stitch._udp.example.test','SRV').type,33); + for(const value of ['bad..name','https://example.test','a'.repeat(64)+'.test','user@host','one test'])assert.throws(()=>encodeDnsQuery(value)); + for(const type of [0,65536,'BOGUS'])assert.throws(()=>encodeDnsQuery('example.test',type)); +}); +test('DNS compressed owners, complete TXT strings, SRV and opaque unknown RDATA decode',()=>{ + const response=decodeDnsResponse(packet({answers:[answer({data:[...txt('one'),...txt('two')]})]}),expected,{ageSeconds:7}); + assert.equal(response.selected[0].data,'"one" "two"');assert.equal(response.ttlSeconds,53); + const query=encodeDnsQuery('_stitch._udp.example.test','SRV'); + const srv=decodeDnsResponse(packet({query,answers:[answer({type:33,data:[...u16(2),...u16(3),...u16(443),...name('target.example.test')]})]}),query); + assert.deepEqual(srv.selected[0].srv,{priority:2,weight:3,port:443,target:'target.example.test'}); + const unknown=encodeDnsQuery('example.test',65000); + assert.equal(decodeDnsResponse(packet({query:unknown,answers:[answer({type:65000,data:[1,2,3]})]}),unknown).selected[0].data,'\\# 3 010203'); +}); +test('CNAME association, negative SOA lifetime and Age never become signature or DNSSEC proof',()=>{ + const result=decodeDnsResponse(packet({answers:[answer({type:5,ttl:5,data:name('target.test')}),answer({owner:name('target.test'),ttl:90})]}),expected,{ageSeconds:6}); + assert.equal(result.selected.length,1);assert.equal(result.ttlSeconds,0); + const soa=[...name('ns.example.test'),...name('hostmaster.example.test'),...u32(1),...u32(2),...u32(3),...u32(4),...u32(30)]; + const negative=decodeDnsResponse(packet({flags:0x81a3,answers:[],authority:[answer({type:6,ttl:60,data:soa})]}),expected,{ageSeconds:10}); + assert.equal(negative.negative,true);assert.equal(negative.status,3);assert.equal(negative.ttlSeconds,20);assert.equal(negative.authenticatedData,true);assert.equal(negative.dnssecValidatedByClient,false); + assert.equal(decodeDnsResponse(packet({answers:[answer({ttl:0xffffffff})]}),expected).ttlSeconds,0); +}); +test('malformed/truncated/compression/header/question and RDATA cases fail before association',()=>{ + const valid=packet();for(let i=0;i{ + for(const [method,endpoint] of [['POST','https://resolver.test/dns-query{?dns}'],['GET','https://resolver.test/dns-query{?dns}'],['GET','https://resolver.test/dns-query?x=1'],['GET','https://resolver.test/dns-query?dns={dns}']]){ + const reservations=[],calls=[]; + const result=await queryDnsMessage({name:'example.test',type:'TXT',method,endpoint,admission:{reserve:(...args)=>reservations.push(args)},fetchImpl:async(url,options)=>{calls.push({url,options});return new Response(packet(),{headers:{'content-type':'application/dns-message','age':'5'}});}}); + const {url,options}=calls[0];assert.equal(options.headers.accept,'application/dns-message');assert.equal(options.credentials,'omit');assert.equal(options.referrerPolicy,'no-referrer');assert.equal(result.ttlSeconds,55);assert.equal(reservations.length,1); + if(method==='POST'){assert.deepEqual(options.body,expected.bytes);assert.equal(options.headers['content-type'],'application/dns-message');} + else{const encoded=new URL(url).searchParams.get('dns');assert.ok(/^[A-Za-z0-9_-]+$/.test(encoded));assert.deepEqual(new Uint8Array(Buffer.from(encoded,'base64url')),expected.bytes);assert.equal(options.body,undefined);} + } +}); +test('HTTP errors/media/age/endpoint and oversized body never produce DNS success',async()=>{ + for(const response of [new Response('bad',{status:503}),new Response(packet(),{headers:{'content-type':'application/json'}}),new Response(packet(),{headers:{'content-type':'application/dns-message','age':'-1'}})])await assert.rejects(queryDnsMessage({name:'example.test',fetchImpl:async()=>response})); + for(const endpoint of ['http://resolver.test/dns-query','https://user:pass@resolver.test/dns-query','https://resolver.test/path#fragment'])await assert.rejects(queryDnsMessage({name:'example.test',endpoint,fetchImpl:()=>{throw Error('must not fetch');}})); + let cancelled=false;await assert.rejects(readBoundedDnsBytes(new Response(new ReadableStream({pull(c){c.enqueue(new Uint8Array(65536));},cancel(){cancelled=true;}}))),e=>e.code==='response-limit');assert.equal(cancelled,true); +}); +test('TXT bytes can cross UTF8 boundaries; ANY returns owner alias without chasing away answer',()=>{ + const result=decodeDnsResponse(packet({answers:[answer({data:[1,0xe2,2,0x82,0xac]})]}),expected); + assert.equal(result.selected[0].text,'€'); + const query=encodeDnsQuery('example.test','ANY'); + assert.equal(decodeDnsResponse(packet({query,answers:[answer({type:5,data:name('target.test')})]}),query).selected[0].type,5); +}); +test('default public resolver uses actual DNS-message; vendor JSON remains explicit',async()=>{ + const {DohResolver}=await import('../src/layer5-transport/index.js');let sent; + const resolver=new DohResolver({fetchImpl:async(url,options)=>{sent=options;return new Response(packet(),{headers:{'content-type':'application/dns-message'}});}}); + const result=await resolver.resolve('example.test','TXT');assert.equal(sent.headers['content-type'],'application/dns-message');assert.deepEqual(result.rawRecords,['hello']);assert.equal(result.cache_hit_inferred,false); +}); +test('SRV forbids target compression and OPT belongs only in Additional',()=>{ + const query=encodeDnsQuery('example.test','SRV'); + assert.throws(()=>decodeDnsResponse(packet({query,answers:[answer({type:33,data:[0,0,0,0,0,80,0xc0,0x0c]})]}),query),e=>e.code==='dns-name-compression-forbidden'); + reject(packet({answers:[answer({owner:[0],type:41,data:[],klass:4096})]}),'dns-opt-section'); + reject(packet({answers:[],authority:[answer({owner:[0],type:41,data:[],klass:4096})]}),'dns-opt-section'); +}); +test('negative CNAME result lifetime includes alias chain and hidden CORS Age is not zero evidence',async()=>{ + const soa=[...name('ns.test'),...name('mail.test'),...u32(1),...u32(2),...u32(3),...u32(4),...u32(30)]; + const data=packet({flags:0x8183,answers:[answer({type:5,ttl:1,data:name('target.test')})],authority:[answer({owner:name('test'),type:6,ttl:60,data:soa})]}); + assert.equal(decodeDnsResponse(data,expected).ttlSeconds,1); + const response=new Response(packet(),{headers:{'content-type':'application/dns-message'}});Object.defineProperty(response,'type',{value:'cors'}); + const result=await queryDnsMessage({name:'example.test',fetchImpl:async()=>response});assert.equal(result.selected.length,1);assert.equal(result.ttlSeconds,0);assert.equal(result.httpAgeObserved,false); +}); diff --git a/tests/effects-model.test.js b/tests/effects-model.test.js new file mode 100644 index 0000000..1da739f --- /dev/null +++ b/tests/effects-model.test.js @@ -0,0 +1,161 @@ +/** Finite refinement oracles and planted source defects, not compiler certification. */ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { cpSync, mkdtempSync, readFileSync, writeFileSync, rmSync } from 'node:fs'; +import { spawnSync } from 'node:child_process'; +import { tmpdir } from 'node:os'; +import { resolve, dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { model, MODEL_SOURCE, modelExecutionDigest } from '../src/layer1-uor/generated-model.js'; +import { dnsWriteState, dnsWriteOutcome, dnsLifecycle } from '../src/layer1-uor/effects.js'; +const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); +const bytes = value => new TextEncoder().encode(value); +const tag = value => ({ tag: value, fields: [] }); +const call = (name, ...args) => model[`Stitch.Effects.${name}`](...args); +const scope = { zoneId: bytes('zone'), name: bytes('name.example'), authorityKey: bytes('pinned-key') }; +const candidate = { scope, pointerDigest: bytes('candidate'), previousDigest: bytes('previous'), hasPrevious: true, + revision: 2, validFrom: 10, validUntil: 20 }; +const publication = phase => ({ scope, phase: tag(phase), pointerDigest: bytes('candidate'), recordId: bytes('record-1'), hasRecordId: true }); +const read = { scope, candidateDigest: candidate.pointerDigest, complete: true, authenticated: true, recordPresent: true, + recordId: bytes('record-1'), pointerDigest: bytes('previous'), revision: 1 }; + +test('transport admissions exactly correlate current topic, local/remote identity, generation and live object facts', () => { + for (const closed of [false, true]) for (let generation = 0; generation < 3; generation++) + for (let callbackGeneration = 0; callbackGeneration < 3; callbackGeneration++) + for (const topic of ['mesh', 'mesh-other']) for (const local of ['local', 'local-other']) + for (const remote of ['remote', 'remote-other']) for (const entryCurrent of [false, true]) for (const channelCurrent of [false, true]) { + const state = { generation, closed, channelKey: bytes('mesh'), localPeer: bytes('local') }; + const callback = { generation: callbackGeneration, channelKey: bytes(topic), localPeer: bytes(local), remotePeer: bytes(remote) }; + const current = !closed && generation === callbackGeneration && topic === 'mesh' && local === 'local'; + assert.equal(call('transportSessionMatches', state, callback), current); + assert.equal(call('transportPeerCallbackAllowed', state, callback, bytes('remote'), entryCurrent), current && remote === 'remote' && entryCurrent); + assert.equal(call('transportChannelCallbackAllowed', state, callback, bytes('remote'), entryCurrent, channelCurrent), current && remote === 'remote' && entryCurrent && channelCurrent); + const reopened = call('transportOpen', call('transportClose', state), state.channelKey); + assert.equal(reopened.generation, BigInt(generation + 1)); + assert.equal(call('transportSessionMatches', reopened, { ...callback, generation }), false); + } +}); + +test('VM source reducers match an independent phase machine and never resurrect stale instances', () => { + for (const phase of ['Idle', 'Booting', 'Ready', 'Failed']) for (let generation = 0; generation < 3; generation++) + for (let observedGeneration = 0; observedGeneration < 3; observedGeneration++) for (const instanceCurrent of [false, true]) for (const ready of [false, true]) { + const state = { generation, phase: tag(phase) }, canonical = { ...state, generation: BigInt(generation) }; + const canBoot = phase === 'Idle' || phase === 'Failed', booting = phase === 'Booting', executable = phase === 'Ready'; + assert.equal(call('vmCanBoot', state), canBoot); + assert.equal(call('vmIsBooting', state), booting); + assert.equal(call('vmCanExecute', state), executable); + assert.deepEqual(call('vmStart', state), canBoot ? { generation: BigInt(generation + 1), phase: tag('Booting') } : canonical); + assert.equal(call('vmCallbackAllowed', state, observedGeneration, instanceCurrent), generation === observedGeneration && instanceCurrent && (booting || executable)); + assert.deepEqual(call('vmFail', state, observedGeneration), generation === observedGeneration && booting ? { generation: BigInt(generation + 1), phase: tag('Failed') } : canonical); + assert.deepEqual(call('vmObserveReady', state, observedGeneration, instanceCurrent, ready), generation === observedGeneration && booting && instanceCurrent && ready ? { generation: BigInt(generation), phase: tag('Ready') } : canonical); + } +}); + +test('C1 source progress rejects duplicate/out-of-order/window-mismatched probes and requires exact frozen qualification', () => { + for (let consecutive = 0; consecutive <= 12; consecutive++) for (const hasSequence of [false, true]) + for (let lastSequence = 0; lastSequence <= 2; lastSequence++) for (let sequence = 0; sequence <= 4; sequence++) + for (const now of [0, 1, 10000000, 10000001]) for (const correlated of [false, true]) { + const progress = { startedAt: 0, lastSequence, hasSequence, consecutive }; + const accepted = correlated && now <= 10000000 && (!hasSequence || lastSequence < sequence); + assert.equal(call('c1ProbeAccepted', progress, sequence, now, correlated), accepted); + const next = call('c1ObserveProbe', progress, sequence, now, correlated); + const count = accepted ? hasSequence && lastSequence + 1 === sequence ? consecutive + 1 : 1 : consecutive; + assert.equal(next.consecutive, BigInt(count)); + assert.equal(next.lastSequence, BigInt(accepted ? sequence : lastSequence)); + for (const ordered of [false, true]) for (const observed of [false, true]) for (const relay of [false, true]) { + assert.equal(call('c1ConnectionQualified', progress, now, ordered), ordered && consecutive >= 10 && now <= 10000000); + assert.equal(call('c1DirectSuccess', progress, now, ordered, observed, relay), ordered && consecutive >= 10 && now <= 10000000 && observed && !relay); + } + } +}); + +test('unresolved DNS reads never authorize create/update for any observation flag combination', () => { + for (const phase of ['Idle', 'Published', 'Refused', 'Unknown']) for (let flags = 0; flags < 32; flags++) { + const exact = !!(flags & 1), present = !!(flags & 2), predecessor = !!(flags & 4), bootstrap = !!(flags & 8), live = !!(flags & 16); + const expected = exact ? 'Reconciled' : phase === 'Unknown' ? 'Wait' + : !live ? 'Refuse' : present ? predecessor ? 'Update' : 'Refuse' : bootstrap ? 'Create' : 'Refuse'; + assert.equal(call('dnsSelectRead', tag(phase), exact, present, predecessor, bootstrap, live).tag, expected); + if (phase === 'Unknown') assert.equal(call('dnsDecisionWrites', tag(expected)), false); + } + for (const phase of ['Idle', 'Published', 'Refused', 'Unknown']) { + const state = publication(phase); + assert.equal(call('dnsReadDecision', state, candidate, read, 15).tag, phase === 'Unknown' ? 'Wait' : 'Update'); + assert.equal(call('dnsReadDecision', state, candidate, { ...read, pointerDigest: candidate.pointerDigest }, 100).tag, 'Reconciled'); + for (const field of ['zoneId', 'name', 'authorityKey']) { + const otherScope = { ...scope, [field]: bytes('wrong') }; + assert.equal(call('dnsRequestAllowed', { ...state, scope: otherScope }, candidate, false), false); + assert.equal(call('dnsReadDecision', state, candidate, { ...read, scope: otherScope }, 15).tag, 'Refuse'); + } + for (const observation of [{ ...read, complete: false }, { ...read, authenticated: false }, { ...read, recordId: bytes('record-2') }, { ...read, candidateDigest: bytes('another-candidate') }]) { + assert.equal(call('dnsReadDecision', state, candidate, observation, 15).tag, 'Refuse'); + } + assert.equal(call('dnsRequestAllowed', state, candidate, true), false); + } + assert.equal(call('dnsReadDecision', publication('Unknown'), { ...candidate, pointerDigest: bytes('different') }, read, 15).tag, 'Refuse'); + const initial = { ...publication('Idle'), hasRecordId: false, recordId: bytes('') }; + const absent = { ...read, recordPresent: false, authenticated: false, recordId: bytes('') }; + assert.equal(call('dnsReadDecision', initial, { ...candidate, hasPrevious: false, revision: 0 }, absent, 15).tag, 'Create'); + assert.equal(call('dnsReadDecision', initial, candidate, absent, 15).tag, 'Refuse'); + for (const now of [9, 20]) assert.equal(call('dnsReadDecision', publication('Published'), candidate, read, now).tag, 'Refuse'); +}); + +test('DNS completion consumes only matching scope/candidate and exact retained provider record ID', () => { + const state = publication('Unknown'), result = { scope, candidateDigest: candidate.pointerDigest, recordId: bytes('record-1'), recordIdValid: true, acknowledged: true, refused: false }; + assert.equal(call('dnsFinishWrite', state, result).phase.tag, 'Published'); + for (const field of ['zoneId', 'name', 'authorityKey']) { + assert.equal(call('dnsFinishWrite', state, { ...result, scope: { ...scope, [field]: bytes('wrong') } }).phase.tag, 'Unknown'); + } + for (const resultChange of [{ candidateDigest: bytes('wrong') }, { recordId: bytes('replacement-id') }, { recordIdValid: false }, { acknowledged: false }]) { + assert.equal(call('dnsFinishWrite', state, { ...result, ...resultChange }).phase.tag, 'Unknown'); + } + assert.equal(call('dnsFinishWrite', state, { ...result, acknowledged: false, refused: true }).phase.tag, 'Refused'); + assert.equal(call('dnsFinishWrite', state, { ...result, acknowledged: true, refused: true }).phase.tag, 'Unknown', 'contradictory observation must not enable a retry'); + assert.equal(call('dnsFinishWrite', publication('Published'), result).phase.tag, 'Published'); +}); + +test('DNS adapter cannot turn a Wait reducer no-op into write admission', () => { + const destination = { zoneId: 'zone', name: 'name.example', trustedAuthorityKey: 'key' }; + const pointer = { pointerDigest: 'candidate', previousDigest: null, revision: 0, validFromMs: 0, validUntilMs: 10 }; + const pending = { outcome: 'unknown', pointerDigest: 'candidate', recordId: null, candidate: pointer }; + assert.throws(() => dnsWriteState(destination, pending, pointer, null, null, 5), /refused DNS write admission/); + const begun = dnsWriteState(destination, undefined, pointer, null, null, 5); + assert.equal(begun.outcome, 'unknown'); + assert.equal(dnsWriteOutcome(destination, begun, { ok: true, outcome: 'published', id: 'new-record' }), 'published'); + assert.equal(dnsWriteOutcome(destination, { ...begun, recordId: 'old-record' }, { ok: true, outcome: 'published', id: 'new-record' }), 'unknown'); + assert.deepEqual(dnsLifecycle(pending), { outcome: 'unknown', recordId: null, pointerDigest: 'candidate', canPublish: false, canReconcile: true }); + assert.equal(dnsLifecycle(pending, true).canReconcile, false); +}); + +function mutatedRuntime(t, name, change, testFile) { + const directory = mkdtempSync(join(tmpdir(), `stitch-effects-${name}-`)); + t.after(() => rmSync(directory, { recursive: true, force: true })); + for (const path of ['app/src', 'app/language', 'src', 'scripts/check-model.mjs', `tests/${testFile}`]) cpSync(resolve(root, path), resolve(directory, path), { recursive: true }); + writeFileSync(resolve(directory, 'package.json'), '{"type":"module"}'); + const source = resolve(directory, 'app/src/Stitch/Effects.lex.tex'), before = readFileSync(source, 'utf8'), after = change(before); + assert.notEqual(after, before, name); writeFileSync(source, after); + const generated = spawnSync(process.execPath, ['scripts/check-model.mjs', '--write', '--inventory'], { cwd: directory, encoding: 'utf8', maxBuffer: 8 * 1024 * 1024 }); + assert.equal(generated.status, 0, generated.stderr); + const inventory = JSON.parse(generated.stdout); + assert.equal(inventory.executionDigest, modelExecutionDigest, 'host lifecycle policy is outside replay execution semantics'); + assert.notEqual(inventory.sourceDigest, MODEL_SOURCE.sourceDigest); + const environment = { ...process.env }; delete environment.NODE_TEST_CONTEXT; + const arguments_ = ['--test', '--test-reporter=tap', ...(name === 'stale-vm' ? ['--test-name-pattern=boot deadline'] : []), `tests/${testFile}`]; + const run = spawnSync(process.execPath, arguments_, { cwd: directory, encoding: 'utf8', timeout: 10000, env: environment }); + assert.equal(run.error, undefined, run.error?.message); + assert.notEqual(run.status, 0, `runtime regression suite survived source mutation ${name}\n${run.stdout}`); + assert.match(run.stdout, /fail [1-9]/); +} +const replaceBody = (source, name, body) => { + const start = source.indexOf(` name: ${name},`), begin = source.indexOf(' body:', start), end = source.indexOf('\n}', begin); + assert.ok(start >= 0 && begin > start && end > begin); + return source.slice(0, begin) + ` body: ${body}` + source.slice(end); +}; +for (const [name, change, testFile] of [ + ['stale-session', s => replaceBody(s, 'transportSessionMatches', 'true'), 'transport-generation.test.js'], + ['channel-replacement', s => replaceBody(s, 'transportChannelCallbackAllowed', '(transportPeerCallbackAllowed state callback remotePeer entryCurrent)'), 'transport-generation.test.js'], + ['concurrent-dns', s => replaceBody(s, 'dnsRequestAllowed', 'true'), 'dns-publication.test.js'], + ['repeat-unknown-dns', s => s.replace('| DnsPhase.Unknown => false)', '| DnsPhase.Unknown => true)'), 'dns-publication.test.js'], + ['stale-vm', s => replaceBody(s, 'vmCallbackAllowed', 'true'), 'vm-lifecycle.test.js'], + ['duplicate-boot', s => replaceBody(s, 'vmCanBoot', 'true'), 'vm-lifecycle.test.js'], + ['connection-window', s => replaceBody(s, 'c1ConnectionQualified', 'true'), 'connection-measurement.test.js'] +]) test(`actual runtime regression rejects source defect: ${name}`, t => mutatedRuntime(t, name, change, testFile)); diff --git a/tests/execution-identity.test.js b/tests/execution-identity.test.js new file mode 100644 index 0000000..b2919b2 --- /dev/null +++ b/tests/execution-identity.test.js @@ -0,0 +1,83 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { cpSync, mkdtempSync, readFileSync, writeFileSync, rmSync } from 'node:fs'; +import { spawnSync } from 'node:child_process'; +import { tmpdir } from 'node:os'; +import { dirname, resolve, join } from 'node:path'; +import { fileURLToPath, pathToFileURL } from 'node:url'; + +const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); +function build(t, mutate = () => {}) { + const dir = mkdtempSync(join(tmpdir(), 'stitch-execution-identity-')); + t.after(() => rmSync(dir, { recursive: true, force: true })); + for (const path of ['scripts/check-model.mjs', 'app/src', 'app/language', 'src/layer1-uor', 'src/layer4-compute/replay.js']) { + cpSync(resolve(root, path), resolve(dir, path), { recursive: true }); + } + writeFileSync(resolve(dir, 'package.json'), '{"type":"module"}'); + mutate((path, change) => { + const target = resolve(dir, path), before = readFileSync(target, 'utf8'), after = change(before); + assert.notEqual(after, before, `mutation must change ${path}`); writeFileSync(target, after); + }); + const result = spawnSync(process.execPath, ['scripts/check-model.mjs', '--write', '--inventory'], { cwd: dir, encoding: 'utf8', maxBuffer: 8 * 1024 * 1024 }); + assert.equal(result.status, 0, result.stderr); + const check = spawnSync(process.execPath, ['scripts/check-model.mjs', '--check'], { cwd: dir, encoding: 'utf8' }); + assert.equal(check.status, 0, check.stderr); + return { dir, inventory: JSON.parse(result.stdout), runtime: () => import(pathToFileURL(resolve(dir, 'src/layer4-compute/replay.js')).href) }; +} +const program = { version: 1, bits: 8, initialValueHex: '0x0', instructions: [{ op: 2 }] }; + +test('execution closure identifies actual ring and checkpoint roots, interpreter and transitive adapters', t => { + const { inventory } = build(t); + assert.match(inventory.executionDigest, /^sha256:[a-f0-9]{64}$/); + assert.notEqual(inventory.executionDigest, inventory.sourceDigest); + assert.deepEqual(inventory.executionIdentity.roots, ["Stitch.Compute.checkpointLinkAllowed", "Stitch.Compute.instructionWork", "Stitch.Compute.ringStep", "Stitch.Compute.typedInstructionAllowed", "Stitch.Compute.typedInstructionWork", "Stitch.Compute.typedResultBits", "Stitch.Compute.typedStep"]); + assert.deepEqual(Object.keys(inventory.executionIdentity.definitions), ["Stitch.Compute.arithmeticWidth", "Stitch.Compute.binaryLength", "Stitch.Compute.binaryLengthAcc", "Stitch.Compute.bitwiseAcc", "Stitch.Compute.byteWidth", "Stitch.Compute.checkpointLinkAllowed", "Stitch.Compute.concatWords", "Stitch.Compute.instructionAllowed", "Stitch.Compute.instructionWork", "Stitch.Compute.natBitwise", "Stitch.Compute.naturalPower", "Stitch.Compute.normalize", "Stitch.Compute.operandWidth", "Stitch.Compute.powerWork", "Stitch.Compute.powerWorkAcc", "Stitch.Compute.ringModulus", "Stitch.Compute.ringPow", "Stitch.Compute.ringStep", "Stitch.Compute.typedInstructionAdmission", "Stitch.Compute.typedInstructionAllowed", "Stitch.Compute.typedInstructionWork", "Stitch.Compute.typedResultBits", "Stitch.Compute.typedStep"]); + assert.deepEqual(Object.keys(inventory.executionIdentity.types), ["Stitch.Compute.Instruction", "Stitch.Compute.TypedInstruction", "Stitch.Compute.Word"]); + assert.deepEqual(inventory.executionIdentity.adapterSources.map(s => s.path), [ + 'src/layer1-uor/contracts.js', 'src/layer1-uor/custody.js', 'src/layer1-uor/index.js', 'src/layer4-compute/replay.js' + ]); +}); + +test('source formatting, proof-only and unrelated product changes preserve replay compatibility but not provenance', async t => { + const base = build(t), baseline = await base.runtime(), checkpoint = await baseline.createCheckpoint(program, 1); + for (const mutate of [ + edit => edit('app/src/Stitch/Compute.lex.tex', s => s.replace(' name: ringStep,', ' name: ringStep,')), + edit => edit('app/src/Stitch/Compute.lex.tex', s => s.replace('proof: reflexivity{}', 'proof: simplify{definitions: [checkpointLinkAllowed]}')), + edit => edit('app/src/Product/Architecture.lex.tex', s => s.replace('Conditional recovery and honest assurance', 'Recovery and precise assurance')), + edit => edit('app/src/Stitch/Budget.lex.tex', s => s.replace('(reserved + cost)', '(reserved + (cost + 1))')) + ]) { + const changed = build(t, mutate); + assert.notEqual(changed.inventory.sourceDigest, base.inventory.sourceDigest); + assert.equal(changed.inventory.executionDigest, base.inventory.executionDigest); + const runtime = await changed.runtime(); + assert.equal((await runtime.verifyCheckpoint(program, checkpoint)).execution, 'replayed'); + assert.equal((await runtime.createCheckpoint(program, 1)).checkpointDigest, checkpoint.checkpointDigest); + } +}); + +test('reachable operation, normalization, interpreter primitive and adapter changes invalidate the execution root', async t => { + const base = build(t), baseline = await base.runtime(), checkpoint = await baseline.createCheckpoint(program, 1); + for (const mutate of [ + edit => edit('app/src/Stitch/Compute.lex.tex', s => s.replace('then (x + 1)', 'then (x + 2)')), + edit => edit('app/src/Stitch/Compute.lex.tex', s => s.replace('body: (prim remainder value modulus 0 : Nat)', 'body: (prim quotient value modulus 0 : Nat)')), + edit => edit('app/src/Stitch/Compute.lex.tex', s => s.replace('(ringPow (binaryLength modulus y) x y modulus 1)', '(ringPow (binaryLength modulus y) x y modulus 0)')), + edit => edit('app/src/Stitch/Compute.lex.tex', s => s.replace('value := ((prim multiply (project left value) (ringModulus (project right bits)) : Nat) + (project right value))', 'value := ((prim multiply (project right value) (ringModulus (project left bits)) : Nat) + (project left value))')), + edit => edit('app/src/Stitch/Compute.lex.tex', s => s.replace('body: (if ((project instruction opcode) =? 17) then (1 + (powerWork bits (project instruction argument))) else 1)', 'body: (if ((project instruction opcode) =? 17) then (2 + (powerWork bits (project instruction argument))) else 1)')), + + edit => edit('scripts/check-model.mjs', s => s.replace("case 'subtract':return a[0]>=a[1]?a[0]-a[1]:0n", "case 'subtract':return a[0]>=a[1]?a[0]+a[1]:0n")), + edit => edit('src/layer1-uor/contracts.js', s => s.replace('value.length > 34', 'value.length > 35')), + edit => edit('src/layer1-uor/index.js', s => s.replace('SUCC: 2,', 'SUCC: 20,')) + ]) { + const changed = build(t, mutate); + assert.notEqual(changed.inventory.executionDigest, base.inventory.executionDigest); + const runtime = await changed.runtime(); + await assert.rejects(runtime.verifyCheckpoint(program, checkpoint), error => ['checkpoint-model', 'unsupported-operation'].includes(error.code)); + } +}); + +test('legacy whole-source roots and arbitrary execution roots are not implicitly trusted', async t => { + const base = build(t), runtime = await base.runtime(), checkpoint = await runtime.createCheckpoint(program, 1); + for (const modelDigest of [base.inventory.sourceDigest, 'sha256:' + '0'.repeat(64)]) { + await assert.rejects(runtime.verifyCheckpoint(program, { ...checkpoint, modelDigest }), error => error.code === 'checkpoint-model'); + } +}); diff --git a/tests/fixtures/custody-vectors.json b/tests/fixtures/custody-vectors.json new file mode 100644 index 0000000..a5e36bb --- /dev/null +++ b/tests/fixtures/custody-vectors.json @@ -0,0 +1,630 @@ +{ + "version": 1, + "hashFrame": "UTF8(stitch//v1\\0)||uint64be(length)||payload", + "vectors": [ + { + "name": "empty", + "objectHex": "", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:fb7900812ac6cc8ce7460a52714a0431cf55593738c0c16ddbee146eecb26b2f", + "byteLength": 0 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:d5f766a783a1746261ba2f11189efc674e57ecbf138e5ec9e5cdb19629209e31", + "byteLength": 0, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 0, + "digests": [ + "sha256:2c6c6991fa87488bf741a07b47913f534fc4fb5f9410c3adf5eff8a876382440", + "sha256:3525c2284eb297e9e5442685b72d96880c672e54dc2cd5758e938f9f5bdbd1ef", + "sha256:670e56cbfebe05ee008d9531996090fc395bf7dfe634613bdb67f70af4dcbce4" + ] + }, + "manifestDigest": "sha256:cf3f1729162d8d260972c627f0524dc05887334aaf520722b9dd9bdb857645d6" + }, + "fragments": [ + { + "index": 0, + "hex": "" + }, + { + "index": 1, + "hex": "" + }, + { + "index": 2, + "hex": "" + } + ] + }, + { + "name": "one-zero", + "objectHex": "00", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:47ba360bb38a129bbd7502593271cf768eb46262639fbb40eae8cc67bc9790f0", + "byteLength": 1 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:b2a111bdb732cb1694e8c8dd8acb679696f079bd1185259f2b26683818359109", + "byteLength": 1, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 1, + "digests": [ + "sha256:6edb5d20728b51bd1f61775e37f0e4927526e1a70c8baa06a6afc35f76dbf3b1", + "sha256:55b2e52474e1958d307405507260b4c2d6c1ccafc95a138caaa64743a3b8a618", + "sha256:8b2bcaa5c5e21d8cfdd790e050c58d8c4becbb95e58f93e5aa03b47ed8d6896d" + ] + }, + "manifestDigest": "sha256:cbd002eceb6529a65efa2bd0ac6309c6840e69e95a18d0b0d1d4886789761714" + }, + "fragments": [ + { + "index": 0, + "hex": "00" + }, + { + "index": 1, + "hex": "00" + }, + { + "index": 2, + "hex": "00" + } + ] + }, + { + "name": "odd", + "objectHex": "000102feff", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:cdeb0dd11e52d0b86881d0177d1a5eff89af057cf53c456e6bd4c2dab3398c15", + "byteLength": 5 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:415c1ca228ee32c009ccb4576151c15477337611a021cb40a4ae9af066187ac9", + "byteLength": 5, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 3, + "digests": [ + "sha256:ea5989082be0c6c1853f2a3cb4511d0d2d887772be703ee79ee4197d64646efb", + "sha256:985047eea867404d82188c11e746595a4b6becbc23711a8ce0e5c20fb18b0458", + "sha256:e956d96e47e3d1eadb4852212bec8bfa21fddb8988ba83854a83ca9b94437f95" + ] + }, + "manifestDigest": "sha256:8a4e95da7a2ba851196fe4fba81239454b627f61d3690af9cd84e84c48a28faa" + }, + "fragments": [ + { + "index": 0, + "hex": "000102" + }, + { + "index": 1, + "hex": "feff00" + }, + { + "index": 2, + "hex": "fefe02" + } + ] + }, + { + "name": "even", + "objectHex": "00010203feff", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:c503995fc94f30e7e2dba8ef09ef37b5cd822a44db86bccdd2b68f40b310d1f0", + "byteLength": 6 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:4834367dab8f51e5bb97c54b78945ce6e381ccf327d23d668f2652c502778575", + "byteLength": 6, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 3, + "digests": [ + "sha256:208610ffed1fab27d6e45c0664c9eba03f5e01f1f97d9173629614cecdceded2", + "sha256:28fc4c36bf9dfc1b2d919c2e3dd069b1cbf2324bc9b34923a6ca02b8a915546b", + "sha256:6d005d68c3d2a3d46958d36fb2787e86788eb6bfc5de37df44a95ded46e02cdc" + ] + }, + "manifestDigest": "sha256:3c3fe38823160b8d82078e494ed157f526d5d90a73444e0a26946f1fd4c8bfd9" + }, + "fragments": [ + { + "index": 0, + "hex": "000102" + }, + { + "index": 1, + "hex": "03feff" + }, + { + "index": 2, + "hex": "03fffd" + } + ] + }, + { + "name": "utf8", + "objectHex": "53746974636820e2988320f09fa7b5", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:234a5751accf72f5a6bfd0da002a24d6ad8840a4e97f265dcf2836337762e63a", + "byteLength": 15 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:1cea149117f4a73dae21c799a3b48cf5f683fad2fe9805710615e3b2496c04ca", + "byteLength": 15, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 8, + "digests": [ + "sha256:69a86c23b2dd6ab8e4a67af66a3d5a3b4aa0536913c116ee308a4be59f8c908a", + "sha256:45db8cb4888f2cd25f9b3dd14ee72d8e635bd23dec99298704b149ba591bb08d", + "sha256:deda57a02ebed1edbb51d839001a48c4bd35934cf32e036fbd5e8df1072262c5" + ] + }, + "manifestDigest": "sha256:63bde6c53d4f955e175ac8408ceeab9f75e7a9164507a0f84f3e3d994da1a975" + }, + "fragments": [ + { + "index": 0, + "hex": "53746974636820e2" + }, + { + "index": 1, + "hex": "988320f09fa7b500" + }, + { + "index": 2, + "hex": "cbf74984fccf95e2" + } + ] + }, + { + "name": "all-bytes", + "objectHex": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:ab0b506a7d86340c4c9967f35b5efc0b4006143faa0291476f0389bd709571a4", + "byteLength": 256 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:b53fdb4a800b598b11996ce7187aafc4b449802a1c223d0d2bf8f8a51abece95", + "byteLength": 256, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 128, + "digests": [ + "sha256:becfa4b6c8f8cdf4ca0104b8a4a5a00c27fae386006d0ded786de78c40734fdd", + "sha256:e077d67e31ed9d9eb1114822dc1abebbf908637f9066da0a3dcbeb70140ecf8d", + "sha256:0db3f3aa1e290e3970e5741cda2f43c4afb2955a11aec70b51f0b39ddf7ac67a" + ] + }, + "manifestDigest": "sha256:427841c818a690f8f7452b6877ab1abb89d06251093f169a4f8ed84041cc563e" + }, + "fragments": [ + { + "index": 0, + "hex": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f" + }, + { + "index": 1, + "hex": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff" + }, + { + "index": 2, + "hex": "8080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080" + } + ] + } + ], + "invalidVectors": [ + { + "name": "duplicate-index", + "expectedError": "DuplicateFragment", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:bba24bd4136f657619a38cd64b28fac23988c1afe98691b94ec79c15c04c8b1a", + "byteLength": 3 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:8d3df33ebc100287071f696f2bfe4a10ee6ce75b647e4c2b91f7d289bbc0e1b3", + "byteLength": 3, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 2, + "digests": [ + "sha256:04e61628aaef709f0b17cc1cc016732e6d3220d5e19b8d7db03ffbb4dc3b631f", + "sha256:99752783f64b911a220a0fb36ad7a03b631d17203fc42e759d71d70c2743c222", + "sha256:28d245f2dd41fc7f96cbe80f9ba21485a02060889ca6e3f79274ef241080aedb" + ] + }, + "manifestDigest": "sha256:aa702ddfe916aeafb8e6778526ad061f63b05c477c8a75318db5b26861d1eaa5" + }, + "fragments": [ + { + "index": 0, + "hex": "0102" + }, + { + "index": 0, + "hex": "0102" + } + ] + }, + { + "name": "missing-fragment", + "expectedError": "InsufficientFragments", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:bba24bd4136f657619a38cd64b28fac23988c1afe98691b94ec79c15c04c8b1a", + "byteLength": 3 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:8d3df33ebc100287071f696f2bfe4a10ee6ce75b647e4c2b91f7d289bbc0e1b3", + "byteLength": 3, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 2, + "digests": [ + "sha256:04e61628aaef709f0b17cc1cc016732e6d3220d5e19b8d7db03ffbb4dc3b631f", + "sha256:99752783f64b911a220a0fb36ad7a03b631d17203fc42e759d71d70c2743c222", + "sha256:28d245f2dd41fc7f96cbe80f9ba21485a02060889ca6e3f79274ef241080aedb" + ] + }, + "manifestDigest": "sha256:aa702ddfe916aeafb8e6778526ad061f63b05c477c8a75318db5b26861d1eaa5" + }, + "fragments": [ + { + "index": 0, + "hex": "0102" + } + ] + }, + { + "name": "truncated-object-digest", + "expectedError": "InvalidDigest", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:bba24bd4136f65761", + "byteLength": 3 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:8d3df33ebc100287071f696f2bfe4a10ee6ce75b647e4c2b91f7d289bbc0e1b3", + "byteLength": 3, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 2, + "digests": [ + "sha256:04e61628aaef709f0b17cc1cc016732e6d3220d5e19b8d7db03ffbb4dc3b631f", + "sha256:99752783f64b911a220a0fb36ad7a03b631d17203fc42e759d71d70c2743c222", + "sha256:28d245f2dd41fc7f96cbe80f9ba21485a02060889ca6e3f79274ef241080aedb" + ] + }, + "manifestDigest": "sha256:aa702ddfe916aeafb8e6778526ad061f63b05c477c8a75318db5b26861d1eaa5" + }, + "fragments": [ + { + "index": 0, + "hex": "0102" + }, + { + "index": 1, + "hex": "0300" + } + ] + }, + { + "name": "undeclared-external-basis", + "expectedError": "InvalidSchema", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:bba24bd4136f657619a38cd64b28fac23988c1afe98691b94ec79c15c04c8b1a", + "byteLength": 3 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:8d3df33ebc100287071f696f2bfe4a10ee6ce75b647e4c2b91f7d289bbc0e1b3", + "byteLength": 3, + "dependencies": [ + "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 2, + "digests": [ + "sha256:04e61628aaef709f0b17cc1cc016732e6d3220d5e19b8d7db03ffbb4dc3b631f", + "sha256:99752783f64b911a220a0fb36ad7a03b631d17203fc42e759d71d70c2743c222", + "sha256:28d245f2dd41fc7f96cbe80f9ba21485a02060889ca6e3f79274ef241080aedb" + ] + }, + "manifestDigest": "sha256:aa702ddfe916aeafb8e6778526ad061f63b05c477c8a75318db5b26861d1eaa5" + }, + "fragments": [ + { + "index": 0, + "hex": "0102" + }, + { + "index": 1, + "hex": "0300" + } + ] + }, + { + "name": "forged-fragment", + "expectedError": "FragmentDigestMismatch", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:bba24bd4136f657619a38cd64b28fac23988c1afe98691b94ec79c15c04c8b1a", + "byteLength": 3 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:8d3df33ebc100287071f696f2bfe4a10ee6ce75b647e4c2b91f7d289bbc0e1b3", + "byteLength": 3, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 2, + "digests": [ + "sha256:04e61628aaef709f0b17cc1cc016732e6d3220d5e19b8d7db03ffbb4dc3b631f", + "sha256:99752783f64b911a220a0fb36ad7a03b631d17203fc42e759d71d70c2743c222", + "sha256:28d245f2dd41fc7f96cbe80f9ba21485a02060889ca6e3f79274ef241080aedb" + ] + }, + "manifestDigest": "sha256:aa702ddfe916aeafb8e6778526ad061f63b05c477c8a75318db5b26861d1eaa5" + }, + "fragments": [ + { + "index": 0, + "hex": "0002" + }, + { + "index": 1, + "hex": "0300" + } + ] + }, + { + "name": "inconsistent-absent-fragment", + "expectedError": "InvalidParity", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:bba24bd4136f657619a38cd64b28fac23988c1afe98691b94ec79c15c04c8b1a", + "byteLength": 3 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:8d3df33ebc100287071f696f2bfe4a10ee6ce75b647e4c2b91f7d289bbc0e1b3", + "byteLength": 3, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 2, + "digests": [ + "sha256:04e61628aaef709f0b17cc1cc016732e6d3220d5e19b8d7db03ffbb4dc3b631f", + "sha256:99752783f64b911a220a0fb36ad7a03b631d17203fc42e759d71d70c2743c222", + "sha256:0000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "manifestDigest": "sha256:2591b87b547c0acf153e11e0f3d8d1f2c85e0768e3534f3cbe0d319796a1ff92" + }, + "fragments": [ + { + "index": 0, + "hex": "0102" + }, + { + "index": 1, + "hex": "0300" + } + ] + }, + { + "name": "nonzero-padding", + "expectedError": "InvalidPadding", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:bba24bd4136f657619a38cd64b28fac23988c1afe98691b94ec79c15c04c8b1a", + "byteLength": 3 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:8d3df33ebc100287071f696f2bfe4a10ee6ce75b647e4c2b91f7d289bbc0e1b3", + "byteLength": 3, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 2, + "digests": [ + "sha256:04e61628aaef709f0b17cc1cc016732e6d3220d5e19b8d7db03ffbb4dc3b631f", + "sha256:4d49fb0500587743b23331951dbc3594371488ff32d9bc31400287c2bf06255e", + "sha256:e22676912370357868ed11c08b7013c8ab4d0e85cc3165d31b2f74379a682cbc" + ] + }, + "manifestDigest": "sha256:1fb5ca67c308bac26362925f1e83b6fd857bb3a49fc667840cd25dfbe4a1d0fb" + }, + "fragments": [ + { + "index": 0, + "hex": "0102" + }, + { + "index": 1, + "hex": "0307" + } + ] + }, + { + "name": "object-does-not-match", + "expectedError": "ObjectDigestMismatch", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000", + "byteLength": 3 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:8d3df33ebc100287071f696f2bfe4a10ee6ce75b647e4c2b91f7d289bbc0e1b3", + "byteLength": 3, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 2, + "digests": [ + "sha256:04e61628aaef709f0b17cc1cc016732e6d3220d5e19b8d7db03ffbb4dc3b631f", + "sha256:99752783f64b911a220a0fb36ad7a03b631d17203fc42e759d71d70c2743c222", + "sha256:28d245f2dd41fc7f96cbe80f9ba21485a02060889ca6e3f79274ef241080aedb" + ] + }, + "manifestDigest": "sha256:9f3795df3f926c0a06b88087c1f7248574281fe0eb4a5319569e2d60b0be03dd" + }, + "fragments": [ + { + "index": 0, + "hex": "0102" + }, + { + "index": 1, + "hex": "0300" + } + ] + }, + { + "name": "encoding-does-not-match", + "expectedError": "EncodingDigestMismatch", + "manifest": { + "version": 1, + "object": { + "digestAlgorithm": "sha256", + "contentDigest": "sha256:bba24bd4136f657619a38cd64b28fac23988c1afe98691b94ec79c15c04c8b1a", + "byteLength": 3 + }, + "encoding": { + "format": "raw", + "encodingDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000", + "byteLength": 3, + "dependencies": [] + }, + "fragments": { + "scheme": "xor-2-of-3", + "threshold": 2, + "count": 3, + "byteLength": 2, + "digests": [ + "sha256:4923c96cc1c8aa51ffcc0c984945dcac5bed0a4fa5dc90225683443c295caa56", + "sha256:575d3f8511847b809d64779a3e977558f04c0685e2a4dd2066402ec47386a19e", + "sha256:5870c7040547df66144782d022330c64581424232d0df712a9f6e91135479d77" + ] + }, + "manifestDigest": "sha256:7e218f8139e4abc87c73ab001ae3672cc05cb1229ad7cc1ac24cc5eda4be3dca" + }, + "fragments": [ + { + "index": 0, + "hex": "0102" + }, + { + "index": 1, + "hex": "0300" + } + ] + } + ] +} diff --git a/tests/fixtures/prism-id-vectors.json b/tests/fixtures/prism-id-vectors.json new file mode 100644 index 0000000..8192291 --- /dev/null +++ b/tests/fixtures/prism-id-vectors.json @@ -0,0 +1,230 @@ +{ + "format": "prism-id/vectors/1", + "note": "Canonical form and kappa vectors, and one signed prism log (genesis, member bind, delegate bind). Generated once; signatures are ECDSA P-256 IEEE-P1363 over the canonical body.", + "canonical": [ + { + "name": "empty object", + "value": {}, + "canonical": "{}", + "kappa": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + { + "name": "empty array", + "value": [], + "canonical": "[]", + "kappa": "sha256:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945" + }, + { + "name": "literals", + "value": [ + null, + true, + false + ], + "canonical": "[null,true,false]", + "kappa": "sha256:37257214f22b92121c5ff4d7e29ed2d31b3f1129ee698e96e581ec05cb2e3cf7" + }, + { + "name": "integers", + "value": [ + 0, + -1, + 1, + 9007199254740991, + -9007199254740991 + ], + "canonical": "[0,-1,1,9007199254740991,-9007199254740991]", + "kappa": "sha256:3b00efdcc5873e0489c35510830ca26ec1f66a3a7e81ea23b099b1269c7de798" + }, + { + "name": "member order by UTF-8 bytes", + "value": { + "b": 1, + "a": 2, + "Z": 3, + "\u00e9": 4, + "\uff61": 5, + "\ud83d\ude00": 6, + "": 7 + }, + "canonical": "{\"\":7,\"Z\":3,\"a\":2,\"b\":1,\"\u00e9\":4,\"\uff61\":5,\"\ud83d\ude00\":6}", + "kappa": "sha256:5438aafe1a5d5b723ea9d91e1b8757f525b428d73d7dd3ef9f5a0ec73708875f" + }, + { + "name": "nested", + "value": { + "outer": { + "z": [ + 1, + { + "y": "x", + "x": "y" + } + ], + "a": null + } + }, + "canonical": "{\"outer\":{\"a\":null,\"z\":[1,{\"x\":\"y\",\"y\":\"x\"}]}}", + "kappa": "sha256:883962075d2b0456bc116478f3b1c456d2f9fcaa8ff2ca13ac2d0645f1c0a503" + }, + { + "name": "escapes", + "value": "\"\\\b\f\n\r\t\u0000\u001f/\u007f", + "canonical": "\"\\\"\\\\\\b\\f\\n\\r\\t\\u0000\\u001f/\u007f\"", + "kappa": "sha256:d5fa4d2f0e5f28e15a8b67a4baadadf5fef5f25068ef7040bc9f0ec085e083d7" + }, + { + "name": "non-ASCII is emitted raw", + "value": "caf\u00e9 \ud83d\ude00 \uff61", + "canonical": "\"caf\u00e9 \ud83d\ude00 \uff61\"", + "kappa": "sha256:a3c5237ac6e8d4c85f24e4c2574b3d7ae79c1c057a09159fad2b5a46b2518e4a" + }, + { + "name": "device record shape", + "value": { + "kind": "prism/device/1", + "class": "embedded", + "protection": "secure-element", + "sign": { + "crv": "P-256", + "kty": "EC", + "x": "AA", + "y": "BB" + }, + "agree": { + "crv": "P-256", + "kty": "EC", + "x": "CC", + "y": "DD" + } + }, + "canonical": "{\"agree\":{\"crv\":\"P-256\",\"kty\":\"EC\",\"x\":\"CC\",\"y\":\"DD\"},\"class\":\"embedded\",\"kind\":\"prism/device/1\",\"protection\":\"secure-element\",\"sign\":{\"crv\":\"P-256\",\"kty\":\"EC\",\"x\":\"AA\",\"y\":\"BB\"}}", + "kappa": "sha256:6eb864bec8807b3c755c984d04faaa8085ebca23af22e26351ca401dfbcef3ee" + } + ], + "refused": [ + { + "name": "fraction", + "value": 1.5 + }, + { + "name": "beyond safe integer", + "value": 9007199254740992 + }, + { + "name": "decomposed (not NFC) string", + "value": "e\u0301" + }, + { + "name": "decomposed member name", + "value": { + "e\u0301": 1 + } + }, + { + "name": "lone surrogate", + "value": "\ud800" + } + ], + "prism": { + "id": "sha256:249229b4963bdc7c5bc221f58cfd2e57433d9279f952fc3a1baa04dba529f08f", + "records": [ + { + "body": { + "kind": "prism/genesis/1", + "device": { + "kind": "prism/device/1", + "class": "browser", + "protection": "software", + "sign": { + "crv": "P-256", + "kty": "EC", + "x": "ipB9juAIPtvzxUTeViI1hD2Q-SWBuL_jtap5YV8SvYE", + "y": "qRol4ibl2MhLVRfZuDyla1HdbNRCXr2bbZu3rdA-hiQ" + }, + "agree": { + "crv": "P-256", + "kty": "EC", + "x": "DhobWnt4pEB44Ij47aNzj536a-nZ920inrta3QGx7dA", + "y": "exHsINEq3TC3WH28gYc2J098RLQOSIWszY2_BofF2to" + } + }, + "nonce": "-0a0z0nxg6NEFC_9SO95Fw" + }, + "signer": "sha256:217eadeb921af71af077930fa78f604478a9e70a7c1dd9bcddfa376fb9a16205", + "signature": "L91y34XN_GOaZyA7_urWTxNlr8lD7_h0MWsPdFY6QGN_oBwUpsNfYILLP11C3mkiQjQfMgLYqzMZ8bjuD-EZ1Q" + }, + { + "body": { + "kind": "prism/bind/1", + "prism": "sha256:249229b4963bdc7c5bc221f58cfd2e57433d9279f952fc3a1baa04dba529f08f", + "device": { + "kind": "prism/device/1", + "class": "mobile", + "protection": "platform", + "sign": { + "crv": "P-256", + "kty": "EC", + "x": "S5jvd0PMst-rcXVkdmCe4zQpKbTX5ET8d0eT7AU88f4", + "y": "oQwLDnKM2_JcLVNG9_2mAQCEP4ja7c_on3RZ8Dtsee0" + }, + "agree": { + "crv": "P-256", + "kty": "EC", + "x": "HdWfUD7ywEor0UqcF3bOdX1_zubKAgPiLQsQbnnnvxg", + "y": "gqKDAcb-tFBOE0EccYy1LvGu35GrvwhUGvIyeqUHzXw" + } + }, + "role": "member", + "scope": [] + }, + "signer": "sha256:217eadeb921af71af077930fa78f604478a9e70a7c1dd9bcddfa376fb9a16205", + "signature": "XVl8evnA5TYV7xON0FrOVCmRWNWVKFI2t8PZ8sgMrdmr9fFQxPUijRKlYvYFS-RXfFkZeXtVcCEazZjBxj-hrQ" + }, + { + "body": { + "kind": "prism/bind/1", + "prism": "sha256:249229b4963bdc7c5bc221f58cfd2e57433d9279f952fc3a1baa04dba529f08f", + "device": { + "kind": "prism/device/1", + "class": "embedded", + "protection": "secure-element", + "sign": { + "crv": "P-256", + "kty": "EC", + "x": "oTI_jEtxaxJI6GhRSDex8eWxu879RhMeah6npjTVwrY", + "y": "ILnZixWeFLH1B_1yCJKwKLHGdikw9EGYjW8koGqS3UM" + }, + "agree": { + "crv": "P-256", + "kty": "EC", + "x": "Qq5ZJu9JmgekyuMDTRpaLCav6YlZPIswJHrpIDkD6k4", + "y": "Zn1N5WcVO1Byig7RrSiO-IbVQq1bj5PmU6Pjp9zQ6kA" + } + }, + "role": "delegate", + "scope": [ + "telemetry/write" + ] + }, + "signer": "sha256:217eadeb921af71af077930fa78f604478a9e70a7c1dd9bcddfa376fb9a16205", + "signature": "wTglGK7pLqCraSX9aridxFHZsPvdCsmk4OCojb43rZwYqPQ-3W187NaXecWny71wu1_VxN9p1MGmAztFmI97uA" + } + ], + "active": [ + "sha256:217eadeb921af71af077930fa78f604478a9e70a7c1dd9bcddfa376fb9a16205", + "sha256:c6834c58d720c3142e7ef4a42af02de3196799540ba9f29f919695224afb8255", + "sha256:f91173d4e798c1a7fff0dcb85f48db514eb0e9b5c160ea4f2ca741ba160739e3" + ], + "roles": { + "sha256:217eadeb921af71af077930fa78f604478a9e70a7c1dd9bcddfa376fb9a16205": "member", + "sha256:c6834c58d720c3142e7ef4a42af02de3196799540ba9f29f919695224afb8255": "member", + "sha256:f91173d4e798c1a7fff0dcb85f48db514eb0e9b5c160ea4f2ca741ba160739e3": "delegate" + }, + "scopes": { + "sha256:f91173d4e798c1a7fff0dcb85f48db514eb0e9b5c160ea4f2ca741ba160739e3": [ + "telemetry/write" + ] + } + } +} diff --git a/tests/guest-qualification.test.js b/tests/guest-qualification.test.js new file mode 100644 index 0000000..ee1d1b8 --- /dev/null +++ b/tests/guest-qualification.test.js @@ -0,0 +1,11 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { guestShellReady } from '../vendor/guest/qualification-protocol.mjs'; +test('waits for an actual line-start root shell prompt, not kernel banner bytes', () => { + for (const text of ['Linux version 6.18.7 #', 'Linux version 6.18.7 #1', 'kernel # ', '\n#', '\nlog # ']) { + assert.equal(guestShellReady(text), false, text); + } + for (const text of ['# ', '\r\n# ', '\n/ # ', '\n/tmp # ']) { + assert.equal(guestShellReady(text), true, text); + } +}); diff --git a/tests/helpers/transactional-authority.js b/tests/helpers/transactional-authority.js new file mode 100644 index 0000000..ea7329c --- /dev/null +++ b/tests/helpers/transactional-authority.js @@ -0,0 +1,25 @@ +// Isolated synthetic transaction boundary. This is not browser IndexedDB qualification. +import { BrowserAuthorityStore } from '../../src/layer1-uor/browser-authority.js'; +export class SyntheticAuthorityStore extends BrowserAuthorityStore { + constructor(state = { records: new Map(), tail: Promise.resolve() }) { super(); this.state = state; this.fail = false; this.count = 0; } + exclusiveAuthority(work) { return this.exclusivePublication("origin-lifecycle", work); } + exclusivePublication(scope, work) { + scope = "origin-lifecycle"; + this.state.locks ??= new Map(); + const result = (this.state.locks.get(scope) ?? Promise.resolve()).then(work); + this.state.locks.set(scope, result.catch(() => {})); return result; + } + records() { return this.state.tail.then(() => structuredClone([...this.state.records])); } + transactionMany(keys, change) { + const result = this.state.tail.then(() => { + const values = new Map(keys.map(key => [key, structuredClone(this.state.records.get(key))])); + const update = change(values); + this.count++; + if (this.fail === true || this.fail === this.count) throw Error('synthetic quota abort'); + for (const [key, value] of update.writes ?? []) this.state.records.set(key, structuredClone(value)); + for (const key of update.deletes ?? []) this.state.records.delete(key); + return structuredClone(update.result); + }); + this.state.tail = result.catch(() => {}); return result; + } +} diff --git a/tests/helpers/vm-filesystem.js b/tests/helpers/vm-filesystem.js new file mode 100644 index 0000000..b02132e --- /dev/null +++ b/tests/helpers/vm-filesystem.js @@ -0,0 +1,29 @@ +/** Deliberately small local v86 filesystem double, with allocations visible to tests. */ +export function filesystemFixture() { + const fs = { + inodes: [{ size: 0, mode: 0x4000, direntries: new Map() }], inodedata: {}, mounts: [], allocations: [], reads: [], + CreateInode() { return { size: 0, mode: 0x8000, direntries: new Map() }; }, + link_under_dir(parent, id, name) { this.inodes[parent].direntries.set(name, id); }, + CreateFile(name, parent) { const id = this.inodes.length; this.inodes.push(this.CreateInode()); this.link_under_dir(parent, id, name); return id; }, + SearchPath(name) { return { id: this.inodes[0].direntries.get(name) ?? -1 }; }, + GetInode(id) { return this.inodes[id]; }, + async Read(id, offset, length) { this.reads.push({ id, offset, length }); return this.inodedata[id]?.subarray(offset, offset + length) ?? new Uint8Array(0); }, + async ChangeSize(id, size) { this.allocations.push(size); this.inodedata[id] = new Uint8Array(size); this.inodes[id].size = size; }, + async CreateBinaryFile(name, parent, bytes) { + const id = this.CreateFile(name, parent); this.allocations.push(bytes.length); + this.inodedata[id] = bytes.slice(); this.inodes[id].size = bytes.length; return id; + }, + async CreateTextFile(name, parent, text) { + const id = this.CreateFile(name, parent); this.allocations.push(text.length); + this.inodedata[id] = new TextEncoder().encode(text); this.inodes[id].size = text.length; return id; + }, + FillDirectory(id) { + const size = [...this.inodes[id].direntries.keys()].reduce((sum, name) => sum + 24 + new TextEncoder().encode(name).length, 0); + this.allocations.push(size); this.inodedata[id] = new Uint8Array(size); this.inodes[id].size = size; + }, + setResult(name, bytes) { + const id = this.CreateFile(name, 0); this.inodedata[id] = bytes; this.inodes[id].size = bytes.length; return id; + } + }; + return fs; +} diff --git a/tests/operator-ui.test.js b/tests/operator-ui.test.js new file mode 100644 index 0000000..565f9af --- /dev/null +++ b/tests/operator-ui.test.js @@ -0,0 +1,22 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +const html = readFileSync(new URL('../index.html', import.meta.url), 'utf8'); + +test('every operator input has a persistent visible associated label, not only a placeholder', () => { + for (const match of html.matchAll(/<(?:input|textarea|select)\b[^>]*\bid="([^"]+)"[^>]*>/g)) { + assert.match(html, new RegExp(`]*\\bfor="${match[1]}"[^>]*>[^<]*\\S`), match[1]); + } +}); + +test('instructions, stdout text alternative and contextual result regions exist outside the VM canvas', () => { + for (const id of ['objectInputHelp', 'jobInputHelp', 'vmCommandHelp', 'pointerScopeHelp', 'providerTokenHelp', 'pointerAdmissionHelp', 'recoverySelectionHelp']) { + assert.match(html, new RegExp(`id="${id}"`), id); + assert.match(html, new RegExp(`aria-describedby="[^"]*${id}`), id); + } + assert.match(html, /]*id="vmStdoutText"[^>]*tabindex="0"/); + assert.match(html, /id="vmStdoutSummary"[^>]*role="status"/); + for (const id of ['mesh', 'objects', 'compute', 'vm', 'pointers', 'resources']) { + assert.match(html, new RegExp(`id="${id}ActionStatus"[^>]*role="status"`), id); + } +}); diff --git a/tests/placement-repair.test.js b/tests/placement-repair.test.js new file mode 100644 index 0000000..9b672a6 --- /dev/null +++ b/tests/placement-repair.test.js @@ -0,0 +1,316 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { LiveUorMeshDatabase } from '../src/layer3-storage/index.js'; +import { reserveNetwork, ResourceAdmission } from '../src/layer2-schedulers/policy.js'; +import { createObject, placementStatus } from '../src/layer3-storage/custody.js'; +import { model } from '../src/layer1-uor/generated-model.js'; +import { experienceFacts, experienceActionAllowed } from '../src/product-experience.js'; + +function network() { + const nodes = [], sent = [], withheld = []; + let filter = () => true; + const node = (peerId, admission) => { + const n = { peerId, peers: new Map(), admission, + openPeers() { return [...this.peers].map(([remoteId, p]) => ({ remoteId, dc: p.route })); }, + sendToPeer(remoteId, packet) { + const p = this.peers.get(remoteId); + if (!p) return false; + if (this.admission) reserveNetwork(this.admission, 'place', packet); + const envelope = { from: this.peerId, to: remoteId, packet: structuredClone(packet) }; + sent.push(envelope); + if (filter(envelope)) p.node.db.handleMeshMessage(this.peerId, envelope.packet); + else withheld.push(envelope); + return true; + }, + broadcast(packet) { for (const id of this.peers.keys()) this.sendToPeer(id, packet); }, + }; + if (!admission) delete n.admission; + n.db = new LiveUorMeshDatabase({ transport: n }); nodes.push(n); return n; + }; + const connect = (a, b) => { a.peers.set(b.peerId, { node: b, route: {} }); b.peers.set(a.peerId, { node: a, route: {} }); }; + const disconnect = (a, b) => { a.peers.delete(b.peerId); b.peers.delete(a.peerId); }; + const drain = async () => { for (let i = 0; i < 12; i++) await Promise.all(nodes.map(n => n.db.flush())); }; + return { node, connect, disconnect, drain, sent, withheld, filter: f => { filter = f; } }; +} +const shards = (n, from) => n.sent.filter(e => e.from === from && e.packet.type === 'uor_shard' && e.packet.purpose === 'placement'); +const summary = (n, entry) => n.db.placementSummary(entry.addressHex); +const state = (n, entry) => n.db.placements.get(entry.addressHex); +const setup = async () => { + const n = network(), writer = n.node('writer'), holders = [0, 1, 2].map(i => n.node(`h${i}`)); + for (const h of holders) n.connect(writer, h); + const entry = await writer.db.put('exact retained object'); await n.drain(); + return { n, writer, holders, entry }; +}; + +test('pre-join store and repeated store place retained bytes after peers join without fabricating writer shards', async () => { + const n = network(), writer = n.node('writer'); + const entry = await writer.db.put('stored before joining'); + assert.equal(summary(writer, entry).committedFragments, 0); + assert.equal(shards(n, 'writer').length, 0); + const holders = [0, 1, 2].map(i => n.node(`h${i}`)); + for (const h of holders) n.connect(writer, h); + assert.equal(await writer.db.put('stored before joining'), entry); + await n.drain(); + assert.equal(summary(writer, entry).committedFragments, 3); + assert.deepEqual([...entry.heldIndices], []); + assert.equal(shards(n, 'writer').length, 3); + await writer.db.repairPlacement(entry.addressHex); await n.drain(); + assert.equal(shards(n, 'writer').length, 3, 'a complete repair is idempotent'); + await writer.db.clearLocal(); + const reader = n.node('reader'); n.connect(reader, holders[0]); n.connect(reader, holders[1]); + await reader.db.syncFromNetwork(); await n.drain(); + assert.equal(reader.db.get(entry.addressHex).text, 'stored before joining'); +}); + +test('partial placement fills only missing indices and holder loss retains unknown old copies until exact release', async () => { + const n = network(), writer = n.node('writer'), h0 = n.node('h0'); n.connect(writer, h0); + const entry = await writer.db.put('partial then churn'); await n.drain(); + const h1 = n.node('h1'), h2 = n.node('h2'); n.connect(writer, h1); n.connect(writer, h2); + await writer.db.repairPlacement(entry.addressHex); await n.drain(); + assert.equal(shards(n, 'writer').length, 3); assert.equal(summary(writer, entry).committedFragments, 3); + n.disconnect(writer, h0); + assert.equal(summary(writer, entry).committedFragments, 2, 'a current lease is not current reachability'); + const replacement = n.node('replacement'); n.connect(writer, replacement); + await writer.db.repairPlacement(entry.addressHex); await n.drain(); + assert.equal(summary(writer, entry).committedFragments, 3); + assert.equal(summary(writer, entry).assertedCopies, 4, 'disconnection never proves deletion'); + assert.equal(state(writer, entry).copies.find(c => c.holder === 'h0').status, 'superseded'); + assert.deepEqual([...replacement.db.objects.get(entry.addressHex).heldIndices], [0]); + n.connect(writer, h0); + await writer.db.repairPlacement(entry.addressHex); await n.drain(); + assert.equal(summary(writer, entry).assertedCopies, 3); + assert.deepEqual([...h0.db.objects.get(entry.addressHex).heldIndices], []); + assert.equal(h0.db.objects.get(entry.addressHex).shards[0], null); +}); + +test('live migration keeps old custody through an unknown transfer and retires only after fresh receipt and exact release ACK', async t => { + let now = 1000; t.mock.method(Date, 'now', () => now); + const { n, writer, holders, entry } = await setup(); + const target = n.node('target'); n.connect(writer, target); + writer.db.demoPlacementLeaseMs = 10; + n.filter(e => !(e.from === 'target' && e.packet.type === 'uor_shard_ack')); + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }); await n.drain(); + const request = state(writer, entry).requests.at(-1); + assert.equal(request.fromRequestId, state(writer, entry).copies.find(c => c.holder === 'h0').requestId); + assert.equal(summary(writer, entry).committedFragments, 3); + assert.equal(summary(writer, entry).requestedTransfers, 1); + const before = shards(n, 'writer').length; + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }); await n.drain(); + assert.equal(shards(n, 'writer').length, before, 'no blind repeat of an unexpired unknown request'); + // Force only this transfer's lease observation to expire; original custody stays live. + now = request.leaseExpiresAt; + await writer.db.repairPlacement(entry.addressHex); await n.drain(); + assert.equal(state(writer, entry).requests.find(r => r.requestId === request.requestId).status, 'uncertain'); + assert.equal(summary(writer, entry).committedFragments, 3); + n.filter(() => true); writer.db.demoPlacementLeaseMs = 60000; + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }); await n.drain(); + assert.equal(summary(writer, entry).committedFragments, 3); + assert.equal(summary(writer, entry).uncertainTransfers, 1); + assert.equal(summary(writer, entry).assertedCopies, 3); + assert.equal(state(writer, entry).copies.some(c => c.holder === 'h0'), false); + assert.equal(holders[0].db.objects.get(entry.addressHex).shards[0], null); +}); + +test('all expired leases can renew at the same three holders, preserving assertions until fresh checks and not inflating copies', async t => { + let now = 1000; t.mock.method(Date, 'now', () => now); + const { n, writer, entry } = await setup(); + now += 60000; + assert.equal(summary(writer, entry).committedFragments, 0); + n.filter(e => e.packet.type !== 'uor_shard_ack'); + await writer.db.repairPlacement(entry.addressHex); await n.drain(); + assert.equal(summary(writer, entry).committedFragments, 0); + assert.equal(summary(writer, entry).assertedCopies, 3, 'expired physical assertions stay accounted'); + assert.equal(summary(writer, entry).requestedTransfers, 3); + n.filter(() => true); + for (const e of n.withheld) await writer.db.handleMeshMessage(e.from, e.packet); + await n.drain(); + assert.equal(summary(writer, entry).committedFragments, 3); + assert.equal(summary(writer, entry).assertedCopies, 3); + assert.equal(state(writer, entry).requests.length, 6); +}); + +test('forged, stale, replayed and wrong-route receipts cannot establish custody or release the old source', async t => { + let now = 1000; t.mock.method(Date, 'now', () => now); + const n = network(), writer = n.node('writer'), holder = n.node('holder'); n.connect(writer, holder); + n.filter(e => e.packet.type !== 'uor_shard_ack'); + const entry = await writer.db.put('receipts'); await n.drain(); + const ack = n.withheld[0].packet; + for (const change of [{ holder: 'other' }, { manifestDigest: 'sha256:' + '0'.repeat(64) }, { fragmentDigest: 'sha256:' + '0'.repeat(64) }, + { index: 1 }, { requestId: 'unknown' }, { leaseExpiresAt: ack.leaseExpiresAt + 1 }]) { + assert.equal(await writer.db.handleMeshMessage('holder', { ...ack, ...change }), false); + assert.equal(summary(writer, entry).committedFragments, 0); + } + now = ack.leaseExpiresAt; + assert.equal(await writer.db.handleMeshMessage('holder', ack), false); + assert.equal(summary(writer, entry).uncertainTransfers, 1); + n.filter(() => true); + await writer.db.repairPlacement(entry.addressHex); await n.drain(); + assert.equal(summary(writer, entry).committedFragments, 1); + assert.equal(await writer.db.handleMeshMessage('holder', ack), false); + assert.equal(summary(writer, entry).committedFragments, 1); + await holder.db.clearLocal(); n.connect(writer, holder); // same route ID, different data channel and empty RAM + assert.equal(summary(writer, entry).committedFragments, 0); + await writer.db.repairPlacement(entry.addressHex); await n.drain(); + assert.equal(summary(writer, entry).committedFragments, 1); + assert.equal(summary(writer, entry).assertedCopies, 1); +}); + +test('epoch replacement cannot activate an old migration even when reservation IDs repeat, and charges remain retained', async () => { + let clock = 0, active = new ResourceAdmission({ clock: () => clock, durationMs: 100 }); + const prior = active; + const admission = { get state() { return active.state; }, reserve: (...args) => active.reserve(...args), + reservationCurrent: (...args) => active.reservationCurrent(...args) }; + const n = network(), writer = n.node('writer', admission), holders = [0, 1, 2].map(i => n.node(`h${i}`)); + for (const h of holders) n.connect(writer, h); + const entry = await writer.db.put('epoch bound migration'); await n.drain(); + const target = n.node('target'); n.connect(writer, target); + n.filter(e => !(e.from === 'target' && e.packet.type === 'uor_shard_ack')); + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }); await n.drain(); + const old = n.withheld[0].packet, spent = prior.state.spent; + active = new ResourceAdmission({ clock: () => clock, durationMs: 100 }); + assert.notEqual(active.state.epoch, prior.state.epoch); + assert.equal(await writer.db.handleMeshMessage('target', old), false); + assert.equal(summary(writer, entry).committedFragments, 3); + assert.equal(summary(writer, entry).uncertainTransfers, 1); + assert.equal(state(writer, entry).copies.find(c => c.holder === 'h0').status, 'committed'); + assert.deepEqual(prior.state.spent, spent); + n.filter(() => true); + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }); await n.drain(); + assert.equal(summary(writer, entry).committedFragments, 3); + assert.equal(state(writer, entry).copies.some(c => c.holder === 'h0'), false); + clock = 100; + await assert.rejects(writer.db.repairPlacement(entry.addressHex), e => e.code === 'epoch-expired'); +}); + +test('lost release ACK retains superseded copies and exact retry never deletes a newer assignment', async t => { + let now = 1000; t.mock.method(Date, 'now', () => now); + const { n, writer, holders, entry } = await setup(); + const target = n.node('target'); n.connect(writer, target); + writer.db.releaseAckTimeoutMs = 100; + n.filter(e => e.packet.type !== 'uor_shard_release_ack'); + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }); await n.drain(); + assert.equal(summary(writer, entry).assertedCopies, 4); + assert.equal(summary(writer, entry).pendingReleases, 1); + assert.equal(holders[0].db.objects.get(entry.addressHex).shards[0], null); + const oldRelease = n.sent.find(e => e.packet.type === 'uor_shard_release').packet; + // An exact lost-ACK release retry is safe and can establish known release. + now += 100; n.filter(() => true); + await writer.db.repairPlacement(entry.addressHex); await n.drain(); + assert.equal(summary(writer, entry).assertedCopies, 3); + // Moving back creates a new exact assignment, so the earlier release is stale. + writer.db.demoPlacementLeaseMs = 60000; + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'target' }); await n.drain(); + const held = holders[0].db.objects.get(entry.addressHex); + assert.equal(held.heldIndices.has(0), true); + assert.equal(await holders[0].db.handleMeshMessage('writer', oldRelease), false); + assert.equal(held.heldIndices.has(0), true); + assert.ok(held.shards[0]); +}); + +test('repair requires exact retained verified bytes and every source activation condition', async () => { + const n = network(), writer = n.node('writer'); + const bundle = await createObject(new TextEncoder().encode('partial only')); + await assert.rejects(writer.db.repairPlacement(bundle.manifest.object.contentDigest), e => e.code === 'MissingObject'); + const entry = await writer.db.put('original'); entry.bytes[0] ^= 1; + await assert.rejects(writer.db.repairPlacement(entry.addressHex), e => e.code === 'ManifestDigestMismatch'); + await writer.db.put('original'); + assert.equal(writer.db.get(entry.addressHex).text, 'original', 'repeated Store restores a complete newly checked local copy'); + for (let mask = 0; mask < 16; mask++) { + const flags = [0, 1, 2, 3].map(i => Boolean(mask & (1 << i))); + assert.equal(model['Stitch.Custody.activationAllowed'](...flags), mask === 15); + } + for (let mask = 0; mask < 8; mask++) { + const facts = experienceFacts({ placementObjectSelected: Boolean(mask & 1), peersReachable: Boolean(mask & 2), policyBlocked: Boolean(mask & 4) }); + assert.equal(experienceActionAllowed('repairPlacementBtn', facts), mask === 3); + } +}); + +test('failed or ambiguous migration sends never replace old custody or refund their real reservation', async () => { + for (const outcome of ['failed', 'uncertain']) { + const { n, writer, entry } = await setup(); + const target = n.node('target'); n.connect(writer, target); + const send = writer.sendToPeer.bind(writer); + writer.sendToPeer = (id, packet) => { + if (id !== 'target' || packet.purpose !== 'placement') return send(id, packet); + if (outcome === 'uncertain') throw Error('unknown send outcome'); + return false; + }; + const spent = writer.db.admission.state.spent; + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }); await n.drain(); + assert.equal(state(writer, entry).requests.at(-1).status, outcome); + assert.equal(summary(writer, entry).committedFragments, 3); + assert.equal(state(writer, entry).copies.find(c => c.holder === 'h0').status, 'committed'); + assert.ok(writer.db.admission.state.spent.storageBytes > spent.storageBytes); + assert.ok(writer.db.admission.state.spent.requests >= spent.requests); + } +}); + +test('mismatched or stale release ACKs cannot hide retained copies and old releases cannot remove another writer claim', async () => { + const { n, writer, holders, entry } = await setup(); + const target = n.node('target'); n.connect(writer, target); + n.filter(e => e.packet.type !== 'uor_shard_release_ack'); + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }); await n.drain(); + const ack = n.withheld.find(e => e.packet.type === 'uor_shard_release_ack').packet; + for (const change of [{ requestId: 'unrelated' }, { index: 1 }, { manifestDigest: 'sha256:' + '0'.repeat(64) }, { holder: 'other' }, { releaseId: 'unrelated' }]) { + assert.equal(await writer.db.handleMeshMessage('h0', { ...ack, ...change }), false); + assert.equal(summary(writer, entry).assertedCopies, 4); + } + assert.equal(await writer.db.handleMeshMessage('other', ack), false); + // A second writer's assignment remains a live local fragment even after the + // first writer's exact claim is released; physical absence is not inferred. + const second = n.node('second'); n.connect(second, holders[0]); n.filter(() => true); + await second.db.put('exact retained object'); await n.drain(); + const release = n.sent.find(e => e.packet.type === 'uor_shard_release').packet; + assert.equal(await holders[0].db.handleMeshMessage('writer', release), true); + await n.drain(); + assert.equal(holders[0].db.objects.get(entry.addressHex).heldIndices.has(0), true); + assert.ok(holders[0].db.objects.get(entry.addressHex).shards[0]); +}); + +test('route and epoch changes while crypto awaits cannot publish tentative migration or retire its source', async t => { + for (const phase of ['receipt-route', 'commit-epoch']) { + const { n, writer, entry } = await setup(); + const target = n.node('target'); n.connect(writer, target); + n.filter(e => !(e.from === 'target' && e.packet.type === 'uor_shard_ack')); + await writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }); await n.drain(); + const ack = n.withheld[0].packet, priorAdmission = writer.db.admission, spent = priorAdmission.state.spent; + const digest = crypto.subtle.digest.bind(crypto.subtle); + let entered, release, held = false; + const atBoundary = new Promise(resolve => { entered = resolve; }); + const continueCrypto = new Promise(resolve => { release = resolve; }); + t.mock.method(crypto.subtle, 'digest', async (...args) => { + const result = await digest(...args); + const request = state(writer, entry).requests.find(r => r.requestId === ack.requestId); + if (!held && (phase === 'receipt-route' || request.status === 'acknowledged')) { + held = true; entered(); await continueCrypto; + } + return result; + }); + const work = writer.db.handleMeshMessage('target', ack); + await atBoundary; + if (phase === 'receipt-route') n.connect(writer, target); + else writer.db.admission = new ResourceAdmission(); + release(); + assert.equal(await work, false); + t.mock.restoreAll(); await n.drain(); + assert.equal(summary(writer, entry).committedFragments, 3); + assert.equal(state(writer, entry).copies.find(c => c.holder === 'h0').status, 'committed'); + assert.equal(state(writer, entry).requests.find(r => r.requestId === ack.requestId).status, 'uncertain'); + assert.equal(state(writer, entry).copies.find(c => c.holder === 'target').status, 'superseded'); + assert.equal(n.sent.some(e => e.packet.type === 'uor_shard_release'), false); + assert.deepEqual(priorAdmission.state.spent, spent); + } +}); + + +test('placement clock regression refuses before dispatch and keeps original custody history', async t => { + let now = 1000; t.mock.method(Date, 'now', () => now); + const { n, writer, entry } = await setup(); + const target = n.node('target'); n.connect(writer, target); + const history = state(writer, entry), sent = n.sent.length; + now = 999; + assert.throws(() => summary(writer, entry), e => e.code === 'ClockRegression'); + await assert.rejects(writer.db.repairPlacement(entry.addressHex, { replaceHolder: 'h0' }), e => e.code === 'ClockRegression'); + assert.deepEqual(state(writer, entry), history); + assert.equal(n.sent.length, sent); +}); diff --git a/tests/pointer-recovery.test.js b/tests/pointer-recovery.test.js new file mode 100644 index 0000000..f39dd1e --- /dev/null +++ b/tests/pointer-recovery.test.js @@ -0,0 +1,133 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { RecoveryVault, exportRecoveryBundle } from '../src/recovery.js'; +import { generateAuthority, signPointer, PointerObserver } from '../src/layer1-uor/pointer.js'; +import { model } from '../src/layer1-uor/generated-model.js'; +const root = c => `sha256:${c.repeat(64)}`; +async function fixture() { + const authority = await generateAuthority(); + let now = 20, reservations = 0; + const body = { version: 1, name: 'state.example', authorityKey: authority.publicKey, + revision: 7, previousDigest: root('a'), objectRoot: root('b'), validFromMs: 10, validUntilMs: 100 }; + const sign = patch => signPointer({ ...body, ...patch }, authority.privateKey); + const anchor = await sign({}); + const vault = new RecoveryVault(); + const importAnchor = async pointer => vault.import(await exportRecoveryBundle({ version: 1, objects: [], jobs: [], anchors: [pointer] })); + const accept = (pointer = anchor) => vault.acceptRecentAnchor({ name: body.name, authorityKey: authority.publicKey, + expectedDigest: pointer.pointerDigest, nowMs: now, operatorAccepted: true }); + const observer = () => new PointerObserver({ name: body.name, trustedAuthorityKey: authority.publicKey, + clock: () => now, admission: { reserve() { reservations++; } } }); + await importAnchor(anchor); + return { authority, anchor, vault, sign, accept, observer, importAnchor, now: value => { now = value; }, reservations: () => reservations }; +} +const restore = (observer, f, options = {}) => observer.restoreFromRecovery(f.vault, { expectedDigest: f.anchor.pointerDigest, ...options }); +function delayVerification(t) { + let release, entered, first = true; + const gate = new Promise(resolve => { release = resolve; }); + const reached = new Promise(resolve => { entered = resolve; }); + const original = crypto.subtle.verify.bind(crypto.subtle); + t.mock.method(crypto.subtle, 'verify', async (...args) => { + if (first) { first = false; entered(); await gate; } + return original(...args); + }); + return { release, reached }; +} + +test('source restore guard refuses missing trust, every wrong scope/digest/signature observation, expiry and any different head', () => { + const allowed = (...args) => model['Stitch.Pointer.restoreAllowed'](...args); + const good = [true, true, true, true, 10, 100, 20, false, false]; + assert.equal(allowed(...good), true); + for (const index of [0, 1, 2, 3]) { const bad = [...good]; bad[index] = false; assert.equal(allowed(...bad), false); } + assert.equal(allowed(true, true, true, true, 10, 100, 9, false, false), false); + assert.equal(allowed(true, true, true, true, 10, 100, 100, false, false), false); + assert.equal(allowed(true, true, true, true, 10, 100, 20, true, false), false); + assert.equal(allowed(true, true, true, true, 10, 100, 20, true, true), true); + for (let mask = 0; mask < 64; mask++) for (const now of [9, 10, 99, 100]) { + const [accepted, scope, digest, signature, present, same] = Array.from({ length: 6 }, (_, i) => Boolean(mask & (1 << i))); + assert.equal(allowed(accepted, scope, digest, signature, 10, 100, now, present, same), + accepted && scope && digest && signature && 10 <= now && now < 100 && (!present || same)); + } +}); + +test('import, acceptance and explicit exact-scope live restore are separate; normal strict succession then works', async () => { + const f = await fixture(), observer = f.observer(); + await assert.rejects(observer.admit(f.anchor), /pointer-bootstrap/); + await assert.rejects(restore(observer, f), /anchor-not-accepted/); + assert.equal(observer.head, null); + await f.accept(); assert.equal(observer.head, null); + assert.deepEqual(await restore(observer, f), f.anchor); + const next = await f.sign({ revision: 8, previousDigest: f.anchor.pointerDigest }); + assert.deepEqual(await observer.admit(next), next); + for (const pointer of [f.anchor, await f.sign({ revision: 10 }), await f.sign({ revision: 9, previousDigest: root('e') })]) { + await assert.rejects(observer.admit(pointer), /pointer-conflict/); assert.deepEqual(observer.head, next); + } + await assert.rejects(restore(observer, f), /pointer-restore-conflict-or-stale/); assert.deepEqual(observer.head, next); + const restartedVault = new RecoveryVault(); await restartedVault.import(await f.vault.export()); + await assert.rejects(f.observer().restoreFromRecovery(restartedVault, { expectedDigest: f.anchor.pointerDigest }), /anchor-not-accepted/); +}); + +test('only a branded vault accepted decision qualifies, pins cannot change and mismatched scope/digest refuses', async () => { + const f = await fixture(); await f.accept(); const observer = f.observer(); + for (const fake of [f.vault.snapshot(), { acceptedAnchor: () => f.anchor }]) { + await assert.rejects(observer.restoreFromRecovery(fake, { expectedDigest: f.anchor.pointerDigest })); + } + await assert.rejects(restore(observer, f, { expectedDigest: root('e') }), /anchor-not-accepted/); + for (const options of [{ name: 'other', trustedAuthorityKey: f.authority.publicKey }, + { name: f.anchor.name, trustedAuthorityKey: (await generateAuthority()).publicKey }]) { + await assert.rejects(restore(new PointerObserver(options), f), /anchor-not-accepted/); + } + assert.throws(() => { observer.name = 'other'; }, TypeError); + assert.throws(() => { observer.trustedAuthorityKey = '0'.repeat(64); }, TypeError); + const changed = f.vault.snapshot(); changed.acceptedAnchors[0].revision = 999; + assert.deepEqual(await restore(observer, f), f.anchor); +}); + +test('no different retained head is overwritten, even by an independently accepted newer anchor', async () => { + const f = await fixture(); await f.accept(); const observer = f.observer(); + const genesis = await f.sign({ revision: 0, previousDigest: null }); await observer.admit(genesis); + await assert.rejects(restore(observer, f), /pointer-restore-conflict-or-stale/); + assert.deepEqual(observer.head, genesis); assert.equal(f.reservations(), 1); +}); + +test('duplicate restore is storage-idempotent and restore/admit share serialized CAS in either order', async () => { + const f = await fixture(); await f.accept(); let observer = f.observer(); + assert.deepEqual(await Promise.all([restore(observer, f), restore(observer, f)]), [f.anchor, f.anchor]); + assert.equal(f.reservations(), 1); + const next = await f.sign({ revision: 8, previousDigest: f.anchor.pointerDigest }); + observer = f.observer(); + const forward = await Promise.allSettled([restore(observer, f), observer.admit(next)]); + assert.deepEqual(forward.map(r => r.status), ['fulfilled', 'fulfilled']); assert.deepEqual(observer.head, next); + observer = f.observer(); + const reverse = await Promise.allSettled([observer.admit(next), restore(observer, f)]); + assert.deepEqual(reverse.map(r => r.status), ['rejected', 'fulfilled']); assert.deepEqual(observer.head, f.anchor); + observer = f.observer(); const genesis = await f.sign({ revision: 0, previousDigest: null }); + const retainedFirst = await Promise.allSettled([observer.admit(genesis), restore(observer, f)]); + assert.deepEqual(retainedFirst.map(r => r.status), ['fulfilled', 'rejected']); assert.deepEqual(observer.head, genesis); +}); + +test('expiry is sampled after async verification; a failed attempt does not poison the queue', async t => { + const f = await fixture(); await f.accept(); const observer = f.observer(), gate = delayVerification(t); + const pending = restore(observer, f); await gate.reached; f.now(100); gate.release(); + await assert.rejects(pending, /pointer-restore-conflict-or-stale/); assert.equal(observer.head, null); + f.now(20); assert.deepEqual(await restore(observer, f), f.anchor); +}); + +test('a concurrently replaced acceptance and canceled UI scope cannot commit stale restoration', async t => { + const f = await fixture(); await f.accept(); const observer = f.observer(), gate = delayVerification(t); + const pending = restore(observer, f); await gate.reached; + const newer = await f.sign({ revision: 8, previousDigest: f.anchor.pointerDigest }); + await f.importAnchor(newer); await f.accept(newer); gate.release(); + await assert.rejects(pending, /anchor-not-accepted/); assert.equal(observer.head, null); + await assert.rejects(observer.restoreFromRecovery(f.vault, { expectedDigest: newer.pointerDigest, scopeStillCurrent: () => false }), /pointer-restore-conflict-or-stale/); + assert.equal(observer.head, null); +}); + +test('restore rechecks actual signature and local resource refusal preserves missing head', async t => { + const f = await fixture(); await f.accept(); + const observer = f.observer(); + const verification = t.mock.method(crypto.subtle, 'verify', async () => false); + await assert.rejects(restore(observer, f), /pointer-signature/); assert.equal(observer.head, null); verification.mock.restore(); + const refused = new PointerObserver({ name: f.anchor.name, trustedAuthorityKey: f.authority.publicKey, + clock: () => 20, admission: { reserve() { throw Error('budget-exhausted'); } } }); + await assert.rejects(restore(refused, f), /budget-exhausted/); assert.equal(refused.head, null); +}); diff --git a/tests/primitive-operations.test.js b/tests/primitive-operations.test.js new file mode 100644 index 0000000..ad09130 --- /dev/null +++ b/tests/primitive-operations.test.js @@ -0,0 +1,146 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { Datum, PrimitiveOp, applyPrimitiveOp } from '../src/layer1-uor/index.js'; +import { model, modelExecutionDigest } from '../src/layer1-uor/generated-model.js'; +import { createCheckpoint, replayProgram, resumeProgram, verifyCheckpoint, validateProgram, programWork, MAX_TERM_BITS, MAX_PROGRAM_WORK } from '../src/layer4-compute/replay.js'; +import { canonicalBytes, sha256Bytes } from '../src/layer1-uor/custody.js'; +import { ResourceAdmission } from '../src/layer2-schedulers/policy.js'; +const call = (name, ...args) => model['Stitch.Compute.' + name](...args); +const hex = n => '0x' + n.toString(16); +const code = expected => e => e.code === expected; +// Independent left-to-right modular exponent oracle, including every exponent +// bit above 64. Never computes the unbounded integer x**exponent. +function pow(base, exponent, bits) { + const mask = (1n << BigInt(bits)) - 1n; + let value = 1n; + for (const digit of exponent.toString(2)) { value = value * value & mask; if (digit === '1') value = value * base & mask; } + return value; +} +const typed = (instructions, { bits = 16, capacityBits = 128, initialValueHex = '0xabcd' } = {}) => ({ version: 2, bits, capacityBits, initialValueHex, instructions }); +const arg = (op, argBits, argument) => ({ op, argBits, argHex: hex(BigInt(argument)) }); +const admission = computeSteps => new ResourceAdmission({ clock: () => 1, durationMs: 1000, + limit: { requests: 100, transferBytes: 1000000, storageBytes: 1000000, computeSteps } }); + +test('POW conforms to pinned UOR 0.5.2 overflow, zero-unit and full-width exponent rules', () => { + // Upstream foundation/tests/behavior_adr_053_ring_axis_completion.rs. + for (const [a, b, expected] of [[2n, 8n, 0n], [3n, 5n, 243n], [5n, 4n, 113n], [0n, 0n, 1n]]) { + assert.equal(applyPrimitiveOp(17, Datum.w8(a), Datum.w8(b)).value, expected); + assert.equal(call('ringStep', { opcode: 17, argument: b }, a, 256n), expected); + } + for (const bits of [8, 16, 32, 64, 128]) { + const m = 1n << BigInt(bits), values = [0n, 1n, 2n, 3n, m / 2n + 3n, m - 1n]; + for (const a of values) for (const b of values) { + const expected = pow(a, b, bits); + assert.equal(applyPrimitiveOp(17, new Datum(bits, a), new Datum(bits, b)).value, expected); + assert.equal(call('ringStep', { opcode: 17, argument: b }, a, m), expected); + } + const program = { version: 1, bits, initialValueHex: '0x3', instructions: [{ op: 17, argHex: hex(m - 1n) }] }; + assert.equal(replayProgram(program).stateHex, hex(pow(3n, m - 1n, bits))); + assert.equal(programWork(program), 1 + 2 * bits); + } + // A high exponent whose low64 bits are zero must not be mistaken for 0. + assert.equal(call('ringStep', { opcode: 17, argument: 1n << 100n }, 2n, 1n << 128n), 0n); + assert.equal(call('ringStep', { opcode: 17, argument: 1n << 100n }, 3n, 1n << 128n), 54740098937849875961756722746384973825n); +}); + +test('CONCAT appends big-endian term bytes, retaining widths and leading zero bytes', () => { + // Upstream behavior_catamorphism_evaluator.rs: abcd⧺1234 -> abcd1234. + const result = applyPrimitiveOp(14, Datum.w16(0xabcd), Datum.w16(0x1234)); + assert.equal(result.bits, 32); assert.equal(result.value, 0xabcd1234n); + assert.deepEqual([...result.toBytes()], [0x34, 0x12, 0xcd, 0xab]); // legacy coordinate encoding stays LE + const program = typed([arg(14, 16, 0x1234), arg(14, 8, 0), arg(14, 24, 1)]); + assert.deepEqual(replayProgram(program), { stepIndex: 3, stateBits: 64, stateHex: '0xabcd123400000001' }); + assert.deepEqual(replayProgram(typed([arg(14, 16, 1)], { bits: 8, initialValueHex: '0x0' })), { stepIndex: 1, stateBits: 24, stateHex: '0x1' }); + for (let bits = 8; bits < 128; bits += 8) { + const p = typed([arg(14, 8, 0)], { bits, initialValueHex: '0x1' }); + assert.equal(replayProgram(p).stateBits, bits + 8); + assert.equal(replayProgram(p).stateHex, '0x100'); + } + assert.throws(() => applyPrimitiveOp(14, new Datum(128, 1), Datum.w8(2)), RangeError); + assert.throws(() => applyPrimitiveOp(14, Datum.w8(1)), TypeError); + assert.throws(() => validateProgram({ version: 1, bits: 8, initialValueHex: '0x1', instructions: [{ op: 14, argHex: '0x2' }] }), code('unsupported-operation')); +}); + +test('empty byte sequences are CONCAT identities and keep their exact 0-bit width', () => { + const empty = { bits: 0, capacityBits: 0, initialValueHex: '0x0' }; + assert.deepEqual(replayProgram(typed([arg(14, 0, 0)], empty)), { stepIndex: 1, stateBits: 0, stateHex: '0x0' }); + assert.deepEqual(replayProgram(typed([arg(14, 16, 1)], { ...empty, capacityBits: 16 })), { stepIndex: 1, stateBits: 16, stateHex: '0x1' }); + assert.deepEqual(replayProgram(typed([arg(14, 0, 0)])), { stepIndex: 1, stateBits: 16, stateHex: '0xabcd' }); + assert.deepEqual(replayProgram(typed([{ op: 2 }], { ...empty, capacityBits: 8 })), { stepIndex: 1, stateBits: 8, stateHex: '0x1' }); + assert.throws(() => validateProgram(typed([], { ...empty, initialValueHex: '0x1' })), code('invalid-ring-value')); +}); + +test('version 2 follows width-parametric term arithmetic and byte-sized comparisons', () => { + assert.deepEqual(replayProgram(typed([arg(4, 24, 0xffffff)], { bits: 8, initialValueHex: '0x2' })), { stepIndex: 1, stateBits: 24, stateHex: '0x1' }); + const p = typed([arg(14, 8, 0xff), arg(10, 32, 0xffffff), arg(14, 32, 0x12345678)]); + assert.deepEqual(replayProgram(p), { stepIndex: 3, stateBits: 40, stateHex: '0x112345678' }); + for (const op of [15, 16]) { + assert.throws(() => validateProgram(typed([arg(op, 16, 0)])), code('invalid-typed-operation')); + assert.equal(replayProgram({ version: 1, bits: 8, initialValueHex: '0xa', instructions: [{ op, argHex: '0x0' }] }).stateHex, '0x0'); + } + for (const bits of [24, 40, 72, 120, 136]) { + const cap = Math.max(256, bits), x = (1n << BigInt(bits)) - 3n; + for (const op of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17]) { + const instruction = op < 4 ? { op } : arg(op, bits, 3); + const p = typed([instruction], { bits, capacityBits: cap, initialValueHex: hex(x) }); + const expected = op === 17 ? pow(x, 3n, bits) : call('ringStep', { opcode: op, argument: op < 4 ? 0 : 3 }, x, 1n << BigInt(bits)); + assert.equal(replayProgram(p).stateHex, hex(expected)); + assert.equal(replayProgram(p).stateBits, op >= 10 && op <= 13 ? 8 : bits); + } + } +}); + +test('version 2 checkpoints bind exact width, input, capacity, predecessor and execution semantics', async () => { + const p = typed([arg(14, 8, 0), arg(17, 24, 3), arg(14, 16, 1)]); + for (let step = 0; step <= p.instructions.length; step++) { + const cp = await createCheckpoint(p, step); + assert.equal(cp.version, 2); assert.equal(cp.modelDigest, modelExecutionDigest); + assert.equal((await verifyCheckpoint(p, cp)).execution, 'replayed'); + const resumed = await resumeProgram(p, cp); + assert.equal(resumed.stateHex, replayProgram(p).stateHex); assert.equal(resumed.stateBits, replayProgram(p).stateBits); + if (step) { + const prev = await createCheckpoint(p, step - 1), next = await createCheckpoint(p, step, prev); + assert.equal((await verifyCheckpoint(p, next, prev)).predecessor, 'checked'); + } + const forged = { ...cp, stateBits: cp.stateBits + 8 }; delete forged.checkpointDigest; + forged.checkpointDigest = await sha256Bytes(canonicalBytes(forged), 'checkpoint'); + await assert.rejects(verifyCheckpoint(p, forged), code('checkpoint-replay')); + await assert.rejects(verifyCheckpoint({ ...p, capacityBits: 256 }, cp), code('program-mismatch')); + await assert.rejects(verifyCheckpoint(p, { ...cp, modelDigest: 'sha256:' + '0'.repeat(64) }), code('checkpoint-model')); + await assert.rejects(verifyCheckpoint(p, { ...cp, version: 1 }), code('unsupported-checkpoint')); + } +}); + +test('abstract work accounts multiplication rounds and bytes before evaluation and resume', async () => { + const p = typed([arg(14, 8, 0), arg(17, 24, 3)]); + assert.equal(programWork(p), 4 + 5); // concat writes 3 bytes, pow 3 uses 4 modular multiplications + const policy = admission(8); + assert.throws(() => replayProgram(p, 2, policy), code('budget-exhausted')); + assert.equal(policy.state.spent.computeSteps, 0); + const enough = admission(9); replayProgram(p, 2, enough); assert.equal(enough.state.spent.computeSteps, 9); + const cp = await createCheckpoint(p, 1), resumed = admission(9); + await resumeProgram(p, cp, { admission: resumed }); assert.equal(resumed.state.spent.computeSteps, 9); + const zero = typed([arg(17, 16, 0)]); assert.equal(programWork(zero), 1); + const exp = (1n << 128n) - 1n, wide = typed([arg(17, 128, exp)], { bits: 128, initialValueHex: '0x3' }); + assert.equal(programWork(wide), 1 + 4 * 256); +}); + +test('maximum declared capacity executes without stack growth; hostile size/work is refused', () => { + const all = (1n << BigInt(MAX_TERM_BITS)) - 1n; + const concat = typed([arg(14, MAX_TERM_BITS - 8, 1)], { bits: 8, capacityBits: MAX_TERM_BITS, initialValueHex: '0x1' }); + const r = replayProgram(concat); assert.equal(r.stateBits, MAX_TERM_BITS); assert.equal(BigInt(r.stateHex), (1n << BigInt(MAX_TERM_BITS - 8)) + 1n); + const xor = typed([arg(7, MAX_TERM_BITS, all)], { bits: MAX_TERM_BITS, capacityBits: MAX_TERM_BITS, initialValueHex: hex(all) }); + assert.equal(replayProgram(xor).stateHex, '0x0'); assert.equal(programWork(xor), 1 + MAX_TERM_BITS); + const hostile = typed([arg(17, MAX_TERM_BITS, all)], { bits: MAX_TERM_BITS, capacityBits: MAX_TERM_BITS, initialValueHex: '0x3' }); + assert.throws(() => validateProgram(hostile), code('program-work-limit')); + // Test the source tail-recursive power primitive at maximum bit length without + // permitting an undercharged program. No unbounded exponent integer is built. + assert.equal(call('ringPow', MAX_TERM_BITS, 0, all, 1n << BigInt(MAX_TERM_BITS), 1), 0n); + assert.throws(() => validateProgram({ ...concat, capacityBits: MAX_TERM_BITS + 8 }), code('invalid-integer')); + assert.throws(() => validateProgram(typed([arg(14, 8, 1)], { bits: 128, capacityBits: 128, initialValueHex: '0x0' })), code('invalid-typed-operation')); + assert.throws(() => validateProgram(typed([arg(14, 7, 1)])), code('unsupported-width')); + assert.throws(() => validateProgram(typed([{ op: 14, argBits: 16, argHex: '0x10000' } ])), code('invalid-ring-value')); + assert.throws(() => validateProgram(typed([{ op: 14, argBits: 16, argHex: '0x00' } ])), code('invalid-ring-value')); + assert.throws(() => validateProgram(typed(new Array(1025).fill({ op: 2 }))), code('program-limit')); + assert.ok(MAX_PROGRAM_WORK < Number.MAX_SAFE_INTEGER); +}); diff --git a/tests/prism-bus.test.js b/tests/prism-bus.test.js new file mode 100644 index 0000000..a3b6570 --- /dev/null +++ b/tests/prism-bus.test.js @@ -0,0 +1,201 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { + createPrism, createDevice, resolvePrism, revokeDevice, createLinkOffer, parseLinkUri, requestLink, acceptLinkRequest, + completeLink, rendezvousTopic, linkCode, currentBoundary, syncTopic, publishSync, receiveSync, signAction, verifyAction, PrismIdError, + createRelayBus, relayTopic, linkQr, createMemoryBus, publishLog, heardLog, logTopic, createSyncCadence +} from '../src/prism-id.js'; + +const HOST = 'https://foundry.uor.foundation'; +const json = value => new TextEncoder().encode(JSON.stringify(value)); +const parse = bytes => JSON.parse(new TextDecoder().decode(bytes)); +const refused = code => error => error instanceof PrismIdError && error.code === code; +const settle = () => new Promise(resolve => setTimeout(resolve, 20)); + +/** An ntfy-shaped relay in memory: POST keeps a message, GET ?poll=1 lists them, a socket hears new ones. */ +function fakeRelay() { + const topics = new Map(), sockets = new Set(), posted = []; + const lines = name => topics.get(name) ?? []; + async function fetch(url, init = {}) { + const { pathname } = new URL(url); + const name = pathname.split('/')[1]; + if (init.method === 'POST') { + posted.push({ name, body: init.body }); + topics.set(name, [...lines(name), init.body]); + for (const socket of sockets) if (socket.name === name) socket.onmessage?.({ data: JSON.stringify({ event: 'message', message: init.body }) }); + return { ok: true, status: 200 }; + } + const body = lines(name).map(message => JSON.stringify({ event: 'message', message })).join('\n'); + return { ok: true, status: 200, text: async () => body }; + } + class WebSocket { + constructor(url) { this.name = new URL(url).pathname.split('/')[1]; sockets.add(this); } + close() { sockets.delete(this); } + } + return { fetch, WebSocket, posted, sockets }; +} + +const bus = relay => createRelayBus({ relay: 'https://relay.test', fetch: relay.fetch, WebSocket: relay.WebSocket, BroadcastChannel: null }); + +test('the relay sees a hashed topic and the framed bytes; another bus gets them, live and from what the relay holds', async () => { + const relay = fakeRelay(); + const a = bus(relay), b = bus(relay); + const topic = 'prism-sync:' + 'ab'.repeat(32); + const live = []; + const stop = b.subscribe(topic, bytes => live.push(parse(bytes))); + await settle(); + assert.equal(await a.publish(topic, json({ n: 1 })), true); + await settle(); + assert.deepEqual(live, [{ n: 1 }]); + assert.equal(relay.posted[0].name, await relayTopic(topic)); + assert.ok(!relay.posted[0].name.includes('ab'.repeat(8)) && relay.posted[0].name.length <= 64); + // Later, and only for this topic: what the relay still holds. + assert.deepEqual((await b.retained(topic)).map(parse), [{ n: 1 }]); + assert.deepEqual(await b.retained('prism-sync:' + 'cd'.repeat(32)), []); + // A bus never hears itself. + assert.deepEqual(await a.retained(topic), []); + stop(); + assert.equal(relay.sockets.size, 0); + assert.throws(() => a.subscribe('not-a-topic', () => {}), TypeError); +}); + +test('a message larger than one relay frame arrives whole', async () => { + const relay = fakeRelay(); + const big = new Uint8Array(40000).map((_, i) => i % 251); + await bus(relay).publish('prism-sync:' + '01'.repeat(32), big); + assert.ok(relay.posted.length > 1); + const [got] = await bus(relay).retained('prism-sync:' + '01'.repeat(32)); + assert.deepEqual(got, big); +}); + +test('two devices link over the relay, with the six-digit code, and then sync a removal', async () => { + const relay = fakeRelay(); + const now = Date.now(); + // The person's first device, and the browser they want to add. + let first = await createPrism(); + const firstBus = bus(relay), newBus = bus(relay); + const { uri, pending } = await createLinkOffer(first, { now }); + const joining = await createDevice(); + + // Out of band: the new device reads the offer (QR code or pasted text) and answers on the rendezvous topic. + const offer = parseLinkUri(uri); + const topic = await rendezvousTopic(offer.secret); + const requests = []; + const stopFirst = firstBus.subscribe(topic, bytes => requests.push(parse(bytes))); + const responses = []; + const stopNew = newBus.subscribe(topic, bytes => responses.push(parse(bytes))); + await settle(); + await newBus.publish(topic, json(await requestLink(joining, offer))); + await settle(); + assert.equal(requests.length, 1); + + // Both screens show the same code; the person confirms it on the first device. + const code = await linkCode(offer.secret, joining.record); + const accepted = await acceptLinkRequest(first, pending, requests[0], { now: now + 1000, confirmCode: code }); + first = accepted.session; + await firstBus.publish(topic, json(accepted.response)); + await settle(); + const second = await completeLink(joining, offer, responses[0]); + stopFirst(); stopNew(); + assert.equal(second.prism, first.prism); + + // The same prism id signs in from the new device. + const signed = await signAction(second, 'prism/session/1', { app: 1 }, { now: now + 2000, audience: HOST }); + await verifyAction(second.prism, second.log, signed, { audience: HOST, now: now + 2000 }); + + // The first device removes a lost device; the second hears it on the sync topic. + const lost = await createDevice(); + const linkedLost = await createLinkOffer(first, { now }); + const lostRequest = await requestLink(lost, parseLinkUri(linkedLost.uri)); + first = (await acceptLinkRequest(first, linkedLost.pending, lostRequest, { now: now + 1000, + confirmCode: await linkCode(parseLinkUri(linkedLost.uri).secret, lost.record) })).session; + const { keyId: before } = await currentBoundary(first); + first = await revokeDevice(first, lost.id); + // After a rotation, once under the previous key too: the second device still listens there. + await publishSync(first, firstBus); + await publishSync(first, firstBus, { keyId: before }); + let synced = second; + for (const bytes of await bus(relay).retained(await syncTopic(second))) { + try { synced = await receiveSync(synced, bytes); } catch (error) { if (!(error instanceof PrismIdError)) throw error; } + } + const state = await resolvePrism(synced.prism, synced.log); + assert.ok(state.revoked.includes(lost.id)); + assert.ok(state.active.includes(joining.id)); +}); + +test('a copied genesis with another signature cannot make the log unresolvable', async () => { + const session = await createPrism(); + const [genesis] = session.log.values(); + const forged = { ...genesis, signature: genesis.signature.slice(0, -4) + 'AAAA' }; + const log = new Map([...session.log, ['forged', forged]]); + assert.deepEqual((await resolvePrism(session.prism, log)).active, [session.device.id]); + await assert.rejects(resolvePrism(session.prism, new Map([['forged', forged]])), refused('genesis')); +}); + +test('a link offer becomes a QR code: version 13 at level M for a 301-character link, finder patterns in three corners, the same modules every time', async () => { + const offer = { expires: 1800000000000, kind: 'prism/link-offer/1', prism: 'sha256:' + 'ab'.repeat(32), role: 'member', scope: [], secret: 'A'.repeat(43) }; + const uri = 'prism-link:' + Buffer.from(JSON.stringify(offer)).toString('base64url'); + const qr = linkQr(uri); + assert.equal(qr.size, 69); + const finder = (x, y) => [0, 1, 2, 3, 4, 5, 6].map(dy => [0, 1, 2, 3, 4, 5, 6].map(dx => qr.modules[y + dy][x + dx] ? 1 : 0).join('')).join('/'); + const expected = '1111111/1000001/1011101/1011101/1011101/1000001/1111111'; + assert.deepEqual([finder(0, 0), finder(qr.size - 7, 0), finder(0, qr.size - 7)], [expected, expected, expected]); + // Checked against an independent decoder (jsQR 1.4.0), which reads this matrix back as the URI. + const digest = createHash('sha256').update(qr.modules.map(row => row.map(Number).join('')).join('\n')).digest('hex'); + assert.equal(digest, 'a9f2dd10239cef525de976795c8ab9a771fb05381e1f0b81b0b3bcfe2628687e'); + + const prism = await createPrism(); + const { uri: live } = await createLinkOffer(prism, { now: Date.now() }); + assert.equal(linkQr(live).size, linkQr(live).modules.length); + assert.throws(() => linkQr('https://example.test'), refused('offer')); +}); + +// Link a second member device directly, as the relay test above does over the bus. +async function linkMember(session, now) { + const joining = await createDevice(); + const { uri, pending } = await createLinkOffer(session, { now }); + const offer = parseLinkUri(uri); + const accepted = await acceptLinkRequest(session, pending, await requestLink(joining, offer), { now, confirmCode: await linkCode(offer.secret, joining.record) }); + return { first: accepted.session, second: await completeLink(joining, offer, accepted.response) }; +} + +test('a host hears a removal the removed device never presents, from the prism public log', async () => { + const now = Date.now(); + const relay = fakeRelay(); + const { first, second } = await linkMember(await createPrism(), now); + const removed = await revokeDevice(first, second.device.id); + await publishLog(removed, bus(relay)); + + // The removed device never syncs: it signs with the log it holds, where it is still active. + const action = await signAction(second, 'prism/session/1', { app: 1 }, { now, audience: HOST }); + assert.equal((await verifyAction(second.prism, second.log, action, { audience: HOST, now })).allowed, true); + const heard = await verifyAction(second.prism, second.log, action, { audience: HOST, now, bus: bus(relay) }); + assert.deepEqual([heard.allowed, heard.reason], [false, 'signature or revocation']); + + // Anything else on the topic counts for nothing: another prism's log, junk, a forged revocation. + const other = await createPrism(); + const memory = createMemoryBus(), topic = await logTopic(second.prism); + await memory.publish(topic, json({ kind: 'prism/public-log/1', prism: other.prism, records: [...other.log.values()] })); + await memory.publish(topic, new TextEncoder().encode('not json')); + const [revocation] = [...removed.log.values()].filter(e => e.body.kind === 'prism/revoke/1'); + const forged = { ...revocation, signature: revocation.signature.slice(0, -4) + 'AAAA' }; + await memory.publish(topic, json({ kind: 'prism/public-log/1', prism: second.prism, records: [...second.log.values(), forged] })); + const log = await heardLog(second.prism, second.log, memory); + assert.ok((await resolvePrism(second.prism, log)).active.includes(second.device.id)); + assert.equal((await verifyAction(second.prism, second.log, action, { audience: HOST, now, bus: memory })).allowed, true); +}); + +test('the sync cadence refreshes: a real sync and the public log every refresh ticks, cover otherwise', async () => { + const relay = fakeRelay(); + const session = await createPrism(); + const cadence = createSyncCadence({ refresh: 3 }); + const syncName = await relayTopic(await syncTopic(session)), logName = await relayTopic(await logTopic(session.prism)); + for (let i = 0; i < 6; i++) await cadence.tick(session, bus(relay)); + assert.equal(relay.posted.filter(p => p.name === syncName).length >= 6, true); + assert.equal(relay.posted.filter(p => p.name === logName).length > 0, true); + const kept = await bus(relay).retained(await logTopic(session.prism)); + assert.equal(kept.length, 2); + assert.equal((await heardLog(session.prism, new Map(), bus(relay))).size, session.log.size); + assert.throws(() => createSyncCadence({ refresh: 0 }), refused('sync')); +}); diff --git a/tests/prism-id.test.js b/tests/prism-id.test.js new file mode 100644 index 0000000..c969018 --- /dev/null +++ b/tests/prism-id.test.js @@ -0,0 +1,673 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { spawnSync } from 'node:child_process'; +import { + canonicalJson, kappa, isKappa, createPrism, createDevice, checkDeviceRecord, resolvePrism, canSign, revokeDevice, + createLinkOffer, parseLinkUri, requestLink, acceptLinkRequest, completeLink, rendezvousTopic, linkCode, + mergeLogs, logRoot, addRecord, logFromRecords, describeBoundary, boundaryVisibleTo, sealPrivate, openPrivate, + currentBoundary, syncTopic, publishSync, receiveSync, createMemoryBus, signAction, verifyAction, hostAdmitsDevice, + PrismIdError, KIND, MAX_LOG_RECORDS, MAX_SYNC_BYTES, postQuantumAvailable, hardenSession, createRecovery, releaseShare, + recoveryCode, recoverPrism, splitSecret, combineShares, ensurePersona, personaFor, signPersonaAction, admitDevice, padToBucket, unpad, + postQuantumSignaturesAvailable, presenceChallenge, publishCover, createSyncCadence, toBase64Url +} from '../src/prism-id.js'; + +const NOW = 1_800_000_000_000; +const HOST = 'https://foundry.uor.foundation'; +const AT = { audience: HOST, now: NOW }; +const vectors = JSON.parse(readFileSync(new URL('./fixtures/prism-id-vectors.json', import.meta.url))); + +/** Link a device the way a person does: scan, compare the six-digit code on both screens, confirm. */ +async function link(session, { now = NOW, role = 'member', scope = [], device } = {}) { + const { uri, pending } = await createLinkOffer(session, { now, role, scope }); + const offer = parseLinkUri(uri); + const joining = device ?? await createDevice(); + const request = await requestLink(joining, offer); + const shownOnNewDevice = await linkCode(offer.secret, joining.record); + const accepted = await acceptLinkRequest(session, pending, request, { now: now + 1000, confirmCode: shownOnNewDevice }); + const joined = await completeLink(joining, offer, accepted.response); + return { origin: accepted.session, joined, offer, pending, request }; +} + +async function capture(bus, session, options) { + let got; + const topic = await syncTopic(session, options?.keyId); + const stop = bus.subscribe(topic, bytes => { got = bytes; }); + await publishSync(session, bus, options); + stop(); + return got; +} + +test('canonical JSON follows uor-addr: UTF-8 member order, integers only, NFC strings', async () => { + assert.equal(canonicalJson({ b: 1, a: [true, null, 'x'], '\u00e9': 2, Z: -3 }), '{"Z":-3,"a":[true,null,"x"],"b":1,"\u00e9":2}'); + // UTF-16 order would put U+1F600 first; UTF-8 byte order puts U+FF61 first. + assert.equal(canonicalJson({ '\u{1F600}': 1, '\uFF61': 2 }), '{"\uFF61":2,"\u{1F600}":1}'); + assert.equal(canonicalJson('a"\\\b\t\n\f\r\u0001/\u007f'), '"a\\"\\\\\\b\\t\\n\\f\\r\\u0001/\u007f"'); + for (const bad of [1.5, -0, 2 ** 53, NaN, 'e\u0301', { k: undefined }, new Date(0), '\ud800']) + assert.throws(() => canonicalJson(bad), PrismIdError, String(bad)); + assert.equal(await kappa({}), 'sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a'); + assert.equal(await kappa({ b: 1, a: 2 }), await kappa({ a: 2, b: 1 })); +}); + +test('published conformance vectors hold, so any runtime can check its own implementation', async () => { + for (const v of vectors.canonical) { + assert.equal(canonicalJson(v.value), v.canonical, v.name); + assert.equal(await kappa(v.value), v.kappa, v.name); + } + for (const v of vectors.refused) assert.throws(() => canonicalJson(v.value), PrismIdError, v.name); + const log = await logFromRecords(vectors.prism.records); + const state = await resolvePrism(vectors.prism.id, log); + assert.deepEqual(state.active, vectors.prism.active); + assert.deepEqual(state.roles, vectors.prism.roles); + assert.deepEqual(state.scopes, vectors.prism.scopes); +}); + +test('an independent Python implementation agrees on every canonical vector', () => { + const run = spawnSync('python3', ['-I', 'scripts/verify-prism-id-vectors.py', 'tests/fixtures/prism-id-vectors.json'], { encoding: 'utf8' }); + assert.equal(run.status, 0, run.stderr + run.stdout); + assert.match(run.stdout, /^verified \d+ canonical vectors and \d+ refusals$/m); +}); + +test('a prism comes into being without any account; its id is the kappa of its genesis', async () => { + const session = await createPrism(); + assert.ok(isKappa(session.prism)); + const [genesis] = session.log.values(); + assert.equal(genesis.body.kind, KIND.genesis); + assert.equal(await kappa(genesis.body), session.prism); + const state = await resolvePrism(session.prism, session.log); + assert.deepEqual(state.active, [session.device.id]); + assert.deepEqual(state.roles, { [session.device.id]: 'member' }); + assert.deepEqual(state.boundary, { epoch: 0, keyId: session.prism }); + assert.equal(await canSign(session.prism, session.log, session.device.id), true); + assert.notEqual((await createPrism()).prism, session.prism); +}); + +test('every device class uses the same record; keys are non-extractable and claims are bounded', async () => { + for (const [deviceClass, protection] of [['browser', 'software'], ['native', 'platform'], ['mobile', 'platform'], ['embedded', 'secure-element']]) { + const device = await createDevice({ deviceClass, protection }); + assert.equal(device.signingKey.extractable, false); + assert.equal(device.agreementKey.extractable, false); + assert.equal(device.id, await kappa(device.record)); + const fields = ['agree', 'class', 'kind', 'protection', 'sign', ...(await postQuantumAvailable() ? ['kem'] : []), + ...(await postQuantumSignaturesAvailable() ? ['pqsign'] : [])].sort(); + assert.deepEqual(Object.keys(device.record).sort(), fields); + assert.equal(checkDeviceRecord(device.record), device.record); + } + await assert.rejects(createDevice({ deviceClass: 'toaster' }), PrismIdError); + await assert.rejects(createDevice({ protection: 'trust-me' }), PrismIdError); + const device = await createDevice(); + assert.throws(() => checkDeviceRecord({ ...device.record, extra: 1 }), PrismIdError); +}); + +test('a mobile app and a native install join as members and receive the private boundary', async () => { + const session = await createPrism(); + const secret = await sealPrivate(session, { note: 'only my devices' }); + const phone = await link(session, { device: await createDevice({ deviceClass: 'mobile', protection: 'platform' }) }); + const desktop = await link(phone.origin, { device: await createDevice({ deviceClass: 'native', protection: 'platform' }) }); + const state = await resolvePrism(session.prism, desktop.origin.log); + assert.deepEqual(state.active, [session.device.id, phone.joined.device.id, desktop.joined.device.id].sort()); + assert.equal(state.roles[desktop.joined.device.id], 'member'); + assert.deepEqual(await openPrivate(phone.joined, secret.sealed), { note: 'only my devices' }); + assert.deepEqual(await openPrivate(desktop.joined, secret.sealed), { note: 'only my devices' }); + assert.equal(await logRoot(desktop.origin.log), await logRoot(desktop.joined.log)); +}); + +test('the link needs the person to confirm the code shown on the joining device', async () => { + const session = await createPrism(); + const { uri, pending } = await createLinkOffer(session, { now: NOW }); + const offer = parseLinkUri(uri); + const mine = await createDevice(); + const thief = await createDevice(); + // Someone photographs the QR code and answers first. Their code differs from the one on the person's device. + const stolen = await requestLink(thief, offer); + const shownToPerson = await linkCode(offer.secret, mine.record); + assert.notEqual(await linkCode(offer.secret, thief.record), shownToPerson); + await assert.rejects(acceptLinkRequest(session, pending, stolen, { now: NOW, confirmCode: shownToPerson }), /link request refused/); + await assert.rejects(acceptLinkRequest(session, pending, await requestLink(mine, offer), { now: NOW }), /link request refused/); + assert.equal(pending.used, false); + const accepted = await acceptLinkRequest(session, pending, await requestLink(mine, offer), { now: NOW, confirmCode: shownToPerson }); + assert.ok((await resolvePrism(session.prism, accepted.session.log)).active.includes(mine.id)); + assert.match(shownToPerson, /^\d{6}$/); +}); + +test('the offer is single use, expires, and refuses a request without the secret', async () => { + const session = await createPrism(); + const { uri, pending } = await createLinkOffer(session, { now: NOW, ttl: 1000 }); + const offer = parseLinkUri(uri); + const device = await createDevice(); + const request = await requestLink(device, offer); + const confirmCode = await linkCode(offer.secret, device.record); + await assert.rejects(acceptLinkRequest(session, pending, request, { now: NOW + 1000, confirmCode }), /link request refused/); + const forged = await requestLink(device, { ...offer, secret: 'A'.repeat(43) }); + await assert.rejects(acceptLinkRequest(session, pending, forged, { now: NOW, confirmCode }), /link request refused/); + await acceptLinkRequest(session, pending, request, { now: NOW, confirmCode }); + await assert.rejects(acceptLinkRequest(session, pending, request, { now: NOW, confirmCode }), /link request refused/); + const stranger = await createPrism(); + await assert.rejects(completeLink(await createDevice(), { ...offer, prism: stranger.prism }, { kind: KIND.response, prism: stranger.prism, records: [...stranger.log.values()] }), /did not bind this device/); + assert.throws(() => parseLinkUri('prism-link:' + Buffer.from('{"kind":"x"}').toString('base64url')), /malformed link offer/); +}); + +test('an embedded device joins as a scoped delegate and never holds the private boundary', async () => { + const session = await createPrism(); + const sensor = await createDevice({ deviceClass: 'embedded', protection: 'secure-element' }); + const { origin, joined } = await link(session, { device: sensor, role: 'delegate', scope: ['telemetry/write'] }); + assert.equal(joined.keyring.size, 0); + const state = await resolvePrism(session.prism, origin.log); + assert.equal(state.roles[sensor.id], 'delegate'); + assert.deepEqual(state.scopes[sensor.id], ['telemetry/write']); + const inScope = await signAction(joined, 'telemetry/write', { celsius: 21 }, { now: NOW, audience: HOST }); + assert.equal((await verifyAction(session.prism, origin.log, inScope, AT)).allowed, true); + const outOfScope = await signAction(joined, 'profile/update', { name: 'x' }, { now: NOW, audience: HOST }); + assert.equal((await verifyAction(session.prism, origin.log, outOfScope, AT)).allowed, false); + await assert.rejects(sealPrivate(joined, { x: 1 }), /current private boundary key/); + await assert.rejects(createLinkOffer(joined, { now: NOW }), /may not administer/); + await assert.rejects(revokeDevice(joined, session.device.id), /may not administer/); + await assert.rejects(createLinkOffer(origin, { now: NOW, role: 'delegate', scope: [] }), /delegate needs/); +}); + +test('a delegate cannot bind a device even with a valid signature', async () => { + const session = await createPrism(); + const { origin, joined } = await link(session, { role: 'delegate', scope: ['telemetry/write'] }); + const rogue = await createDevice(); + const body = { kind: KIND.bind, prism: session.prism, device: rogue.record, role: 'member', scope: [] }; + const signature = await globalThis.crypto.subtle.sign({ name: 'ECDSA', hash: 'SHA-256' }, joined.device.signingKey, new TextEncoder().encode(canonicalJson(body))); + const forgedBind = { body, signer: joined.device.id, signature: Buffer.from(signature).toString('base64url') }; + const state = await resolvePrism(session.prism, await addRecord(origin.log, forgedBind)); + assert.equal(state.active.includes(rogue.id), false); +}); + +test('an unlinked device cannot bind devices or revoke', async () => { + const session = await createPrism(); + const outsider = await createPrism(); + const forged = { ...session, device: outsider.device }; + await assert.rejects(revokeDevice(forged, session.device.id), /may not administer/); + await assert.rejects(createLinkOffer(forged, { now: NOW }), /may not administer/); + const { joined } = await link(outsider); + const state = await resolvePrism(session.prism, mergeLogs(session.log, joined.log)); + assert.deepEqual(state.active, [session.device.id]); +}); + +test('revocation rotates the private boundary key away from the revoked device', async () => { + const bus = createMemoryBus(); + const session = await createPrism(); + const phone = await link(session); + const laptop = await link(phone.origin); + let origin = laptop.origin, phoneSession = phone.joined, laptopSession = laptop.joined; + phoneSession = await receiveSync(phoneSession, await capture(bus, origin)); + const before = await syncTopic(phoneSession); + // The laptop is stolen. The phone revokes it; the revocation carries a new key wrapped to the remaining members. + const revokedByPhone = await revokeDevice(phoneSession, laptopSession.device.id); + const state = await resolvePrism(session.prism, revokedByPhone.log); + assert.equal(state.boundary.epoch, 1); + assert.deepEqual(state.revoked, [laptopSession.device.id]); + assert.deepEqual(state.rekeys[0].wraps.map(w => w.device).sort(), [session.device.id, phoneSession.device.id].sort()); + const after = await syncTopic(revokedByPhone); + assert.notEqual(after, before); + // The origin device still listens on the old topic; one publish there hands it the new key. + origin = await receiveSync(origin, await capture(bus, revokedByPhone, { keyId: session.prism })); + assert.equal(await syncTopic(origin), after); + const fresh = await sealPrivate(origin, { after: 'rotation' }); + assert.equal(fresh.sealed.key, state.boundary.keyId); + assert.deepEqual(await openPrivate(revokedByPhone, fresh.sealed), { after: 'rotation' }); + // The revoked laptop sees the log but cannot take up the new key, seal, or open new content. + laptopSession = await receiveSync(laptopSession, await capture(bus, revokedByPhone, { keyId: session.prism })); + assert.equal(laptopSession.keyring.has(state.boundary.keyId), false); + await assert.rejects(openPrivate(laptopSession, fresh.sealed), /does not hold/); + await assert.rejects(sealPrivate(laptopSession, { x: 1 }), /current private boundary key/); + await assert.rejects(currentBoundary(laptopSession), /current private boundary key/); + assert.equal(await canSign(session.prism, laptopSession.log, laptopSession.device.id), false); +}); + +test('rotation keeps the devices the revoker knew, and revocation wins over a later bind', async () => { + const session = await createPrism(); + const { origin, joined } = await link(session); + const rotated = await revokeDevice(joined, session.device.id); + const state = await resolvePrism(session.prism, rotated.log); + assert.deepEqual(state.active, [joined.device.id]); + assert.equal(await canSign(session.prism, rotated.log, session.device.id), false); + const late = await createLinkOffer(origin, { now: NOW }); + const intruder = await createDevice(); + const accepted = await acceptLinkRequest(origin, late.pending, await requestLink(intruder, late.offer), { now: NOW, confirmCode: await linkCode(late.offer.secret, intruder.record) }); + const after = await resolvePrism(session.prism, mergeLogs(rotated.log, accepted.session.log)); + assert.deepEqual(after.active, [joined.device.id]); +}); + +test('two members that revoke each other are both revoked', async () => { + const session = await createPrism(); + const { origin, joined } = await link(session); + const a = await revokeDevice(origin, joined.device.id); + const b = await revokeDevice(joined, origin.device.id); + const state = await resolvePrism(session.prism, mergeLogs(a.log, b.log)); + assert.deepEqual(state.active, []); + assert.deepEqual(state.revoked, [origin.device.id, joined.device.id].sort()); +}); + +test('a revoked device can no longer act for the prism at a host', async () => { + const session = await createPrism(); + const { origin, joined } = await link(session); + const action = await signAction(joined, 'profile/update', { name: 'x' }, { now: NOW, audience: HOST }); + assert.equal((await verifyAction(session.prism, origin.log, action, AT)).allowed, true); + const revoked = await revokeDevice(origin, joined.device.id); + assert.equal((await verifyAction(session.prism, revoked.log, action, AT)).allowed, false); + const tampered = { ...action, body: { ...action.body, action: 'admin/everything' } }; + assert.equal((await verifyAction(session.prism, origin.log, tampered, AT)).allowed, false); +}); + +test('a host refuses an action replayed, sent to another host, or outside its time window', async () => { + const session = await createPrism(); + const seen = new Set(); + const action = await signAction(session, 'profile/update', { name: 'x' }, { now: NOW, audience: HOST }); + assert.equal((await verifyAction(session.prism, session.log, action, { ...AT, seen })).allowed, true); + assert.equal((await verifyAction(session.prism, session.log, action, { ...AT, seen })).reason, 'audience, replay or time window'); + assert.equal((await verifyAction(session.prism, session.log, action, { audience: 'https://other.example', now: NOW })).allowed, false); + assert.equal((await verifyAction(session.prism, session.log, action, { ...AT, now: NOW + 60001 })).allowed, false); + assert.equal((await verifyAction(session.prism, session.log, action, { ...AT, now: NOW - 60001 })).allowed, false); + await assert.rejects(signAction(session, 'profile/update', {}, { now: NOW }), /audience/); +}); + +test('a host that requires hardware-held keys admits only attested devices', () => { + assert.equal(hostAdmitsDevice({}, {}), true); + assert.equal(hostAdmitsDevice({ requiresHardwareKey: true }, {}), false); + assert.equal(hostAdmitsDevice({ requiresHardwareKey: true }, { attestedHardwareKey: 'yes' }), false); + assert.equal(hostAdmitsDevice({ requiresHardwareKey: true }, { attestedHardwareKey: true }), true); +}); + +test('log merge is commutative, associative and idempotent', async () => { + const session = await createPrism(); + const a = (await link(session)).origin; + const b = (await link(session)).origin; + const other = (await resolvePrism(a.prism, a.log)).active.find(d => d !== session.device.id); + const c = await revokeDevice(a, other); + assert.equal(await logRoot(mergeLogs(a.log, b.log)), await logRoot(mergeLogs(b.log, a.log))); + assert.equal(await logRoot(mergeLogs(mergeLogs(a.log, b.log), c.log)), await logRoot(mergeLogs(a.log, mergeLogs(b.log, c.log)))); + assert.equal(await logRoot(mergeLogs(a.log, a.log)), await logRoot(a.log)); + assert.equal(await logRoot(await addRecord(a.log, [...a.log.values()][0])), await logRoot(a.log)); +}); + +test('one identity is a private boundary; two make it shared; publishing makes it public', async () => { + const [p, q, r] = await Promise.all([createPrism(), createPrism(), createPrism()]); + assert.equal(describeBoundary({ members: [p.prism] }).visibility, 'private'); + assert.equal(describeBoundary({ members: [p.prism, p.prism] }).visibility, 'private'); + const shared = describeBoundary({ members: [q.prism, p.prism] }); + assert.equal(shared.visibility, 'shared'); + assert.deepEqual(shared.members, [p.prism, q.prism].sort()); + assert.equal(boundaryVisibleTo(shared, q.prism), true); + assert.equal(boundaryVisibleTo(shared, r.prism), false); + assert.equal(describeBoundary({ members: [p.prism], published: true }).visibility, 'public'); + assert.equal(boundaryVisibleTo(describeBoundary({ members: [p.prism], published: true }), r.prism), true); + assert.throws(() => describeBoundary({ members: [] }), PrismIdError); +}); + +test('after linking, devices sync over the substrate bus on a topic only they can derive', async () => { + const bus = createMemoryBus(); + const session = await createPrism(); + const { origin, joined } = await link(session); + let phone = joined; + const topic = await syncTopic(origin); + assert.equal(topic, await syncTopic(phone)); + assert.notEqual(topic, await syncTopic(await createPrism())); + bus.subscribe(topic, async bytes => { phone = await receiveSync(phone, bytes); }); + const third = await link(origin); + await publishSync(third.origin, bus); + const state = await resolvePrism(session.prism, phone.log); + assert.equal(state.active.length, 3); + assert.ok(state.active.includes(third.joined.device.id)); + // A message sealed for another prism does not open, even under the same key bytes. + const stranger = await createPrism(); + const forged = { ...stranger, keyring: new Map([[session.prism, phone.keyring.get(session.prism)]]) }; + const bytes = await capture(bus, forged, { keyId: session.prism }); + await assert.rejects(receiveSync(phone, bytes), { name: 'OperationError' }); +}); + +test('oversized logs and sync messages are refused before any signature work', async () => { + const session = await createPrism(); + const [genesis] = session.log.values(); + await assert.rejects(logFromRecords(Array(MAX_LOG_RECORDS + 1).fill(genesis)), /exceeds/); + await assert.rejects(receiveSync(session, new Uint8Array(MAX_SYNC_BYTES + 1)), /exceeds/); +}); + +test('the rendezvous topic depends only on the out-of-band secret', async () => { + const session = await createPrism(); + const one = await createLinkOffer(session, { now: NOW }); + const two = await createLinkOffer(session, { now: NOW }); + assert.equal(await rendezvousTopic(one.offer.secret), await rendezvousTopic(one.offer.secret)); + assert.notEqual(await rendezvousTopic(one.offer.secret), await rendezvousTopic(two.offer.secret)); +}); + +// ---------------------------------------------------------------- closing the residual gaps + +async function syncAll(bus, from, ...to) { + const bytes = await capture(bus, from); + return Promise.all(to.map(s => receiveSync(s, bytes))); +} + +test('R6: wraps to a device that advertises ML-KEM are hybrid, and a classical wrap to it is refused', async () => { + const session = await createPrism(); + const { uri, pending } = await createLinkOffer(session, { now: NOW }); + const offer = parseLinkUri(uri); + const device = await createDevice(); + const accepted = await acceptLinkRequest(session, pending, await requestLink(device, offer), { now: NOW, confirmCode: await linkCode(offer.secret, device.record) }); + if (await postQuantumAvailable()) { + assert.equal(typeof device.record.kem, 'string'); + assert.equal(typeof accepted.response.wrap.kem, 'string'); + const downgraded = { ...accepted.response, wrap: { ...accepted.response.wrap, kem: undefined } }; + delete downgraded.wrap.kem; + await assert.rejects(completeLink(device, offer, downgraded), /must be hybrid/); + } else { + assert.equal(device.record.kem, undefined); + assert.equal(accepted.response.wrap.kem, undefined); + } + assert.ok((await completeLink(device, offer, accepted.response)).keyring.size > 0); +}); + +test('R5: sealed content is padded to power-of-two buckets', async () => { + for (const [n, bucket] of [[0, 1024], [1023, 1024], [1024, 2048], [5000, 8192]]) { + const padded = padToBucket(new Uint8Array(n).fill(7)); + assert.equal(padded.length, bucket); + assert.equal(unpad(padded).length, n); + } + assert.throws(() => unpad(new Uint8Array(16)), /malformed padding/); + const session = await createPrism(); + const small = await sealPrivate(session, { a: 1 }); + const larger = await sealPrivate(session, { a: 'x'.repeat(900) }); + assert.equal(small.sealed.ciphertext.length, larger.sealed.ciphertext.length); +}); + +test('R1: a hardened device holds only non-extractable boundary keys and cannot hand them on', async () => { + const session = await createPrism(); + const { origin, joined } = await link(session); + const before = await sealPrivate(origin, { kept: true }); + const hard = await hardenSession(joined); + for (const entry of hard.keyring.values()) { + assert.equal(entry.raw, null); + assert.equal(entry.seal.extractable, false); + assert.equal(entry.topic.extractable, false); + } + assert.deepEqual(await openPrivate(hard, before.sealed), { kept: true }); + assert.equal(await syncTopic(hard), await syncTopic(origin)); + await assert.rejects(createLinkOffer(hard, { now: NOW }), /hardened device cannot link a member/); + await assert.rejects(createRecovery(hard, { threshold: 1, guardians: [{ paper: true }] }), /hardened device cannot set up recovery/); + // It can still link delegates and revoke, which rotates the key without keeping the new key's bytes. + await link(hard, { role: 'delegate', scope: ['telemetry/write'] }); + const rotated = await revokeDevice(hard, origin.device.id); + const { keyId, entry } = await currentBoundary(rotated); + assert.notEqual(keyId, session.prism); + assert.equal(entry.raw, null); +}); + +test('R4: Shamir shares recombine only at the threshold', () => { + const secret = new TextEncoder().encode('prism recovery secret'); + const shares = splitSecret(secret, 3, 5); + assert.deepEqual(combineShares([shares[4], shares[0], shares[2]]), secret); + assert.notDeepEqual(combineShares([shares[0], shares[1]]), secret); + assert.throws(() => splitSecret(secret, 0, 3), /threshold/); + assert.throws(() => splitSecret(secret, 4, 3), /threshold/); +}); + +async function withRecovery(guardianCount = 3, threshold = 2) { + const session = await createPrism(); + const guardians = []; + for (let i = 0; i < guardianCount - 1; i++) guardians.push((await createPrism()).device); + const setup = await createRecovery(session, { threshold, guardians: [...guardians.map(g => g.record), { paper: true }] }); + return { session: setup.session, guardians, shares: setup.shares, recovery: setup.recovery }; +} + +test('R4: after losing every device, guardians release shares and the prism is recovered on a new device', async () => { + const { session, guardians, shares, recovery } = await withRecovery(); + const before = await sealPrivate(session, { diary: 'kept' }); + const phone = await link(session); + const state = await resolvePrism(session.prism, phone.origin.log); + assert.equal(state.recovery, recovery); + assert.equal(state.roles[recovery], 'recovery'); + // Everything is lost. A new device asks two guardians; each compares the code shown on it, then releases. + const fresh = await createDevice({ deviceClass: 'mobile', protection: 'platform' }); + const code = await recoveryCode(session.prism, fresh.record); + assert.match(code, /^\d{6}$/); + const released = [await releaseShare(guardians[0], shares[0], fresh.record)]; + await assert.rejects(recoverPrism({ prism: session.prism, records: [...phone.origin.log.values()], shares: released, device: fresh }), /not enough shares/); + released.push(shares[2]); + const { session: recovered } = await recoverPrism({ prism: session.prism, records: [...phone.origin.log.values()], shares: released, device: fresh }); + const after = await resolvePrism(session.prism, recovered.log); + assert.deepEqual(after.active, [fresh.id, recovery].sort()); + assert.ok(after.revoked.includes(session.device.id) && after.revoked.includes(phone.joined.device.id)); + assert.deepEqual(await openPrivate(recovered, before.sealed), { diary: 'kept' }); + assert.deepEqual(await openPrivate(recovered, (await sealPrivate(recovered, { x: 1 })).sealed), { x: 1 }); + await assert.rejects(releaseShare(guardians[1], shares[0], fresh.record), /not held by this guardian/); +}); + +test('R4: a thief holding a member device cannot lock the person out', async () => { + const { session, guardians, shares, recovery } = await withRecovery(); + const stolen = (await link(session)).joined; + let thief = await link(stolen, {}).then(x => x.origin); + thief = await revokeDevice(thief, session.device.id); + // A member cannot revoke or replace the recovery device. + const triedRevoke = await revokeDevice(thief, recovery); + assert.ok((await resolvePrism(session.prism, triedRevoke.log)).active.includes(recovery)); + await assert.rejects(createRecovery(thief, { threshold: 1, guardians: [{ paper: true }] }), /only the recovery device may replace it/); + const fresh = await createDevice(); + const records = [...mergeLogs(session.log, triedRevoke.log).values()]; + const { session: recovered } = await recoverPrism({ prism: session.prism, records, shares: [await releaseShare(guardians[1], shares[1], fresh.record), shares[2]], device: fresh }); + const after = await resolvePrism(session.prism, recovered.log); + assert.deepEqual(after.active, [fresh.id, recovery].sort()); + assert.ok(after.revoked.includes(stolen.device.id)); + // Later revocations the thief makes do not count, because recovery revoked the thief. + const late = await revokeDevice({ ...thief, log: mergeLogs(thief.log, recovered.log) }, fresh.id).catch(e => e); + assert.ok(late instanceof PrismIdError); +}); + +test('R4: recovery rotates itself so the recovered secret is retired', async () => { + const { session, shares } = await withRecovery(2, 1); + const fresh = await createDevice(); + const newGuardian = (await createPrism()).device; + const { session: recovered, shares: newShares } = await recoverPrism({ prism: session.prism, records: [...session.log.values()], shares: [shares[1]], device: fresh, + rotateRecovery: { threshold: 1, guardians: [newGuardian.record] } }); + const state = await resolvePrism(session.prism, recovered.log); + assert.equal(newShares.length, 1); + assert.equal(state.recovery, newShares[0].recovery); + assert.notEqual(state.recovery, shares[1].recovery); + assert.ok(state.revoked.includes(shares[1].recovery)); + assert.ok(state.active.includes(fresh.id)); +}); + +test('R3: each host sees its own persona, unlinkable to the prism and to other hosts', async () => { + const bus = createMemoryBus(); + const { session } = await withRecovery(); + let { origin, joined } = await link(session); + origin = await ensurePersona(origin, HOST); + origin = await ensurePersona(origin, 'https://other.example'); + const a = await personaFor(origin, HOST), b = await personaFor(origin, 'https://other.example'); + assert.notEqual(a.persona, b.persona); + for (const view of [a, b]) { + const text = JSON.stringify(view.records); + assert.equal(text.includes(session.prism), false); + assert.equal(text.includes(origin.device.id), false); + assert.equal(text.includes(origin.device.record.sign.x), false); + } + const keysAt = async v => Object.values((await resolvePrism(v.persona, await logFromRecords(v.records))).devices).map(d => d.sign.x); + const keysB = await keysAt(b); + assert.equal((await keysAt(a)).some(x => keysB.includes(x)), false); + // The host verifies a persona action with only the persona log. + const action = await signPersonaAction(origin, HOST, 'profile/update', { name: 'x' }, { now: NOW }); + assert.equal((await verifyAction(a.persona, await logFromRecords(a.records), action, AT)).allowed, true); + assert.equal((await verifyAction(b.persona, await logFromRecords(b.records), action, AT)).allowed, false); + // The second device asks to join the persona; the first binds it on the next sync. + [joined] = await syncAll(bus, origin, joined); + joined = await ensurePersona(joined, HOST); + [origin] = await syncAll(bus, joined, origin); + [joined] = await syncAll(bus, origin, joined); + const fromPhone = await signPersonaAction(joined, HOST, 'profile/update', { name: 'y' }, { now: NOW }); + const view = await personaFor(origin, HOST); + assert.equal((await verifyAction(view.persona, await logFromRecords(view.records), fromPhone, AT)).allowed, true); + // Revoking the phone in the prism revokes its persona key at the host too. + origin = await revokeDevice(origin, joined.device.id); + const afterRevoke = await personaFor(origin, HOST); + assert.equal((await verifyAction(afterRevoke.persona, await logFromRecords(afterRevoke.records), fromPhone, AT)).allowed, false); +}); + +test('R3 + R4: a recovered prism keeps its persona at each host', async () => { + const { session, guardians, shares } = await withRecovery(); + const withPersona = await ensurePersona(session, HOST); + const atHost = await personaFor(withPersona, HOST); + const fresh = await createDevice(); + const { session: recovered } = await recoverPrism({ prism: session.prism, records: [...withPersona.log.values()], device: fresh, + shares: [await releaseShare(guardians[0], shares[0], fresh.record), shares[2]], personas: { [atHost.persona]: atHost.records } }); + const again = await personaFor(recovered, HOST); + assert.equal(again.persona, atHost.persona); + const action = await signPersonaAction(recovered, HOST, 'profile/update', {}, { now: NOW }); + const log = await logFromRecords(again.records); + assert.equal((await verifyAction(again.persona, log, action, AT)).allowed, true); + const old = await signPersonaAction(withPersona, HOST, 'profile/update', {}, { now: NOW }); + assert.equal((await verifyAction(again.persona, log, old, AT)).allowed, false); +}); + +test('R7: a host admits a hardware-requiring device only on an attestation bound to its own key', async () => { + const device = await createDevice({ deviceClass: 'mobile', protection: 'platform' }); + const other = await createDevice(); + const verifiers = { test: async (evidence) => ({ hardware: evidence.hardware, key: evidence.key }) }; + const policy = { requiresHardwareKey: true }; + assert.equal(await admitDevice({}, device.record), true); + assert.equal(await admitDevice(policy, device.record), false); + assert.equal(await admitDevice(policy, device.record, { format: 'unknown' }, verifiers), false); + assert.equal(await admitDevice(policy, device.record, { format: 'test', hardware: true, key: other.record.sign }, verifiers), false); + assert.equal(await admitDevice(policy, device.record, { format: 'test', hardware: false, key: device.record.sign }, verifiers), false); + assert.equal(await admitDevice(policy, device.record, { format: 'test', hardware: true, key: device.record.sign }, verifiers), true); +}); + +// ---------------------------------------------------------------- closing the remaining gaps + +const subtle = globalThis.crypto.subtle; +const utf8 = text => new TextEncoder().encode(text); +const sha256 = async bytes => new Uint8Array(await subtle.digest('SHA-256', bytes)); +const join = (a, b) => { const out = new Uint8Array(a.length + b.length); out.set(a); out.set(b, a.length); return out; }; + +function rawToDer(raw) { + const integer = bytes => { + let i = 0; + while (i < bytes.length - 1 && bytes[i] === 0) i++; + let v = bytes.subarray(i); + if (v[0] & 0x80) v = join(new Uint8Array([0]), v); + return join(new Uint8Array([0x02, v.length]), v); + }; + const body = join(integer(raw.subarray(0, 32)), integer(raw.subarray(32))); + return join(new Uint8Array([0x30, body.length]), body); +} + +/** A software stand-in for a platform authenticator (passkey), producing real WebAuthn assertions. */ +async function passkey(rp = 'foundry.uor.foundation', origin = HOST) { + const pair = await subtle.generateKey({ name: 'ECDSA', namedCurve: 'P-256' }, true, ['sign', 'verify']); + const { crv, kty, x, y } = await subtle.exportKey('jwk', pair.publicKey); + const approve = ({ flags = 0x05, seenOrigin = origin, challengeFor } = {}) => async challenge => { + const authData = new Uint8Array(37); + authData.set(await sha256(utf8(rp))); + authData[32] = flags; + const clientData = utf8(JSON.stringify({ type: 'webauthn.get', challenge: toBase64Url(challengeFor ?? challenge), origin: seenOrigin })); + const raw = new Uint8Array(await subtle.sign({ name: 'ECDSA', hash: 'SHA-256' }, pair.privateKey, join(authData, await sha256(clientData)))); + return { authenticatorData: toBase64Url(authData), clientDataJSON: toBase64Url(clientData), signature: toBase64Url(rawToDer(raw)) }; + }; + return { binding: { rp, origin, key: { crv, kty, x, y } }, approve }; +} + +test('R1: an action the host marks as needing approval carries the person\'s user-verified passkey assertion for exactly that action', async () => { + const key = await passkey(); + const session = await createPrism({ presence: key.binding }); + const host = { ...AT, requirePresence: ['payments/send'] }; + const check = async envelope => verifyAction(session.prism, session.log, envelope, { ...host, seen: new Set() }); + const approved = await signAction(session, 'payments/send', { amount: 5 }, { ...AT, presence: key.approve() }); + assert.deepEqual(await check(approved).then(r => [r.allowed, r.reason]), [true, 'ok']); + // Script in the origin can sign with the device key, but without the person it has no assertion. + assert.equal((await check(await signAction(session, 'payments/send', { amount: 5 }, AT))).reason, 'approval'); + assert.equal((await check(await signAction(session, 'payments/send', { amount: 5 }, { ...AT, presence: key.approve({ flags: 0x01 }) }))).reason, 'approval'); + assert.equal((await check(await signAction(session, 'payments/send', { amount: 5 }, { ...AT, presence: key.approve({ seenOrigin: 'https://evil.example' }) }))).reason, 'approval'); + // An approval obtained for a harmless action cannot be moved onto another one. + const harmless = await signAction(session, 'payments/send', { amount: 1 }, AT); + const moved = await signAction(session, 'payments/send', { amount: 900 }, { ...AT, presence: key.approve({ challengeFor: await presenceChallenge(harmless.body) }) }); + assert.equal((await check(moved)).reason, 'approval'); + const swapped = { ...harmless, presence: approved.presence }; + assert.equal((await check(swapped)).allowed, false); + // Another passkey's assertion does not count; actions the host does not mark need none. + const other = await passkey(); + assert.equal((await check(await signAction(session, 'payments/send', {}, { ...AT, presence: other.approve() }))).reason, 'approval'); + assert.equal((await check(await signAction(session, 'profile/view', {}, AT))).allowed, true); + await assert.rejects(signAction(await createPrism(), 'payments/send', {}, { ...AT, presence: key.approve() }), /no passkey bound/); + assert.throws(() => checkDeviceRecord({ ...session.device.record, presence: { ...key.binding, origin: 'http://foundry.uor.foundation' } }), /malformed device record/); +}); + +test('R1: a persona carries its own passkey for its host', async () => { + const key = await passkey(); + let session = await createPrism(); + session = await ensurePersona(session, HOST, { presence: key.binding }); + const view = await personaFor(session, HOST); + const envelope = await signPersonaAction(session, HOST, 'payments/send', {}, { now: NOW, presence: key.approve() }); + assert.equal((await verifyAction(view.persona, await logFromRecords(view.records), envelope, { ...AT, requirePresence: true })).allowed, true); +}); + +test('R6: every record is also signed with ML-DSA-65 where available, and stripping that signature is refused', async () => { + const session = await createPrism(); + const { origin, joined } = await link(session); + const bind = [...origin.log.values()].find(e => e.body.kind === KIND.bind); + const action = await signAction(origin, 'profile/update', {}, AT); + if (await postQuantumSignaturesAvailable()) { + assert.equal(typeof session.device.record.pqsign, 'string'); + assert.equal(typeof bind.pqsignature, 'string'); + const stripped = { ...bind }; + delete stripped.pqsignature; + const records = [...origin.log.values()].map(e => (e === bind ? stripped : e)); + assert.equal((await resolvePrism(session.prism, await logFromRecords(records))).active.includes(joined.device.id), false); + const forged = { ...bind, pqsignature: toBase64Url(new Uint8Array(3309)) }; + const forgedRecords = [...origin.log.values()].map(e => (e === bind ? forged : e)); + assert.equal((await resolvePrism(session.prism, await logFromRecords(forgedRecords))).active.includes(joined.device.id), false); + assert.equal((await verifyAction(session.prism, origin.log, action, { ...AT, requirePostQuantum: true })).allowed, true); + const bare = { ...action }; + delete bare.pqsignature; + assert.equal((await verifyAction(session.prism, origin.log, bare, { ...AT, seen: new Set() })).allowed, false); + } else { + assert.equal(session.device.record.pqsign, undefined); + assert.equal(bind.pqsignature, undefined); + assert.equal((await verifyAction(session.prism, origin.log, action, { ...AT, requirePostQuantum: true })).allowed, false); + } + assert.ok((await resolvePrism(session.prism, origin.log)).active.includes(joined.device.id)); +}); + +test('R4: with every device and every copy of the log lost, recovery rebuilds the prism from sealed sync the substrate retained', async () => { + const bus = createMemoryBus(); + const { session, guardians, shares, recovery } = await withRecovery(); + const early = await createDevice(); + await assert.rejects(recoverPrism({ prism: session.prism, bus, device: early, + shares: [shares[2], await releaseShare(guardians[1], shares[1], early.record)] }), /no sync message/); + let { origin, joined } = await link(session); + origin = await ensurePersona(origin, HOST); + await publishSync(origin, bus); + const sealedBefore = await sealPrivate(origin, { diary: 'kept' }); + origin = await revokeDevice(origin, joined.device.id); + await publishSync(origin, bus, { keyId: session.prism }); + await publishSync(origin, bus); + const atHost = await personaFor(origin, HOST); + // Everything is lost; only the guardians, the paper share and the substrate remain. + const fresh = await createDevice(); + const { session: recovered } = await recoverPrism({ prism: session.prism, bus, device: fresh, + shares: [await releaseShare(guardians[0], shares[0], fresh.record), shares[2]] }); + const after = await resolvePrism(session.prism, recovered.log); + assert.deepEqual(after.active, [fresh.id, recovery].sort()); + assert.ok(after.revoked.includes(joined.device.id) && after.revoked.includes(session.device.id)); + assert.deepEqual(await openPrivate(recovered, sealedBefore.sealed), { diary: 'kept' }); + assert.equal((await personaFor(recovered, HOST)).persona, atHost.persona); +}); + +test('R5: constant-cadence sync makes a change and no change look the same to a relay', async () => { + const bus = createMemoryBus(); + const { origin, joined } = await link(await createPrism()); + const sizes = []; + bus.subscribe(await syncTopic(origin), bytes => { sizes.push(bytes.length); }); + const cadence = createSyncCadence({ bucket: 65536 }); + await cadence.tick(origin, bus); + cadence.queue(); + await cadence.tick(origin, bus); + await cadence.tick(origin, bus); + assert.equal(sizes.length, 3); + assert.equal(new Set(sizes).size, 1); + const [cover, real] = await bus.retained(await syncTopic(origin)); + assert.equal(await receiveSync(joined, cover), joined); + assert.ok((await receiveSync(joined, real)).log.size >= joined.log.size); + assert.throws(() => padToBucket(new Uint8Array(1), 1000), /power of two/); + assert.equal((await publishCover(origin, bus, { bucket: 2048 })).bucket, 2048); +}); diff --git a/tests/prism-replay.test.js b/tests/prism-replay.test.js new file mode 100644 index 0000000..8550789 --- /dev/null +++ b/tests/prism-replay.test.js @@ -0,0 +1,80 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { + createPrism, createDevice, resolvePrism, canSign, createLinkOffer, parseLinkUri, requestLink, acceptLinkRequest, completeLink, + linkCode, mergeLogs, createMemoryBus, signAction, verifyAction, createRecovery, recoverPrism, admitRecords, publishLog, heardLog +} from '../src/prism-id.js'; + +const NOW = 1_800_000_000_000; +const AT = { audience: 'https://foundry.uor.foundation', now: NOW }; + +/** Link a device the way a person does: scan, compare the six-digit code on both screens, confirm. */ +async function link(session) { + const { uri, pending } = await createLinkOffer(session, { now: NOW }); + const offer = parseLinkUri(uri); + const joining = await createDevice(); + const request = await requestLink(joining, offer); + const accepted = await acceptLinkRequest(session, pending, request, { now: NOW + 1000, confirmCode: await linkCode(offer.secret, joining.record) }); + return { origin: accepted.session, joined: await completeLink(joining, offer, accepted.response) }; +} + +async function withRecovery() { + const setup = await createRecovery(await createPrism(), { threshold: 1, guardians: [{ paper: true }] }); + return { session: setup.session, shares: setup.shares }; +} + +/** The frame's kit: one paper share of the recovery device, and the log as it was when the kit was made. */ +async function usedKit() { + const { session, shares } = await withRecovery(); + const phone = await link(session); + const kit = { share: shares[0], records: [...phone.origin.log.values()] }; + const fresh = await createDevice(); + const real = await recoverPrism({ prism: session.prism, records: kit.records, shares: [kit.share], device: fresh, rotateRecovery: { threshold: 1, guardians: [{ paper: true }] } }); + return { prism: session.prism, kit, real, fresh, phone }; +} + +test('R4: an old recovery kit replayed against its old log binds and revokes nothing', async () => { + const { prism, kit, real, fresh } = await usedKit(); + const replayer = await createDevice(); + const replay = await recoverPrism({ prism, records: kit.records, shares: [kit.share], device: replayer }); + const merged = mergeLogs(real.session.log, replay.session.log); + const state = await resolvePrism(prism, merged); + assert.deepEqual(state.active, [fresh.id, real.shares[0].recovery].sort()); + assert.deepEqual(state.retired, [kit.share.recovery]); + assert.equal(await canSign(prism, merged, replayer.id), false); + assert.equal(await canSign(prism, merged, fresh.id), true); + const action = await signAction(replay.session, 'post', { text: 'not the person' }, AT); + assert.equal((await verifyAction(prism, merged, action, AT)).allowed, false); + assert.equal((await verifyAction(prism, merged, await signAction(real.session, 'post', { text: 'the person' }, AT), AT)).allowed, true); +}); + +test('R4: a replay that also retires the old recovery forks the log: hosts act for neither side, devices refuse the fork', async () => { + const { prism, kit, real, fresh } = await usedKit(); + const replayer = await createDevice(); + const replay = await recoverPrism({ prism, records: kit.records, shares: [kit.share], device: replayer, rotateRecovery: { threshold: 1, guardians: [{ paper: true }] } }); + // Each side alone resolves; together they are a fork. + assert.ok((await resolvePrism(prism, replay.session.log)).active.includes(replayer.id)); + const merged = mergeLogs(real.session.log, replay.session.log); + await assert.rejects(resolvePrism(prism, merged), /fork/); + const action = await signAction(replay.session, 'post', { text: 'not the person' }, AT); + await assert.rejects(verifyAction(prism, merged, action, AT), /fork/); + // The person's device holds the real retirement and never admits the replayed one. + const held = await admitRecords(prism, real.session.log, replay.session.log); + const state = await resolvePrism(prism, held); + assert.deepEqual(state.active, [fresh.id, real.shares[0].recovery].sort()); + const bus = createMemoryBus(); + await publishLog(replay.session, bus); + await publishLog(real.session, bus); + assert.equal(await canSign(prism, await heardLog(prism, real.session.log, bus, { own: true }), fresh.id), true); + await assert.rejects(resolvePrism(prism, await heardLog(prism, new Map(real.session.log), bus)), /fork/); +}); + +test('R4: recovering again with the newer kit leaves the retired recovery device alone', async () => { + const { prism, real } = await usedKit(); + const again = await createDevice(); + const second = await recoverPrism({ prism, records: [...real.session.log.values()], shares: real.shares, device: again, rotateRecovery: { threshold: 1, guardians: [{ paper: true }] } }); + const state = await resolvePrism(prism, second.session.log); + assert.deepEqual(state.active, [again.id, second.shares[0].recovery].sort()); + assert.equal(state.retired.length, 2); +}); + diff --git a/tests/product-experience.test.js b/tests/product-experience.test.js new file mode 100644 index 0000000..8417a12 --- /dev/null +++ b/tests/product-experience.test.js @@ -0,0 +1,238 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { cpSync, mkdtempSync, readFileSync, writeFileSync, rmSync } from 'node:fs'; +import { spawnSync } from 'node:child_process'; +import { tmpdir } from 'node:os'; +import { resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { model } from '../src/layer1-uor/generated-model.js'; +import { operatorJourneys, operatorActions, experienceFacts, experienceView, experienceActionAllowed, + createOperatorExperience, experienceProvenance } from '../src/product-experience.js'; +const call = (name, ...args) => model[`Product.Experience.${name}`](...args); +const root = resolve(import.meta.dirname, '..'); + +function dom() { + const elements = new Map(); + function element() { + let text = ''; + return { attributes: {}, style: {}, listeners: {}, children: [], writes: 0, + get textContent() { return text; }, set textContent(value) { text = value; this.writes++; }, + set innerHTML(_) { throw Error('Experience must use safe text nodes'); }, + setAttribute(name, value) { this.attributes[name] = String(value); }, + addEventListener(name, callback) { this.listeners[name] = callback; }, + replaceChildren(...children) { this.children = children; }, + focus(options) { this.focused = options; }, scrollIntoView(options) { this.scrolled = options; } }; + } + return { elements, createElement: element, getElementById(id) { + if (!elements.has(id)) elements.set(id, element()); return elements.get(id); + } }; +} + +test('actual browser controls, journey targets and source provenance cover projected Experience', () => { + const html = readFileSync(resolve(root, 'index.html'), 'utf8'); + assert.deepEqual(operatorJourneys.map(j => j.id), ['mesh', 'objects', 'compute', 'vm', 'pointers', 'resources']); + assert.equal(new Set(operatorActions.map(a => a.code)).size, operatorActions.length); + for (const journey of operatorJourneys) { + for (const id of [journey.target, `${journey.id}Title`, `${journey.id}Evidence`]) assert.ok(html.includes(`id="${id}"`), id); + } + for (const action of operatorActions) { + assert.ok(html.includes(`id="${action.control}"`), action.control); + const recoveryAdapter = readFileSync(resolve(root, 'src/recovery-ui.js'), 'utf8'); + assert.ok(html.includes(`bindModelAction('${action.control}',`) || + (recoveryAdapter.includes(`bind('${action.control}',`) && recoveryAdapter.includes('bindModelAction(id,')), action.control); + } + const digest = createHash('sha256').update(readFileSync(resolve(root, experienceProvenance.source))).digest('hex'); + assert.equal(experienceProvenance.sourceSha256, digest); + assert.match(experienceProvenance.assurance, /not whole-host/); +}); + +test('model evidence separates local integrity, conditional placement, pure replay and host effects', () => { + const facts = experienceFacts(); + assert.equal(experienceView('objects', facts).id, 'objectsEmpty'); + assert.equal(experienceView('objects', { ...facts, hasPartial: true }).id, 'objectsPartial'); + assert.equal(experienceView('objects', { ...facts, hasObject: true }).id, 'objectsLocal'); + assert.match(experienceView('objects', { ...facts, hasObject: true, recoverablePlacement: true }).detail, /truthful, reachable/); + assert.equal(experienceView('compute', { ...facts, unfinishedJobs: true }).id, 'computeUnverified'); + assert.equal(experienceView('compute', { ...facts, unfinishedJobs: true, replayedJobs: true }).id, 'computeReplay'); + assert.match(experienceView('vm', { ...facts, vmReady: true }).detail, /not evidence/); + assert.equal(experienceView('pointers', { ...facts, authorityPinned: true, publicationUnknown: true, headRetained: true, publicationPublished: true }).id, 'pointerUnknown'); +}); + +test('all bounded gate combinations refuse unsafe actions without certifying host observations', () => { + const fields = ['disclosureAccepted', 'policyBlocked', 'authorityPinned', 'hasObject', 'headRetained', + 'publicationBusy', 'publicationUnknown', 'dnsConfigured', 'vmReady', 'vmBooting', 'meshJoined', 'unfinishedJobs']; + for (let mask = 0; mask < 2 ** fields.length; mask++) { + const facts = experienceFacts(Object.fromEntries(fields.map((field, i) => [field, Boolean(mask & (1 << i))]))); + if (!facts.disclosureAccepted || facts.policyBlocked) assert.equal(experienceActionAllowed('reconnectBtn', facts), false); + if (facts.publicationUnknown || facts.publicationBusy || facts.policyBlocked || !facts.authorityPinned) assert.equal(experienceActionAllowed('writeSignedDnsBtn', facts), false); + if (!facts.publicationUnknown || facts.publicationBusy || facts.policyBlocked || !facts.dnsConfigured || !facts.authorityPinned) assert.equal(experienceActionAllowed('reconcilePointerBtn', facts), false); + if (!facts.vmReady || facts.policyBlocked) assert.equal(experienceActionAllowed('runVmCmdBtn', facts), false); + if (facts.vmBooting || facts.vmReady) assert.equal(experienceActionAllowed('bootVmBtn', facts), false); + assert.equal(experienceActionAllowed('exportBudgetHistoryBtn', facts), true); + assert.equal(experienceActionAllowed('renewBudgetBtn', facts), true); + } + assert.equal(experienceActionAllowed('unknownControl', experienceFacts()), false); + assert.throws(() => experienceFacts({ policyBlocked: 0 }), /Bool/); + assert.throws(() => experienceFacts({ inventedEvidence: true }), /exact model record/); +}); + +test('per-resource attention is not an invented global denial and local unfinished jobs can resume', () => { + const facts = experienceFacts({ policyAttention: true, unfinishedJobs: true }); + assert.equal(experienceView('resources', facts).id, 'resourcesBlocked'); + for (const control of ['dbPutBtn', 'startJobBtn', 'takeoverJobsBtn']) assert.equal(experienceActionAllowed(control, facts), true); + assert.equal(experienceActionAllowed('takeoverJobsBtn', { ...facts, policyBlocked: true }), false); +}); + +test('navigation is source-owned, keyboard-native, focus preserving and nonanimated without changing mesh hash', () => { + const document = dom(); const refused = []; let observations = {}; + const experience = createOperatorExperience({ document, snapshot: () => observations, onRefused: x => refused.push(x) }); + const get = id => document.getElementById(id); + assert.equal(get('operatorJourneyNav').attributes['aria-label'], call('navigationLabel')); + assert.equal(get('meshPanel').hidden, false); + assert.equal(get('objectsPanel').hidden, true); + assert.equal(get('meshExplanationPanel').open, true); + const nav = get('operatorJourneyNav').children; + assert.equal(nav.length, operatorJourneys.length); + assert.ok(nav.every(button => button.type === 'button' && !button.href)); + const input = get('pointerJsonInput'); input.value = 'retain edited operator input'; + nav[4].listeners.click(); nav[1].listeners.click(); nav[4].listeners.click(); + assert.equal(input.value, 'retain edited operator input'); + assert.deepEqual(get('pointersPanel').focused, { preventScroll: true }); + assert.deepEqual(get('pointersPanel').scrolled, { behavior: 'auto', block: 'start' }); + assert.equal(nav[4].attributes['aria-current'], 'location'); + assert.equal(get('pointersPanel').hidden, false); + assert.ok(operatorJourneys.filter(j => j.id !== 'pointers').every(j => get(j.target).hidden)); + assert.equal(get('pointersExplanationPanel').open, false); + get('pointersExplanationPanel').open = true; experience.render(); + assert.equal(get('pointersExplanationPanel').open, true, 'unchanged updates retain explicit user disclosure choice'); + assert.equal(get('pointersEvidence').attributes['aria-live'], 'polite'); + assert.equal(get('pointersEvidence').attributes['aria-atomic'], 'true'); + assert.equal(get('writeSignedDnsBtn').disabled, true); + assert.equal(experience.allow('writeSignedDnsBtn'), false); assert.equal(refused.length, 1); + const writes = get('pointersEvidence').writes; experience.render(); experience.render(); + assert.equal(get('pointersEvidence').writes, writes, 'unchanged observations must not repeat live announcements'); + observations = { authorityPinned: true, hasObject: true, dnsConfigured: true, publicationUnknown: true, headRetained: true }; + experience.render(); + assert.equal(get('writeSignedDnsBtn').hidden, true); assert.equal(get('reconcilePointerBtn').hidden, false); + assert.equal(get('reconcilePointerBtn').disabled, false); + assert.equal(get('pointersExplanationPanel').open, true); + assert.equal(get('pointerPublicationSetup').open, true); + assert.match(get('operatorNextActions').textContent, /Reconcile Unknown/); + assert.doesNotMatch(get('operatorNextActions').textContent, /Admit Next/); + assert.equal(get('experienceProvenance').attributes['data-model-source-sha256'], experienceProvenance.sourceSha256); + observations = { policyAttention: true }; experience.render(); + assert.equal(get('pointersPanel').hidden, false, 'an asynchronous refusal does not steal navigation or focus'); + assert.equal(get('reviewResourcePolicyBtn').hidden, false); + get('reviewResourcePolicyBtn').listeners.click(); + assert.equal(get('resourcesPanel').hidden, false); + assert.equal(get('resourcesExplanationPanel').open, true); + assert.throws(() => experience.navigate('invented'), /Unknown operator journey/); +}); + +test('named modeled evidence palette has readable contrast on the actual panel surface', () => { + const luminance = hex => hex.slice(1).match(/../g).map(x => parseInt(x, 16) / 255) + .map(c => c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4) + .reduce((sum, c, i) => sum + c * [0.2126, 0.7152, 0.0722][i], 0); + const bg = luminance('#111111'); + for (const style of call('evidenceStyles')) assert.ok((luminance(style.color) + 0.05) / (bg + 0.05) >= 4.5, style.id); +}); + +test('Experience source edits change the real generated semantic projection and stale edits fail closed', async () => { + const temporary = mkdtempSync(resolve(tmpdir(), 'stitch-experience-mutation-')); + try { + for (const file of ['app/src', 'app/language', 'src', 'scripts/check-model.mjs', 'package.json']) cpSync(resolve(root, file), resolve(temporary, file), { recursive: true }); + const source = resolve(temporary, 'app/src/Product/Experience.lex.tex'); + const before = readFileSync(source, 'utf8'); + writeFileSync(source, before.replace('title := "Join a mesh"', 'title := "Join an inspected mesh"') + .replace('body: (disclosed && (not blocked))', 'body: false')); + const check = spawnSync(process.execPath, ['scripts/check-model.mjs', '--check'], { cwd: temporary, encoding: 'utf8' }); + assert.notEqual(check.status, 0); assert.match(check.stderr, /stale source bindings/); + const write = spawnSync(process.execPath, ['scripts/check-model.mjs', '--write'], { cwd: temporary, encoding: 'utf8' }); + assert.equal(write.status, 0, write.stderr); + const changed = await import(pathToFileURL(resolve(temporary, 'src/layer1-uor/generated-model.js'))); + assert.equal(changed.model['Product.Experience.journeys']()[0].title, 'Join an inspected mesh'); + const facts = changed.model['Product.Experience.initialFacts'](); facts.disclosureAccepted = true; + assert.equal(changed.model['Product.Experience.actionAllowed'](0, facts), false); + } finally { rmSync(temporary, { recursive: true, force: true }); } +}); + +test('recovery and guest administration context is source-owned and refuses inappropriate actions', () => { + const base = experienceFacts(); + assert.equal(experienceView('recovery', base).id, 'recoveryEmpty'); + assert.equal(experienceView('recovery', { ...base, recoveryBusy: true }).id, 'recoveryChecking'); + assert.equal(experienceView('recovery', { ...base, recoveryHasEvidence: true }).id, 'recoveryChecked'); + assert.equal(experienceView('recovery', { ...base, recoveryAcceptedAnchor: true }).id, 'recoveryTrusted'); + assert.equal(experienceActionAllowed('importRecoveryBtn', base), false); + assert.equal(experienceActionAllowed('importRecoveryBtn', { ...base, recoveryFileSelected: true }), true); + assert.equal(experienceActionAllowed('importRecoveryBtn', { ...base, recoveryFileSelected: true, recoveryBusy: true }), false); + assert.equal(experienceActionAllowed('acceptRecoveryAnchorBtn', { ...base, recoveryHasAnchors: true }), false); + assert.equal(experienceActionAllowed('acceptRecoveryAnchorBtn', { ...base, recoveryHasAnchors: true, recoveryAnchorConsent: true }), true); + assert.equal(experienceView('vm', { ...base, vmAdminBlocked: true }).id, 'vmQuarantined'); + assert.equal(experienceActionAllowed('stopVmBtn', { ...base, vmCanAdminister: true, vmAdminBlocked: true }), true); + assert.equal(experienceActionAllowed('bootVmBtn', { ...base, vmAdminBlocked: true }), false); + assert.equal(experienceActionAllowed('reconcileVmCommandBtn', { ...base, vmCanReconcileCommand: true }), true); +}); + +test('pinned authority can reach provider scope and saved-write loading after a fresh reload without object RAM', () => { + const facts = experienceFacts({ authorityPinned: true }); + assert.equal(call('publicationSetupVisible', facts), true); + assert.equal(experienceActionAllowed('loadPublicationBtn', facts), true); + assert.equal(experienceActionAllowed('writeSignedDnsBtn', facts), false); +}); + + +test('action explanations preserve authored descriptions and local refusal feedback without stealing focus', () => { + const document = dom(); const get = id => document.getElementById(id); + get('writeSignedDnsBtn').attributes['aria-describedby'] = 'customExplanation'; + const experience = createOperatorExperience({ document, snapshot: () => ({}) }); + experience.allow('writeSignedDnsBtn'); + assert.match(get('pointersActionStatus').textContent, /Without provider credentials/); + assert.match(get('writeSignedDnsBtn').attributes['aria-describedby'], /^customExplanation /); + assert.match(get('writeSignedDnsBtn').attributes['aria-describedby'], /pointersActionStatus/); + assert.equal(get('pointersPanel').focused, undefined); + experience.report('dbPutBtn', 'Exact local storage refusal'); + assert.equal(get('objectsActionStatus').textContent, 'Exact local storage refusal'); +}); + + +test('restore action requires the selected accepted anchor and matching eligible live scope, not import or a generic pin', () => { + const base = experienceFacts(); + for (let mask = 0; mask < 8; mask++) { + const facts = { ...base, recoveryBusy: Boolean(mask & 1), recoveryAcceptedAnchor: Boolean(mask & 2), recoveryCanRestoreAnchor: Boolean(mask & 4) }; + assert.equal(experienceActionAllowed('restoreRecoveryAnchorBtn', facts), !facts.recoveryBusy && facts.recoveryAcceptedAnchor && facts.recoveryCanRestoreAnchor); + } + assert.equal(experienceActionAllowed('restoreRecoveryAnchorBtn', { ...base, recoveryHasAnchors: true, authorityPinned: true }), false); + assert.equal(experienceView('recovery', { ...base, recoveryRestoredAnchor: true }).id, 'recoveryRestored'); + assert.equal(experienceView('recovery', { ...base, recoveryRestoredAnchor: true, recoveryBusy: true }).id, 'recoveryChecking'); +}); + +test('VM journey distinguishes pending, confirmed stop, retained uncertainty and destruction', () => { + const base = experienceFacts({ vmCanAdminister: true, vmAdminBlocked: true, vmFailed: true }); + assert.equal(experienceView('vm', base).id, 'vmQuarantined'); + assert.equal(experienceActionAllowed('stopVmBtn', base), true); + assert.equal(experienceView('vm', { ...base, vmTerminationPending: true }).id, 'vmTerminationPending'); + const stopped = { ...base, vmStopped: true, vmCanReconcileCommand: true, vmCanForgetCommand: true }; + assert.equal(experienceView('vm', stopped).evidence, 'HOST-OBSERVED STOPPED'); + assert.equal(call('viewStyle', stopped, 3), 'observed'); + assert.equal(call('viewStyle', { ...base, vmTerminationPending: true }, 3), 'pending'); + assert.equal(call('viewStyle', base, 3), 'attention'); + assert.equal(experienceActionAllowed('stopVmBtn', stopped), false); + assert.equal(experienceActionAllowed('destroyVmBtn', stopped), true); + assert.equal(experienceActionAllowed('bootVmBtn', stopped), false); + assert.equal(experienceActionAllowed('reconcileVmCommandBtn', stopped), true); + assert.equal(experienceActionAllowed('forgetVmCommandBtn', stopped), true); + assert.equal(experienceView('vm', { ...base, vmAdminBlocked: false, vmDestroyed: true }).id, 'vmDestroyed'); +}); + +test('network fields and full constraints are disclosed on demand, with local validation', () => { + const html = readFileSync(resolve(root, 'index.html'), 'utf8'); + const panel = html.match(/
([\s\S]*?)<\/details>/)?.[1]; + assert.ok(panel); + for (const id of ['vmNetworkSummary', 'vmIpv4Address', 'vmPrefixLength', 'vmNetworkHelp', 'vmNetworkStatus', 'vmNetworkValidation']) + assert.ok(panel.includes(`id="${id}"`), id); + assert.match(panel, /different address for every guest/); + assert.match(panel, /compatible subnet prefixes/); + assert.match(panel, /\/31.*\/32.*Destroy a retained instance/); + assert.doesNotMatch(html, /Linux 5\.6|LINUX 5\.6/); +}); diff --git a/tests/product-facets.test.js b/tests/product-facets.test.js new file mode 100644 index 0000000..7f32443 --- /dev/null +++ b/tests/product-facets.test.js @@ -0,0 +1,149 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFileSync, mkdtempSync, cpSync, writeFileSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { resolve } from 'node:path'; +import { generateFacets, checkFacets, validateFacetReferences, validateFacetLexicons } from '../scripts/check-facets.mjs'; +import { literalRows } from '../scripts/check-product.mjs'; +const root=resolve(import.meta.dirname,'..'); +test('product facets are deterministic and exactly current, with complete action coverage',()=>{ + const a=generateFacets(root),b=generateFacets(root);assert.deepEqual([...a.outputs],[...b.outputs]); + assert.deepEqual(checkFacets(root),a.catalog); + assert.equal(a.catalog.modules.length,9);assert.ok(a.catalog.features.length>=31); + for(const f of a.catalog.features){assert.ok(f.acceptance.length);assert.ok(f.control);assert.ok(a.catalog.journeys.some(j=>j.id===f.journey));} + for(const j of a.catalog.journeys)for(const step of j.steps)assert.ok(a.catalog.features.some(f=>f.declaration===step)); +}); +test('product facets retain honest evidence and persistence boundaries',()=>{ + const {catalog:c}=generateFacets(root); + assert.equal(c.design.components,19);assert.equal(c.design.connectors,34); + assert.ok(c.security.every(t=>t.evidence.length>=2&&t.assessment.includes('qualitative'))); + assert.ok(c.users.measures.every(m=>m.observed===null)); + assert.ok(c.quality.every(m=>['derived','configured','requirement'].includes(m.kind))); + assert.match(c.persistence.find(x=>x.id==='ObjectCustody').failure,/not.*durable/); + assert.match(c.persistence.find(x=>x.id==='UnknownPublication').trust,/No timer takeover/); + assert.match(c.persistence.find(x=>x.id==='SavedSigner').trust,/never.*automatic replacement/); + assert.ok(c.modules.every(m=>m.declarations>0&&m.sha256.length===64)); + assert.match(c.sourceConvention,/complete UTF-8 file/); +}); +test('site catalog counts actual declarations and preserves Stitch design identity',()=>{ + const {outputs,catalog:c}=generateFacets(root),site=JSON.parse(outputs.get('site/facets.json')); + for(const f of site.facets){const m=c.modules.find(m=>m.path===f.source);assert.equal(f.count,m.declarations);assert.match(f.evidenceStatus,/required/);} + assert.equal(c.brand.tokens.find(t=>t.name==='bg').value,'#0a0a0a'); + assert.equal(c.brand.tokens.find(t=>t.name==='panel').value,'#111111'); + assert.ok(c.brand.contrasts.every(p=>Number.isInteger(p.observedMilli)&&p.scope.includes('not whole-page'))); +}); +function fixture(work){const dir=mkdtempSync(resolve(tmpdir(),'stitch-facets-'));try{for(const p of ['app','src','tests','scripts','docs','vendor','product','.github','site','index.html','package.json'])cpSync(resolve(root,p),resolve(dir,p),{recursive:true});return work(dir);}finally{rmSync(dir,{recursive:true,force:true});}} +test('missing evidence files refuse generation rather than claiming coverage',()=>fixture(dir=>{ + rmSync(resolve(dir,'tests/custody.test.js'));assert.throws(()=>generateFacets(dir),/ENOENT/); +})); +test('missing action controls refuse generation rather than silently dropping a feature',()=>fixture(dir=>{ + const path=resolve(dir,'index.html');writeFileSync(path,readFileSync(path,'utf8').replace('id="dbPutBtn"','id="unknown-control"'));assert.throws(()=>generateFacets(dir),/missing action control/); +})); +test('meaningful source changes and altered type dependencies refuse stale facets',()=>fixture(dir=>{ + const path=resolve(dir,'app/src/Product/Features.lex.tex');writeFileSync(path,readFileSync(path,'utf8').replace('Browser control','Misleading control'));assert.throws(()=>checkFacets(dir),/stale output/); + const type=resolve(dir,'app/src/Foundation/Qual.lex.tex');writeFileSync(type,readFileSync(type,'utf8')+'\n');assert.throws(()=>generateFacets(dir),/modified reference type/); +})); + +test('every stakeholder has a real typed goal and journey',()=>{ + const {catalog:c}=generateFacets(root); + c.users.groups.forEach((_,index)=>assert.ok(c.users.goals.some(g=>g.user===index))); + assert.ok(c.journeys.some(j=>j.actor==='reader'&&j.steps.includes('Product.Features::featureLearnProtocol'))); + assert.ok(c.journeys.some(j=>j.actor==='reviewer')); + assert.ok(c.journeys.some(j=>j.actor==='systemIntegrator')); +}); +test('dangling facet references and reversed OPM edges are rejected',()=>{ + const {outputs,catalog:c}=generateFacets(root); + const texts=new Map(c.modules.map(m=>[m.module,outputs.get(m.path)])); + texts.set('Product.Architecture',readFileSync(resolve(root,'app/src/Product/Architecture.lex.tex'),'utf8')); + texts.set('Foundation.Arch',readFileSync(resolve(root,'app/src/Foundation/Arch.lex.tex'),'utf8')); + assert.equal(validateFacetReferences(texts),true); + const broken=new Map(texts);broken.set('Product.Features',broken.get('Product.Features').replace('\"Product.Features::callJoin\"','\"Product.Features::missingCall\"')); + assert.throws(()=>validateFacetReferences(broken),/dangling reference/); + const opm=new Map(texts);opm.set('Product.Design',opm.get('Product.Design').replace('kind := (ctor Foundation.Arch::OpmLinkKind.effect), source := \"Product.Architecture::storage\", target := \"Product.Design::processCommitLocal\"','kind := (ctor Foundation.Arch::OpmLinkKind.effect), source := \"Product.Design::processCommitLocal\", target := \"Product.Architecture::storage\"')); + assert.throws(()=>validateFacetReferences(opm),/OPM direction/); +}); + +// Authoring run 43448596054 typechecked all 38 modules but the real Prism +// projection refused PP2017. The application document omits every facet unless +// all three official packages are in the glossary closure, regardless of types. +test('application facet projection includes all official lexicons with exact upstream bytes',()=>{ + const {outputs,catalog:c}=generateFacets(root); + const texts=new Map(c.modules.map(m=>[m.module,outputs.get(m.path)])); + texts.set('Product.Architecture',readFileSync(resolve(root,'app/src/Product/Architecture.lex.tex'),'utf8')); + const read=path=>readFileSync(resolve(root,path),'utf8'); + assert.equal(validateFacetLexicons(read,texts),true); + for(const [module,packageName]of [['Product.Quality','prism.qual'],['Product.Security','prism.sec']]){ + const broken=new Map(texts);broken.set(module,broken.get(module).replace(`\\useglossary{${packageName}@1.0.0}\n`,'')); + assert.throws(()=>validateFacetLexicons(read,broken),/missing application facet lexicon closure/); + assert.throws(()=>validateFacetLexicons(path=>path==='app/lexlean.toml'?read(path).replace(`package = "${packageName}"`,'package = "missing"'):read(path),texts),/missing application facet lexicon closure/); + } + assert.throws(()=>validateFacetLexicons(path=>read(path)+(path==='app/language/prism.sec/entries/sec-asset.toml'?'\n':''),texts),/modified official facet lexicon/); + assert.ok(c.sources.some(s=>s.path==='app/lexlean.toml')); + assert.equal(c.sources.filter(s=>/^app\/language\/prism\.(qual|sec)\//.test(s.path)).length,14); +}); + +test('typed projection rejects wrong-kind feature actors and steps, not just missing declarations',()=>{ + const {outputs,catalog:c}=generateFacets(root); + const texts=new Map(c.modules.map(m=>[m.module,outputs.get(m.path)])); + for(const module of ['Product.Architecture','Foundation.Arch'])texts.set(module,readFileSync(resolve(root,`app/src/${module.replaceAll('.','/')}.lex.tex`),'utf8')); + const mutate=(module,from,to)=>{const result=new Map(texts);assert.ok(result.get(module).includes(from));result.set(module,result.get(module).replace(from,to));return result;}; + assert.equal(validateFacetReferences(texts),true); + assert.throws(()=>validateFacetReferences(mutate('Product.Features','actor := "Product.Architecture::operator"','actor := "Product.Architecture::browser"')),/unresolved journey stakeholder/); + assert.throws(()=>validateFacetReferences(mutate('Product.Features','steps := (cons "Product.Features::featureJoin"','steps := (cons "Product.Features::callJoin"')),/unresolved journey feature/); + assert.throws(()=>validateFacetReferences(mutate('Product.Features','calls := (cons "Product.Features::callJoin" (nil String))','calls := (nil String)')),/empty feature calls/); + assert.throws(()=>validateFacetReferences(mutate('Product.Security','componentIndex := 0','componentIndex := 999')),/unresolved asset component/); + assert.throws(()=>validateFacetReferences(mutate('Product.Quality','requirementIndex := 0','requirementIndex := 999')),/unresolved quality requirement/); + assert.throws(()=>validateFacetReferences(mutate('Product.Security','index := 0','index := 999')),/noncanonical facet index/); +}); + +test('design projection retains real architecture directions and callee ownership',()=>{ + const {outputs,catalog:c}=generateFacets(root); + const texts=new Map(c.modules.map(m=>[m.module,outputs.get(m.path)])); + for(const module of ['Product.Architecture','Foundation.Arch'])texts.set(module,readFileSync(resolve(root,`app/src/${module.replaceAll('.','/')}.lex.tex`),'utf8')); + const design=texts.get('Product.Design'); + const change=fn=>{const result=new Map(texts);result.set('Product.Design',fn(design));return result;}; + const processBody='name: processAdmitObject,\n parameters: [],\n result: Foundation.Arch::SystemProcess,\n body: (record Foundation.Arch::SystemProcess {owner := "Product.Architecture::storage"})'; + assert.ok(design.includes(processBody)); + assert.throws(()=>validateFacetReferences(change(text=>text.replace(processBody,processBody.replace('::storage','::admission')))),/unbacked OPM object\/process link/); + assert.throws(()=>validateFacetReferences(change(text=>text.replace('source := "Product.Design::processCommitLocal", target := "Product.Design::processRequestPlacement"','source := "Product.Design::processRequestPlacement", target := "Product.Design::processCommitLocal"'))),/unbacked OPM invocation/); + assert.throws(()=>validateFacetReferences(change(text=>text.replace('process := "Product.Design::processAuthorizePointer"','process := "Product.Design::processBeginWrite"'))),/UML message process owner/); + assert.throws(()=>validateFacetReferences(change(text=>text.replace('process := "Product.Design::processDispatchDnsWrite"','process := "Product.Design::processBeginWrite"'))),/UML message process owner/); + assert.throws(()=>validateFacetReferences(change(text=>text.replace('trigger := "Product.Design::processBeginWrite"','trigger := "Product.Design::processDispatchDnsWrite"'))),/state transition process owner/); + const rows=literalRows(design,new Set(['Foundation.Arch::UmlMessage','Foundation.Arch::SystemProcess'])); + const owners=new Map(rows.filter(r=>r.type.endsWith('::SystemProcess')).map(r=>['Product.Design::'+r.declaration,r.owner])); + for(const row of rows.filter(r=>r.type.endsWith('::UmlMessage')))assert.equal(owners.get(row.process),row.kind.constructor.endsWith('.reply')?row.source:row.target); + assert.ok(rows.some(r=>r.declaration==='processAuthorizePointer'&&r.owner==='Product.Architecture::pointerAuthority')); + assert.ok(rows.some(r=>r.declaration==='processObserveDnsRecord'&&r.owner==='Product.Architecture::runtimeHost')); +}); + +// Actual pinned SDK authoring run 43444521371 stopped with LLT4001 here: +// Task.feature resolves through Experience, but the nested .acceptance projection +// also needs the Feature owner in Users' direct import environment. +test('nested Feature acceptance projection directly imports its owner without weakening the obligation',()=>{ + const {outputs}=generateFacets(root); + const users=outputs.get('app/src/Product/Users.lex.tex'); + assert.match(users,/\\importmodule\{Foundation\.Arch\}/); + assert.match(users,/\\importmodule\{Foundation\.Experience\.V1\.Model\}/); + assert.match(users,/\(project \(project head feature\) acceptance\)/); + assert.match(users,/name: everyTaskNamesAcceptanceEvidence,[\s\S]*?statement: \(\(tasksHaveAcceptance \(tasks\)\) = true\),[\s\S]*?proof: decide\{\}/); +}); + +// Genuine pinned SDK formatter output from authoring run 43445915817. +// Keep complete match bodies exact so formatting fixes cannot weaken the predicates. +test('Users match predicates reproduce the pinned SDK canonical format',()=>{ + const users=generateFacets(root).outputs.get('app/src/Product/Users.lex.tex'); + const predicates=[ + ['goalsHaveUsers','Goal), users : Nat','(((project head user) true\n | List.cons head rest => ${branch}),\n recursive_argument: items\n}`; + assert.ok(users.includes(expected),`${name} diverges from the observed SDK format`); + } + for(const [name,expression]of [ + ['everyGoalNamesAUser','goalsHaveUsers (goals) 4'], + ['everyTaskNamesAGoal','tasksHaveGoals (tasks) 10'], + ['everyTaskNamesAcceptanceEvidence','tasksHaveAcceptance (tasks)'] + ])assert.ok(users.includes(`name: ${name},\n parameters: [],\n statement: ((${expression}) = true),\n proof: decide{}`)); +}); diff --git a/tests/product-inventory.test.js b/tests/product-inventory.test.js new file mode 100644 index 0000000..7d75263 --- /dev/null +++ b/tests/product-inventory.test.js @@ -0,0 +1,47 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import {cpSync,mkdirSync,mkdtempSync,readFileSync,rmSync,symlinkSync,writeFileSync} from 'node:fs'; +import {tmpdir} from 'node:os'; +import {dirname,join,resolve} from 'node:path'; +import {resourceInventory,validateFacetBindings,readProduct,validateProduct} from '../scripts/check-product.mjs'; +const root=resolve(import.meta.dirname,'..'); +function resources(t){ + const base=mkdtempSync(join(tmpdir(),'stitch-resource-inventory-'));t.after(()=>rmSync(base,{recursive:true,force:true})); + const paths=new Set(resourceInventory(root).map(x=>x.path)); + const catalog=JSON.parse(readFileSync(join(root,'product/facets.json'))); + for(const row of catalog.sources)paths.add(row.path); + for(const path of paths){mkdirSync(dirname(join(base,path)),{recursive:true});cpSync(join(root,path),join(base,path));} + return base; +} +test('resource inventory covers source, provenance, evidence and the authoring controls without self-binding',()=>{ + const rows=resourceInventory(root),paths=new Set(rows.map(x=>x.path)); + for(const path of ['product/facets.json','product/facet-type-provenance.json','product/source-verification.json','product/source-attestation.json','product/source-build-manifest.json','product/UORUST-LICENSE-MIT.txt','docs/complete-prism.md','docs/reader-experience.md','scripts/author-source.sh','scripts/retain-authoring-evidence.mjs','.github/workflows/source-authoring.yml','tests/product-inventory.test.js','app/lexlean.lock','site/facets.json'])assert.ok(paths.has(path),path); + assert.ok(!paths.has('product/contracts.json'));assert.equal(paths.size,rows.length); + assert.deepEqual(rows.map(x=>x.path),[...paths].sort()); +}); +test('new resources and changed retained evidence change the inventory, not proof status',t=>{ + const base=resources(t),before=resourceInventory(base); + writeFileSync(join(base,'docs/new-review.md'),'New review input.');assert.ok(resourceInventory(base).some(x=>x.path==='docs/new-review.md')); + const path='product/source-verification.json';writeFileSync(join(base,path),readFileSync(join(base,path),'utf8')+'\n'); + assert.notEqual(resourceInventory(base).find(x=>x.path===path).sha256,before.find(x=>x.path===path).sha256); +}); +test('required facet resources cannot disappear from a freshly written register',t=>{ + const base=resources(t);rmSync(join(base,'product/facets.json'));assert.throws(()=>resourceInventory(base),/ENOENT/); +}); +test('resource symlinks and parent aliases refuse instead of hiding alternate input bytes',t=>{ + const base=resources(t);symlinkSync(join(root,'README.md'),join(base,'docs/linked.md'));assert.throws(()=>resourceInventory(base),/resource symlink/); + rmSync(join(base,'docs/linked.md'));rmSync(join(base,'docs'),{recursive:true});symlinkSync(join(root,'docs'),join(base,'docs'));assert.throws(()=>resourceInventory(base),/nonsymlink resource directory/); +}); +test('changed facet inputs and missing generated module fail before register regeneration',t=>{ + const base=resources(t);validateFacetBindings(base); + writeFileSync(join(base,'index.html'),readFileSync(join(base,'index.html'),'utf8')+'\n');assert.throws(()=>validateFacetBindings(base),/stale facet source index.html/); + cpSync(join(root,'index.html'),join(base,'index.html')); + const first=JSON.parse(readFileSync(join(base,'product/facets.json'))).modules[0];rmSync(join(base,first.path));assert.throws(()=>validateFacetBindings(base),/ENOENT/); +}); +test('every shipped site file is source-declared and omitting its record refuses',()=>{ + const p=readProduct(root); + for(const path of ['site/site.css','site/explorer.js','site/catalog.js','site/stitch-fabric.svg','site/facets.json']){ + assert.ok(p.assets.some(a=>a.path===path));assert.ok(p.components.find(c=>c.id==='browser').implementation.includes(path)); + const changed=structuredClone(p);changed.assets=changed.assets.filter(a=>a.path!==path);assert.throws(()=>validateProduct(changed,root),/unregistered component asset|unmodeled browser artifact/); + } +}); diff --git a/tests/product-model.test.js b/tests/product-model.test.js new file mode 100644 index 0000000..d598146 --- /dev/null +++ b/tests/product-model.test.js @@ -0,0 +1,63 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFileSync, mkdtempSync, cpSync, writeFileSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { resolve } from 'node:path'; +import { readProduct, validateProduct, productRegister, literalRows } from '../scripts/check-product.mjs'; +const root=resolve(import.meta.dirname,'..'); +const source=()=>readProduct(root); +const changed=fn=>{const p=structuredClone(source());fn(p);return p;}; +test('complete product register is bound to current source and exact local assets',()=>{ + const expected=productRegister(root); + assert.deepEqual(JSON.parse(readFileSync(resolve(root,'product/contracts.json'),'utf8')),expected); + assert.equal(expected.components.length,19); + assert.equal(expected.capabilities.length,expected.hostCapabilities.length); + assert.deepEqual(expected.releaseBlockers, []); + const guest=expected.assets.find(a=>a.path==='images/buildroot-bzimage.bin'); + assert.equal(guest.sha256,'313a6b545290a2b47856b49bfcc4c7577469749b315932ae008d39fe70fc7f07'); + assert.equal(guest.bytes,8053248); + assert.match(guest.licenseStatus,/fd59fae669e9a40271fb584ca071270d8ed0b8f8/); + for(const a of expected.assets){assert.match(a.sha256,/^[0-9a-f]{64}$/);assert.ok(a.bytes>0);} + assert.equal(expected.assurance.includes('not a Prism receipt'),true); +}); +test('dangling contract owner is refused',()=>assert.throws(()=>validateProduct(changed(p=>p.capabilities[0].owner='missing'),root),/unknown capability owner/)); +test('undeclared assumptions are refused',()=>assert.throws(()=>validateProduct(changed(p=>p.capabilities[0].assumptions.push('invented')),root),/unknown assumption/)); +test('omitted capability coverage is refused',()=>assert.throws(()=>validateProduct(changed(p=>p.capabilities.pop()),root),/capability coverage/)); +test('duplicate components are refused',()=>assert.throws(()=>validateProduct(changed(p=>p.components.push(p.components[0])),root),/duplicate/)); +test('missing component assets are refused',()=>assert.throws(()=>validateProduct(changed(p=>p.assets=p.assets.filter(a=>a.path!=='index.html')),root),/unregistered component asset/)); +test('unknown deployment capabilities are refused',()=>assert.throws(()=>validateProduct(changed(p=>p.deployments[0].requiredCapabilities.push('bgp')),root),/unknown deployment capability/)); +test('dangling architecture flows are refused',()=>assert.throws(()=>validateProduct(changed(p=>p.architecture.find(x=>x.type==='Foundation.Arch::Edge').toIndex=999),root),/dangling architecture edge/)); +test('architecture indexes are sorted positions, not discretionary scores',()=>assert.throws(()=>validateProduct(changed(p=>p.architecture.find(x=>x.type==='Foundation.Arch::Component').index=50),root),/noncanonical architecture index/)); +test('relay opt-in cannot be silently removed',()=>assert.throws(()=>validateProduct(changed(p=>p.capabilities.find(x=>x.capability==='PublicRelay').enabledByDefault=true),root),/relay consent boundary/)); +test('native routing cannot be claimed supported in browser',()=>assert.throws(()=>validateProduct(changed(p=>p.capabilities.find(x=>x.capability==='NativeRouting').enabledByDefault=true),root),/native routing overclaim/)); +test('literal register reader refuses duplicate fields and executable substitutions',()=>{ + const header='definition{\n name: x,\n parameters: [],\n result: Component,\n body: '; + assert.throws(()=>literalRows(header+'(record Component {id := "x", id := "y"})\n}'),/duplicate field/); + assert.throws(()=>literalRows(header+'(record Component {id := (computeIdentity)})\n}'),/unsupported literal/); +}); +test('asset substitution changes the exact artifact identity without inventing provenance',()=>{ + const dir=mkdtempSync(resolve(tmpdir(),'stitch-product-mutation-')); + try{ + for(const path of ['app','src','v86','images','vendor','index.html','package.json','package-lock.json','prismpm.lock','standards.lock','CONTRACT.json','Cargo.toml','Cargo.lock','README.md','.gitignore','product','site','docs','scripts','tests','.github'])cpSync(resolve(root,path),resolve(dir,path),{recursive:true}); + const before=productRegister(dir);writeFileSync(resolve(dir,'v86/seabios.bin'),new Uint8Array([0,1,2,3])); + assert.equal(before.releaseBlockers.some(x=>x.path==='v86/seabios.bin'),false); + assert.throws(()=>productRegister(dir),/distribution identity mismatch/); + cpSync(resolve(root,'v86/seabios.bin'),resolve(dir,'v86/seabios.bin')); + rmSync(resolve(dir,'vendor/seabios/COPYING.LESSER')); + assert.throws(()=>productRegister(dir),/ENOENT/); + } finally{rmSync(dir,{recursive:true,force:true});} +}); + +test('origin persistence and Web Locks are explicit optional capabilities, not session RAM', () => { + const p = readProduct(root); + assert.deepEqual(p.hostCapabilities.slice(-2), ['OriginStorage', 'WebLock']); + for (const id of ['originStorage', 'webLock']) { + assert.equal(p.capabilities.find(c => c.id === id).enabledByDefault, false); + assert.equal(p.deployments.find(d => d.id === 'browserSession').requiredCapabilities.includes(id), false); + } + assert.match(p.capabilities.find(c => c.id === 'sessionStorage').operation, /RAM/); + const authority = p.components.find(c => c.id === 'pointerAuthority'); + assert.ok(authority.implementation.includes('src/layer1-uor/browser-authority.js')); + assert.ok(authority.models.includes('Stitch.Effects')); + assert.ok(p.assets.some(a => a.path === 'src/layer1-uor/browser-authority.js')); +}); diff --git a/tests/recovery-ui.test.js b/tests/recovery-ui.test.js new file mode 100644 index 0000000..bef95c1 --- /dev/null +++ b/tests/recovery-ui.test.js @@ -0,0 +1,154 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { installRecoveryControls } from '../src/recovery-ui.js'; +import { exportRecoveryBundle, recoveryObject } from '../src/recovery.js'; +import { generateAuthority, signPointer, PointerObserver } from '../src/layer1-uor/pointer.js'; +import { demoProgram, createCheckpoint } from '../src/layer4-compute/replay.js'; +function setup({ objects = new Map(), observerFactory = options => new PointerObserver(options) } = {}) { + const elements = new Map(), handlers = new Map(); + const element = () => ({ value: '', checked: false, files: [], children: [], listeners: {}, textContent: '', disabled: false, attributes: {}, + setAttribute(name, value) { this.attributes[name] = value; }, + get selectedOptions() { return this.children.filter(child => child.selected); }, + addEventListener(event, handler) { this.listeners[event] = handler; }, + replaceChildren(...children) { this.children = children; this.value = children[0]?.value ?? ''; }, + querySelectorAll() { return []; }, click() {} }); + const document = { getElementById(id) { if (!elements.has(id)) elements.set(id, element()); return elements.get(id); }, createElement: element }; + const pointerObservers = new Map(); + const pointerObserver = () => { + const name = document.getElementById('dnsQueryInput').value.trim(), trustedAuthorityKey = document.getElementById('pointerAuthorityInput').value.trim(); + const key = `${name}:${trustedAuthorityKey}`; + if (!pointerObservers.has(key)) pointerObservers.set(key, observerFactory({ name, trustedAuthorityKey })); + return pointerObservers.get(key); + }; + const controls = installRecoveryControls({ document, liveDb: { objects }, computeCoord: { jobs: new Map() }, + pointerObservers, pointerObserver, bindModelAction: (id, handler) => handlers.set(id, handler) }); + return { document, controls, handlers, pointerObservers, pointerObserver, get: id => document.getElementById(id) }; +} +test('recovery UI checks chosen file, restores local evidence and explicitly completes only pure jobs', async () => { + const ui = setup(); const program = demoProgram(5); + const wire = await exportRecoveryBundle({ version: 1, objects: [await recoveryObject(new Uint8Array([1, 2]))], + jobs: [{ program, checkpoint: await createCheckpoint(program, 2) }], anchors: [] }); + const bytes = new TextEncoder().encode(wire); + ui.get('recoveryFile').files = [{ size: bytes.length, arrayBuffer: async () => bytes.buffer }]; + ui.get('recoveryAnchorConsent').checked = true; + await ui.handlers.get('importRecoveryBtn')(); + assert.equal(ui.get('recoveryAnchorConsent').checked, false); + assert.equal(ui.controls.facts().recoveryHasEvidence, true); + assert.equal(ui.controls.facts().recoveryHasObjects, true); + assert.equal(ui.controls.facts().recoveryHasJobs, true); + assert.match(ui.get('recoveryStatus').textContent, /No mesh, VM or DNS effects/); + await ui.handlers.get('resumeRecoveredJobBtn')(); + assert.match(ui.get('recoveryStatus').textContent, /Pure local replay finished at step 5/); + ui.get('recoveryFile').files = [{ size: 4, arrayBuffer: async () => new TextEncoder().encode('null').buffer }]; + await ui.handlers.get('importRecoveryBtn')(); + assert.match(ui.get('recoveryStatus').textContent, /Refused/); + assert.equal(ui.controls.facts().recoveryHasEvidence, true); +}); +test('oversize file refuses before reading, pending duplicate clicks do not repeat import', async () => { + const ui = setup(); let reads = 0, resolve; + ui.get('recoveryByteLimit').value = '0'; + ui.get('recoveryFile').files = [{ size: 1, arrayBuffer: async () => { reads++; } }]; + await ui.handlers.get('importRecoveryBtn')(); assert.equal(reads, 0); + ui.get('recoveryByteLimit').value = '1000'; + const bytes = new TextEncoder().encode(await exportRecoveryBundle({ version: 1, objects: [], jobs: [], anchors: [] })); + ui.get('recoveryFile').files = [{ size: bytes.length, arrayBuffer: () => { reads++; return new Promise(r => { resolve = r; }); } }]; + const pending = ui.handlers.get('importRecoveryBtn')(); + assert.equal(ui.controls.facts().recoveryBusy, true); + assert.equal(ui.get('recoveryControls').attributes['aria-busy'], 'true'); + await ui.handlers.get('importRecoveryBtn')(); assert.equal(reads, 1); + resolve(bytes.buffer); await pending; assert.equal(ui.controls.facts().recoveryBusy, false); + assert.equal(ui.get('recoveryControls').attributes['aria-busy'], 'false'); +}); + + +test('recovery keeps export choices across reopening and clears stale anchor consent when its scope changes', async () => { + const objects = new Map([['a', { verified: true, bytes: Uint8Array.of(1) }], ['b', { verified: true, bytes: Uint8Array.of(2) }]]); + const ui = setup({ objects }); const panel = ui.get('recoveryControls'); + panel.open = true; panel.listeners.toggle(); + const control = ui.get('recoveryExportSelection'); + control.children[1].selected = false; + panel.listeners.toggle(); + assert.deepEqual(control.selectedOptions.map(option => option.value), ['object:a']); + objects.set('c', { verified: true, bytes: Uint8Array.of(3) }); + panel.listeners.toggle(); + assert.deepEqual(control.selectedOptions.map(option => option.value), ['object:a']); + for (const [id, event] of [['recoveryAnchors', 'change'], ['recoveryAuthority', 'input'], ['recoveryDigest', 'input']]) { + ui.get('recoveryAnchorConsent').checked = true; ui.get(id).listeners[event](); + assert.equal(ui.get('recoveryAnchorConsent').checked, false); + } + assert.equal(ui.get('recoveryObjects').children[0].textContent, 'No objects imported'); +}); + +test('recovered typed jobs require priced work allowance before explicit continuation', async () => { + const { programWork } = await import('../src/layer4-compute/replay.js'); + const ui = setup(); + const program = { version: 2, bits: 8, capacityBits: 8, initialValueHex: '0x3', + instructions: [{ op: 17, argBits: 8, argHex: '0x7' }] }; + const wire = await exportRecoveryBundle({ version: 1, objects: [], jobs: [{ program, checkpoint: await createCheckpoint(program, 0) }], anchors: [] }); + const bytes = new TextEncoder().encode(wire); + ui.get('recoveryFile').files = [{ size: bytes.length, arrayBuffer: async () => bytes.buffer }]; + await ui.handlers.get('importRecoveryBtn')(); + ui.get('recoveryStepLimit').value = program.instructions.length; + await ui.handlers.get('resumeRecoveredJobBtn')(); + assert.match(ui.get('recoveryStatus').textContent, /Refused.*work allowance/); + ui.get('recoveryStepLimit').value = programWork(program); + await ui.handlers.get('resumeRecoveredJobBtn')(); + assert.match(ui.get('recoveryStatus').textContent, /Pure local replay finished at step 1/); +}); + +async function importAnchor(ui) { + const authority = await generateAuthority(), now = Date.now(); + const anchor = await signPointer({ version: 1, name: 'state.example', authorityKey: authority.publicKey, revision: 7, + previousDigest: 'sha256:' + 'a'.repeat(64), objectRoot: 'sha256:' + 'b'.repeat(64), validFromMs: now - 1000, validUntilMs: now + 100000 }, authority.privateKey); + const bytes = new TextEncoder().encode(await exportRecoveryBundle({ version: 1, objects: [], jobs: [], anchors: [anchor] })); + ui.get('recoveryFile').files = [{ size: bytes.length, arrayBuffer: async () => bytes.buffer }]; + await ui.handlers.get('importRecoveryBtn')(); + ui.get('recoveryAuthority').value = authority.publicKey; ui.get('recoveryDigest').value = anchor.pointerDigest; + return { authority, anchor }; +} +async function acceptAnchor(ui) { + ui.get('recoveryAnchorConsent').checked = true; await ui.handlers.get('acceptRecoveryAnchorBtn')(); +} + +test('UI requires separate import, exact acceptance, matching independent live pin and explicit restoration', async () => { + const ui = setup(), { authority, anchor } = await importAnchor(ui); + assert.equal(ui.controls.facts().recoveryCanRestoreAnchor, false); + await ui.handlers.get('restoreRecoveryAnchorBtn')(); assert.equal(ui.pointerObservers.size, 0); + await acceptAnchor(ui); assert.equal(ui.pointerObservers.size, 0); + ui.get('dnsQueryInput').value = anchor.name; + assert.equal(ui.controls.facts().recoveryCanRestoreAnchor, false); + ui.get('pointerAuthorityInput').value = authority.publicKey; + assert.equal(ui.controls.facts().recoveryCanRestoreAnchor, true); + await ui.handlers.get('restoreRecoveryAnchorBtn')(); + assert.deepEqual(ui.pointerObserver().head, anchor); + assert.equal(ui.controls.facts().recoveryRestoredAnchor, true); + assert.match(ui.get('recoveryStatus').textContent, /No DNS write, mesh or VM effect/); + assert.match(ui.get('recoveryLiveScope').textContent, /Retained revision 7/); + ui.get('recoveryDigest').value = 'sha256:' + 'c'.repeat(64); ui.get('recoveryDigest').listeners.input(); + assert.equal(ui.controls.facts().recoveryCanRestoreAnchor, false); + assert.deepEqual(ui.pointerObserver().head, anchor); +}); + +test('UI ignores duplicate restore and close or changed scope cancels a pending commit without replay on reopen', async () => { + let release, reached, calls = 0; + const ui = setup({ observerFactory: options => { + const observer = new PointerObserver(options), restore = observer.restoreFromRecovery.bind(observer); + observer.restoreFromRecovery = async (...args) => { + calls++; reached(); await new Promise(resolve => { release = resolve; }); return restore(...args); + }; + return observer; + } }); + const { authority, anchor } = await importAnchor(ui); await acceptAnchor(ui); + ui.get('dnsQueryInput').value = anchor.name; ui.get('pointerAuthorityInput').value = authority.publicKey; + for (const cancel of [() => { ui.get('recoveryControls').open = false; ui.get('recoveryControls').listeners.toggle(); }, + () => { ui.get('pointerAuthorityInput').listeners.input(); }]) { + let entered; const started = new Promise(resolve => { entered = resolve; }); reached = entered; + const pending = ui.handlers.get('restoreRecoveryAnchorBtn')(); await started; + const before = calls; await ui.handlers.get('restoreRecoveryAnchorBtn')(); assert.equal(calls, before); + cancel(); release(); await pending; + assert.equal(ui.pointerObserver().head, null); + assert.match(ui.get('recoveryStatus').textContent, /Refused/); + ui.get('recoveryControls').open = true; ui.get('recoveryControls').listeners.toggle(); + assert.equal(calls, before); assert.equal(ui.pointerObserver().head, null); + } +}); diff --git a/tests/recovery.test.js b/tests/recovery.test.js new file mode 100644 index 0000000..09e69af --- /dev/null +++ b/tests/recovery.test.js @@ -0,0 +1,140 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { RecoveryVault, recoveryObject, exportRecoveryBundle, verifyRecoveryBundle, RECOVERY_LIMITS } from '../src/recovery.js'; +import { canonicalBytes, sha256Bytes } from '../src/layer1-uor/custody.js'; +import { demoProgram, createCheckpoint } from '../src/layer4-compute/replay.js'; +import { generateAuthority, signPointer } from '../src/layer1-uor/pointer.js'; +const empty = () => ({ version: 1, objects: [], jobs: [], anchors: [] }); +const wire = value => new TextDecoder().decode(canonicalBytes(value, { maxBytes: RECOVERY_LIMITS.wireBytes, maxStringLength: 131072, maxEntries: 262144 })); +async function fixture() { + const bundle = empty(); + bundle.objects.push(await recoveryObject(new TextEncoder().encode('recover me'))); + const program = demoProgram(5); + bundle.jobs.push({ program, checkpoint: await createCheckpoint(program, 3) }); + return bundle; +} +test('roundtrip restores exact object and replay evidence without host effects', async () => { + const vault = new RecoveryVault(); + const bundle = await fixture(); + const exported = await exportRecoveryBundle(bundle); + const result = await vault.import(exported); + assert.equal(result.entries, 2); assert.deepEqual(result.effects, []); + assert.equal(result.durability, 'session-only'); + assert.equal(new TextDecoder().decode(await vault.objectBytes(bundle.objects[0].manifest.object.contentDigest)), 'recover me'); + assert.equal(await vault.export(), exported); + await vault.import(exported); // exact duplicate is idempotent evidence + assert.equal(vault.snapshot().entries, 2); +}); +test('maximum live object survives export/import, reduced operator cap refuses', async () => { + const bundle = empty(); const bytes = new Uint8Array(128 * 1024); bytes[bytes.length - 1] = 199; + bundle.objects.push(await recoveryObject(bytes)); + const exported = await exportRecoveryBundle(bundle); const vault = new RecoveryVault(); + await vault.import(exported); + assert.deepEqual(await vault.objectBytes(bundle.objects[0].manifest.object.contentDigest), bytes); + await assert.rejects(new RecoveryVault({ wireBytes: 1000 }).import(exported)); +}); +test('corruption, partial objects, unknown fields, noncanonical and duplicate evidence refuse atomically', async () => { + const vault = new RecoveryVault(); const bundle = await fixture(); await vault.import(wire(bundle)); + const before = vault.snapshot(); + const cases = []; + let bad = structuredClone(bundle); bad.objects[0].fragments[0].hex = '00'; cases.push(wire(bad)); + bad = structuredClone(bundle); bad.objects[0].fragments.pop(); cases.push(wire(bad)); + bad = structuredClone(bundle); bad.objects.push(bad.objects[0]); cases.push(wire(bad)); + bad = structuredClone(bundle); bad.privateKey = 'secret'; cases.push(wire(bad)); + cases.push(wire(bundle) + ' '); cases.push('{"version":1,"version":1,"objects":[],"jobs":[],"anchors":[]}'); + for (const invalid of cases) { await assert.rejects(vault.import(invalid)); assert.deepEqual(vault.snapshot(), before); } +}); +test('forged state with recomputed digest fails replay, foreign model fails identity', async () => { + const bundle = await fixture(); const checkpoint = bundle.jobs[0].checkpoint; + checkpoint.stateHex = '0x1'; + const { checkpointDigest, ...body } = checkpoint; + checkpoint.checkpointDigest = await sha256Bytes(canonicalBytes(body), 'checkpoint'); + await assert.rejects(verifyRecoveryBundle(wire(bundle)), /checkpoint-replay/); + checkpoint.modelDigest = 'sha256:' + '0'.repeat(64); + await assert.rejects(verifyRecoveryBundle(wire(bundle)), /checkpoint-model/); +}); +test('direct successor without retained predecessor does not overwrite evidence', async () => { + const bundle = await fixture(); const vault = new RecoveryVault(); await vault.import(wire(bundle)); + const before = vault.snapshot(); bundle.jobs[0].checkpoint = await createCheckpoint(bundle.jobs[0].program, 4); + await assert.rejects(vault.import(wire(bundle)), /conflict/); assert.deepEqual(vault.snapshot(), before); +}); +test('aggregate limits precede replay and bound merged entries', async () => { + const bundle = await fixture(); + await assert.rejects(new RecoveryVault({ replaySteps: 2 }).import(wire(bundle)), /replay-limit/); + const vault = new RecoveryVault({ entries: 2 }); await vault.import(wire(bundle)); const before = vault.snapshot(); + const more = empty(); more.objects.push(await recoveryObject(new Uint8Array([1]))); + await assert.rejects(vault.import(wire(more)), /capacity/); assert.deepEqual(vault.snapshot(), before); +}); +test('anchors stay untrusted; separate exact recent consent, signature, expiry and conflict required', async () => { + const authority = await generateAuthority(); const bundle = empty(); + const anchor = await signPointer({ version: 1, name: 'example', authorityKey: authority.publicKey, revision: 7, + previousDigest: 'sha256:' + 'a'.repeat(64), objectRoot: 'sha256:' + 'b'.repeat(64), validFromMs: 10, validUntilMs: 100 }, authority.privateKey); + bundle.anchors.push(anchor); const vault = new RecoveryVault(); await vault.import(wire(bundle)); + assert.deepEqual(vault.snapshot().acceptedAnchors, []); + const approval = { name: anchor.name, authorityKey: authority.publicKey, expectedDigest: anchor.pointerDigest, nowMs: 20, operatorAccepted: true }; + for (const patch of [{ operatorAccepted: false }, { expectedDigest: 'sha256:' + 'c'.repeat(64) }, { nowMs: 100 }, { nowMs: 9 }]) { + await assert.rejects(vault.acceptRecentAnchor({ ...approval, ...patch })); assert.deepEqual(vault.snapshot().acceptedAnchors, []); + } + assert.deepEqual(await vault.acceptRecentAnchor(approval), anchor); + const copy = new RecoveryVault(); await copy.import(await vault.export()); + assert.deepEqual(copy.snapshot().acceptedAnchors, []); // trust never transits a file +}); +test('concurrent imports cannot lose a committed update', async () => { + const a = await fixture(), b = empty(); b.objects.push(await recoveryObject(new Uint8Array([2]))); + const vault = new RecoveryVault(); const result = await Promise.allSettled([vault.import(wire(a)), vault.import(wire(b))]); + assert.equal(result.filter(r => r.status === 'fulfilled').length, 1); +}); + +test('monotonic job progress imports; stale state and forked direct links refuse atomically', async () => { + const bundle = await fixture(); const vault = new RecoveryVault(); await vault.import(wire(bundle)); + const older = wire(bundle); bundle.jobs[0].checkpoint = await createCheckpoint(bundle.jobs[0].program, 4, bundle.jobs[0].checkpoint); + await vault.import(wire(bundle)); assert.equal(vault.snapshot().bundle.jobs[0].checkpoint.stepIndex, 4); + const before = vault.snapshot(); await assert.rejects(vault.import(older), /rollback/); assert.deepEqual(vault.snapshot(), before); +}); +test('new signed anchor evidence retains old trust until separate exact acceptance', async () => { + const authority = await generateAuthority(); const bundle = empty(); + const base = { version: 1, name: 'example', authorityKey: authority.publicKey, revision: 7, + previousDigest: 'sha256:' + 'a'.repeat(64), objectRoot: 'sha256:' + 'b'.repeat(64), validFromMs: 10, validUntilMs: 100 }; + const first = await signPointer(base, authority.privateKey); bundle.anchors.push(first); + const vault = new RecoveryVault(); await vault.import(wire(bundle)); + const approval = { name: base.name, authorityKey: authority.publicKey, nowMs: 20, operatorAccepted: true }; + await vault.acceptRecentAnchor({ ...approval, expectedDigest: first.pointerDigest }); + const second = await signPointer({ ...base, revision: 8, previousDigest: first.pointerDigest }, authority.privateKey); + bundle.anchors = [second]; await vault.import(wire(bundle)); + assert.equal(vault.snapshot().acceptedAnchors[0].pointerDigest, first.pointerDigest); + await assert.rejects(vault.acceptRecentAnchor({ ...approval, expectedDigest: first.pointerDigest })); + await vault.acceptRecentAnchor({ ...approval, expectedDigest: second.pointerDigest }); + assert.equal(vault.snapshot().acceptedAnchors[0].pointerDigest, second.pointerDigest); + const before = vault.snapshot(); bundle.anchors = [first]; await assert.rejects(vault.import(wire(bundle)), /rollback/); + assert.deepEqual(vault.snapshot(), before); +}); +test('explicit codec budgets preserve bytes and reject invalid bounds', () => { + const value = { unicode: 'é', integer: 17, list: [true, null] }; + assert.deepEqual(canonicalBytes(value), canonicalBytes(value, { maxBytes: 1000, maxDepth: 8, maxEntries: 100, maxStringLength: 100 })); + for (const options of [{ maxBytes: -1 }, { maxEntries: Infinity }, { maxDepth: 1.5 }, { maxStringLength: NaN }]) { + assert.throws(() => canonicalBytes(value, options)); + } + assert.throws(() => canonicalBytes({ value: 'é' }, { maxBytes: 13 })); +}); + +test('typed CONCAT and POW survive recovery with exact widths and priced work admission', async () => { + const { programWork, resumeProgram, replayProgram } = await import('../src/layer4-compute/replay.js'); + const program = { version: 2, bits: 8, capacityBits: 24, initialValueHex: '0x1', instructions: [ + { op: 14, argBits: 16, argHex: '0x2' }, { op: 17, argBits: 24, argHex: '0x3' } + ] }; + const checkpoint = await createCheckpoint(program, 1); + const bundle = { ...empty(), jobs: [{ program, checkpoint }] }; + const encoded = await exportRecoveryBundle(bundle); + const cost = programWork(program, 0, 1); + assert.equal((await verifyRecoveryBundle(encoded)).cost.replaySteps, cost); + assert.ok(cost > checkpoint.stepIndex); + await assert.rejects(new RecoveryVault({ replaySteps: cost - 1 }).import(encoded), /replay-limit/); + const vault = new RecoveryVault({ replaySteps: cost }); await vault.import(encoded); + const restored = vault.snapshot().bundle.jobs[0]; + assert.equal(restored.checkpoint.stateBits, 24); + const resumed = await resumeProgram(restored.program, restored.checkpoint); + const expected = replayProgram(program); + assert.equal(resumed.stateBits, expected.stateBits); assert.equal(resumed.stateHex, expected.stateHex); + assert.deepEqual(resumed.effects, []); + assert.equal(await vault.export(), encoded); +}); diff --git a/tests/relay-framing.test.js b/tests/relay-framing.test.js new file mode 100644 index 0000000..e29d5fe --- /dev/null +++ b/tests/relay-framing.test.js @@ -0,0 +1,387 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { model } from '../src/layer1-uor/generated-model.js'; +import { sha256Bytes } from '../src/layer1-uor/custody.js'; +import { createObject } from '../src/layer3-storage/custody.js'; +import { LiveUorMeshDatabase } from '../src/layer3-storage/index.js'; +import { ResourceAdmission, wireBytes } from '../src/layer2-schedulers/policy.js'; +import { WebRtcTransportNode } from '../src/layer5-transport/index.js'; +import { RELAY_LIMITS, RELAY_LIFETIMES, RelayReassembler, snapshotRelayMessage, frameRelayMessage, + decodeBase64Url, encodeBase64Url } from '../src/layer5-transport/relay-framing.js'; + +const now = 1700000000000; +const session = '0'.repeat(32); +const normalize = value => JSON.parse(JSON.stringify(value)); +const code = expected => error => error.code === expected; +const deferred = () => { let resolve; const promise = new Promise(r => { resolve = r; }); return { promise, resolve }; }; +const frame = (payload, options = {}) => frameRelayMessage(snapshotRelayMessage({ from: 'remote', ...payload }), { + channelKey: 'mesh', session, scope: 'warm', createdAtMs: now, ...options }); +const assembler = (options = {}) => new RelayReassembler({ channelKey: 'mesh', scope: 'warm', wallClock: () => now, + clock: () => 0, automaticCleanup: false, ...options }); +const alter = (raw, updates) => JSON.stringify({ ...JSON.parse(raw), ...updates }); +const policy = limit => new ResourceAdmission({ limit: { requests: 4096, transferBytes: 16 * 1024 * 1024, + storageBytes: 16 * 1024 * 1024, computeSteps: 1000000, ...limit } }); +const drain = node => Promise.all([...node.signalSigning.values(), ...node.relayPending.values()].map(job => job.completion)); +function globals(t, entries) { + for (const [name, value] of Object.entries(entries)) { + const previous = Object.getOwnPropertyDescriptor(globalThis, name); + Object.defineProperty(globalThis, name, { value, configurable: true, writable: true }); + t.after(() => previous ? Object.defineProperty(globalThis, name, previous) : delete globalThis[name]); + } +} + +test('relay runtime limits and duplicate/closed/consent gates are source-derived', () => { + const source = model['Stitch.Relay.limits'](); + assert.deepEqual(RELAY_LIMITS, Object.fromEntries(Object.entries(source).map(([key, value]) => [key, Number(value)]))); + assert.equal(RELAY_LIMITS.wireBytes, 4096); + assert.equal(RELAY_LIMITS.messageBytes, 512 * 1024); + assert.equal(model['Stitch.Relay.effectAllowed'](true, 0, 0, true, true), false); + assert.equal(model['Stitch.Relay.effectAllowed'](false, 1, 0, true, true), false); + assert.equal(model['Stitch.Relay.effectAllowed'](false, 0, 0, true, false), false); +}); + +test('RFC4648 unpadded base64url is byte-exact and refuses aliases/nonzero pad bits', () => { + for (let length = 1; length <= 256; length++) { + const bytes = Uint8Array.from({ length }, (_, index) => index); + assert.deepEqual(decodeBase64Url(encodeBase64Url(bytes)), bytes); + } + for (const value of ['', 'A', 'AA=', 'AA==', '+w', '/w', '_x', 'AB', 'AAB', 'a a', 'é']) { + assert.throws(() => decodeBase64Url(value), code('relay-base64')); + } +}); + +test('full 512KiB logical JSON is framed below4096 UTF8 bytes without shrinking its message', async () => { + const overhead = wireBytes({ from: 'remote', data: '' }); + const payload = { from: 'remote', data: 'x'.repeat(RELAY_LIMITS.messageBytes - overhead) }; + const encoded = await frame(payload); + assert.equal(snapshotRelayMessage(payload).byteLength, RELAY_LIMITS.messageBytes); + assert.ok(encoded.frames.length > 1 && encoded.frames.length <= RELAY_LIMITS.frames); + assert.equal(encoded.bytes, encoded.frames.reduce((sum, item) => sum + wireBytes(item), 0)); + for (const raw of encoded.frames) assert.ok(wireBytes(raw) <= 4096); + const receiver = assembler(); + let result; + for (const raw of encoded.frames.reverse()) result = await receiver.accept(raw) ?? result; + assert.deepEqual(normalize(result), payload); + assert.equal(receiver.state.retainedBytes, 0); + assert.throws(() => snapshotRelayMessage({ ...payload, data: payload.data + 'x' }), code('relay-message-limit')); + receiver.dispose(); +}); + +test('UTF8 split boundaries, reordering and duplicates preserve logical bytes and deliver only once', async () => { + const payload = { from: 'peer', data: '😀é\n'.repeat(1800), nested: { objectRoot: 'unchanged' } }; + const encoded = await frame(payload); + const receiver = assembler(); + assert.equal(await receiver.accept(encoded.frames[1]), null); + assert.equal(await receiver.accept(encoded.frames[1]), null); + let result, deliveries = 0; + for (const raw of encoded.frames.slice().reverse()) { + const message = await receiver.accept(raw); + if (message) { result = message; deliveries++; } + } + for (const raw of encoded.frames) assert.equal(await receiver.accept(raw), null); + assert.equal(deliveries, 1); + assert.deepEqual(normalize(result), payload); + assert.equal(receiver.state.entries, 0); assert.equal(receiver.state.tombstones, 1); + receiver.dispose(); +}); + +test('corrupt chunks and conflicting duplicates tombstone exactly their assembly', async () => { + const encoded = await frame({ data: 'x'.repeat(6000) }); + const other = await frame({ data: 'y'.repeat(6000) }, { session: '1'.repeat(32) }); + const receiver = assembler(); + await receiver.accept(encoded.frames[0]); await receiver.accept(other.frames[0]); + const parsed = JSON.parse(encoded.frames[0]); + const bytes = decodeBase64Url(parsed.x); bytes[0] ^= 1; + await assert.rejects(receiver.accept(alter(encoded.frames[0], { x: encodeBase64Url(bytes) })), code('relay-conflicting-duplicate')); + for (const raw of encoded.frames) assert.equal(await receiver.accept(raw), null); + let result; + for (const raw of other.frames.slice(1)) result = await receiver.accept(raw) ?? result; + assert.equal(result.data, 'y'.repeat(6000)); + assert.equal(receiver.state.retainedBytes, 0); + receiver.dispose(); + const corrupt = assembler(); + await corrupt.accept(alter(encoded.frames[0], { x: encodeBase64Url(bytes) })); + await corrupt.accept(encoded.frames[1]); + await assert.rejects(corrupt.accept(encoded.frames[2]), code('relay-integrity')); + assert.equal(corrupt.state.entries, 0); assert.equal(corrupt.state.retainedBytes, 0); + corrupt.dispose(); +}); + +test('mixed metadata is refused, while sender sessions never concatenate', async () => { + const encoded = await frame({ data: 'x'.repeat(6000) }); + const receiver = assembler(); + await receiver.accept(encoded.frames[0]); + await assert.rejects(receiver.accept(alter(encoded.frames[0], { b: JSON.parse(encoded.frames[0]).b + 1 })), code('relay-mixed-message')); + assert.equal(receiver.state.entries, 0); + const separate = assembler(); + await separate.accept(encoded.frames[0]); + for (const raw of encoded.frames.slice(1)) assert.equal(await separate.accept(alter(raw, { s: 'f'.repeat(32) })), null); + assert.equal(separate.state.entries, 2); + assert.equal(separate.state.retainedBytes, 2 * JSON.parse(encoded.frames[0]).b); + receiver.dispose(); separate.dispose(); +}); + +test('wrong channel/purpose, malformed schema and oversized declarations never allocate an assembly', async () => { + const encoded = await frame({ data: 'x'.repeat(6000) }); + const receiver = assembler(); + const bad = [alter(encoded.frames[0], { p: 'signal' }), alter(encoded.frames[0], { c: 'sha256:' + 'f'.repeat(64) }), + alter(encoded.frames[0], { b: RELAY_LIMITS.messageBytes + 1 }), alter(encoded.frames[0], { n: RELAY_LIMITS.frames + 1 }), + alter(encoded.frames[0], { n: 0 }), alter(encoded.frames[0], { i: 999 }), alter(encoded.frames[0], { extra: true }), + encoded.frames[0].replace('"v":', '"v":"stitch/1","v":'), 'é'.repeat(4096)]; + for (const raw of bad) await assert.rejects(receiver.accept(raw)); + assert.equal(receiver.state.entries, 0); assert.equal(receiver.state.retainedBytes, 0); + receiver.dispose(); +}); + +test('sender timestamps cannot extend local assembly horizons and expired bytes are reclaimed', async () => { + let monotonic = 0, wall = now; + const encoded = await frame({ data: 'x'.repeat(6000) }, { scope: 'signal' }); + const receiver = assembler({ scope: 'signal', clock: () => monotonic, wallClock: () => wall }); + await receiver.accept(encoded.frames[0]); + monotonic = RELAY_LIMITS.assemblyAge; + assert.equal(receiver.state.entries, 0); assert.equal(receiver.state.retainedBytes, 0); + assert.equal(await receiver.accept(encoded.frames[1]), null); + monotonic = RELAY_LIFETIMES.signal; wall += RELAY_LIFETIMES.signal; + assert.equal(receiver.state.tombstones, 0); + await assert.rejects(receiver.accept(encoded.frames[0]), code('relay-frame')); + const future = await frame({ data: 'x'.repeat(6000) }, { scope: 'signal', createdAtMs: wall + RELAY_LIMITS.futureSkew + 1 }); + await assert.rejects(receiver.accept(future.frames[0]), code('relay-frame')); + receiver.dispose(); +}); + +test('active entry/declared byte caps and tombstone admission never evict another message', async () => { + const encoded = await frame({ data: 'x'.repeat(6000) }); + const receiver = assembler(); + for (let index = 0; index < RELAY_LIMITS.entries; index++) { + await receiver.accept(alter(encoded.frames[0], { s: index.toString(16).padStart(32, '0') })); + } + await assert.rejects(receiver.accept(alter(encoded.frames[0], { s: 'e'.repeat(32) })), code('relay-reassembly-capacity')); + assert.equal(receiver.state.entries, RELAY_LIMITS.entries); + receiver.dispose(); + const big = assembler(); + const header = { b: RELAY_LIMITS.messageBytes, n: Math.ceil(RELAY_LIMITS.messageBytes / RELAY_LIMITS.chunkBytes) }; + for (let index = 0; index < RELAY_LIMITS.retainedBytes / RELAY_LIMITS.messageBytes; index++) { + await big.accept(alter(encoded.frames[0], { ...header, s: index.toString(16).padStart(32, '0') })); + } + await assert.rejects(big.accept(alter(encoded.frames[0], { ...header, s: 'e'.repeat(32) })), code('relay-reassembly-capacity')); + assert.equal(big.state.retainedBytes, RELAY_LIMITS.retainedBytes); + big.dispose(); + const small = await frame({ data: 'one' }), tombstones = assembler(); + for (let index = 0; index < RELAY_LIMITS.tombstones; index++) { + assert.ok(await tombstones.accept(alter(small.frames[0], { s: index.toString(16).padStart(32, '0') }))); + } + await assert.rejects(tombstones.accept(alter(small.frames[0], { s: 'e'.repeat(32) })), code('relay-reassembly-capacity')); + assert.equal(tombstones.state.tombstones, RELAY_LIMITS.tombstones); + tombstones.dispose(); +}); + +test('pending verification cannot deliver after disposal or consent withdrawal', async t => { + const encoded = await frame({ data: 'one' }); + let consent = true; + const receiver = assembler({ consentCurrent: () => consent }); + await receiver.channel; + const gate = deferred(), entered = deferred(), original = crypto.subtle.digest.bind(crypto.subtle); + t.mock.method(crypto.subtle, 'digest', async (...args) => { entered.resolve(); await gate.promise; return original(...args); }); + const pending = receiver.accept(encoded.frames[0]); + await entered.promise; consent = false; receiver.dispose(); gate.resolve(); + assert.equal(await pending, null); + assert.equal(receiver.state.retainedBytes, 0); +}); + +test('complete untrusted bytes are not deliverable JSON with duplicate keys or invalid UTF8', async () => { + for (const bytes of [new TextEncoder().encode('{"from":"a","from":"b"}'), Uint8Array.from([0xff])]) { + const normal = await frame({ data: 'one' }); + const raw = alter(normal.frames[0], { m: await sha256Bytes(bytes, 'relay-message'), b: bytes.length, n: 1, i: 0, x: encodeBase64Url(bytes) }); + const receiver = assembler(); + await assert.rejects(receiver.accept(raw)); + assert.equal(receiver.state.retainedBytes, 0); + receiver.dispose(); + } +}); + +test('2048 all-ff object survives cold ntfy cache recovery with no oversized provider POST', async t => { + const posts = []; + t.mock.method(globalThis, 'fetch', async (url, options) => { + if (options?.method === 'POST') { + const size = wireBytes(options.body); + // Model ntfy's documented long-body attachment conversion to catch regressions. + posts.push(size <= 4096 ? { event: 'message', message: options.body } : { event: 'message', message: 'attachment', attachment: { url: 'https://unused.invalid' } }); + return { ok: true, status: 200 }; + } + return new Response([...posts.slice().reverse(), posts[0]].map(item => JSON.stringify(item)).join('\n')); + }); + const sender = new WebRtcTransportNode({ peerId: 'writer', channelKey: 'mesh' }); + const receiver = new WebRtcTransportNode({ peerId: 'reader', channelKey: 'mesh' }); + t.after(() => { sender.close(); receiver.close(); }); + const writer = new LiveUorMeshDatabase({ transport: sender }); + const bytes = new Uint8Array(2048).fill(255); + const stored = await writer.put(bytes, { persistWarm: true, publicData: true }); + const { fragments } = await createObject(bytes); + const packet = writer._packet(stored, 0, fragments[0].bytes, { purpose: 'public-relay', holder: 'public-relay' }); + assert.ok(wireBytes({ ...packet, from: sender.peerId, tsMs: Date.now() }) > 4096); + assert.equal(stored.warmPublished, 2); assert.ok(posts.length >= 4); + assert.ok(posts.every(item => !item.attachment && wireBytes(item.message) <= 4096)); + await writer.clearLocal(); + const reader = new LiveUorMeshDatabase({ transport: receiver }); + assert.equal(await reader.syncFromNetwork('30m', { publicData: true }), 1); + assert.deepEqual(reader.get(stored.addressHex).bytes, bytes); + assert.equal(reader.get(stored.addressHex).entry.manifest.manifestDigest, stored.manifest.manifestDigest); +}); + +test('actual signal WebSocket path reassembles large SDP and ignores stale/wrong-channel packets', async t => { + const posts = [], received = []; + class Socket { close() {} } + globals(t, { WebSocket: Socket, BroadcastChannel: undefined }); + t.mock.method(globalThis, 'fetch', async (_, options) => { posts.push(options.body); return { ok: true, status: 200 }; }); + const sender = new WebRtcTransportNode({ peerId: 'sender', channelKey: 'mesh' }); + const receiver = new WebRtcTransportNode({ peerId: 'receiver', channelKey: 'mesh' }); + t.after(() => { sender.close(); receiver.close(); }); + receiver.connect(); receiver.handleSignal = async msg => { received.push(normalize(msg)); }; + const payload = { kind: 'offer', to: (await receiver.signaling.identity()).id, targetSession: receiver.signaling.session, sdp: { type: 'offer', sdp: 'v=0\r\n'.repeat(2500) } }; + assert.equal(sender.sendSignal(payload), true); await drain(sender); + assert.ok(posts.length > 1 && posts.every(raw => wireBytes(raw) <= 4096)); + for (const raw of [...posts.slice().reverse(), ...posts]) await receiver.ws.onmessage({ data: JSON.stringify({ event: 'message', message: raw }) }); + assert.equal(received.length, 1); assert.deepEqual(received[0].payload.sdp, payload.sdp); + const oldSocket = receiver.ws; + receiver.connect('different'); + for (const raw of posts) { + await oldSocket.onmessage({ data: JSON.stringify({ event: 'message', message: raw }) }); + await receiver.ws.onmessage({ data: JSON.stringify({ event: 'message', message: raw }) }); + } + assert.equal(received.length, 1); +}); + +test('warm direct boundary requires explicit opt-in, and failed batches retain exact framed charges', async t => { + const posts = [], events = []; + t.mock.method(globalThis, 'fetch', async (_, options) => { posts.push(options.body); return { ok: false, status: 429 }; }); + const admission = policy(), node = new WebRtcTransportNode({ peerId: 'writer', admission, onEvent: event => events.push(event) }); + t.after(() => node.close()); + assert.equal(await node.publishWarmEnvelope({ data: 'private' }), false); + assert.deepEqual(await node.fetchWarmEnvelopes(), []); + assert.equal(posts.length, 0); assert.equal(admission.state.spent.requests, 0); + assert.equal(await node.publishWarmEnvelope({ data: 'x'.repeat(6000) }, { publicData: true }), false); + const outcome = events.find(event => event.type === 'relay_publish_result'); + assert.equal(outcome.outcome, 'refused'); assert.equal(outcome.httpStatus, 429); + assert.equal(outcome.attempted, 1); assert.ok(outcome.planned > 1); assert.equal(outcome.acknowledged, 0); + assert.equal(admission.state.spent.requests, outcome.planned); + const first = JSON.parse(posts[0]); + const expected = await frameRelayMessage(snapshotRelayMessage({ data: 'x'.repeat(6000), from: node.peerId, tsMs: first.t }), { + channelKey: node.channelKey, session: first.s, scope: 'warm', createdAtMs: first.t }); + assert.equal(admission.state.spent.transferBytes, expected.bytes); +}); + +test('consent withdrawal stops a partly published batch before another external effect', async t => { + let consent = true; + const gate = deferred(), entered = deferred(), posts = [], events = []; + t.mock.method(globalThis, 'fetch', async (_, options) => { posts.push(options.body); entered.resolve(); await gate.promise; return { ok: true, status: 200 }; }); + const node = new WebRtcTransportNode({ peerId: 'writer', onEvent: event => events.push(event) }); + t.after(() => node.close()); + const work = node.publishWarmEnvelope({ data: 'x'.repeat(6000) }, { publicData: true, consentCurrent: () => consent }); + await entered.promise; consent = false; gate.resolve(); + assert.equal(await work, false); assert.equal(posts.length, 1); + const outcome = events.find(event => event.type === 'relay_publish_result'); + assert.equal(outcome.outcome, 'partial'); assert.equal(outcome.acknowledged, 1); + assert.equal(node.admission.state.spent.requests, outcome.planned); +}); + +test('generation change before async digest dispatch sends no frames and spends no batch budget', async t => { + const posts = [], gate = deferred(), entered = deferred(), original = crypto.subtle.digest.bind(crypto.subtle); + t.mock.method(crypto.subtle, 'digest', async (...args) => { entered.resolve(); await gate.promise; return original(...args); }); + t.mock.method(globalThis, 'fetch', async (_, options) => { posts.push(options.body); return { ok: true, status: 200 }; }); + const node = new WebRtcTransportNode({ peerId: 'writer' }); + assert.equal(node.sendSignal({ kind: 'offer', sdp: { sdp: 'x'.repeat(6000) } }), true); + const work = drain(node); await entered.promise; + node.close(); gate.resolve(); await work; + assert.equal(posts.length, 0); assert.equal(node.admission.state.spent.requests, 0); assert.equal(node.relayPending.size, 0); +}); + +test('in-flight outbound work is bounded before asynchronous framing allocates more work', async t => { + const gate = deferred(), original = crypto.subtle.digest.bind(crypto.subtle); + t.mock.method(crypto.subtle, 'digest', async (...args) => { await gate.promise; return original(...args); }); + t.mock.method(globalThis, 'fetch', async () => ({ ok: true, status: 200 })); + const node = new WebRtcTransportNode({ peerId: 'writer' }); + for (let index = 0; index < RELAY_LIMITS.entries; index++) assert.equal(node.sendSignal({ kind: 'announce', index }), true); + assert.equal(node.sendSignal({ kind: 'announce', index: 999 }), false); + assert.equal(node.signalSigning.size, RELAY_LIMITS.entries); + node.close(); gate.resolve(); await drain(node); + assert.equal(node.relayPending.size, 0); +}); + +test('warm polling is single-flight, never follows attachments, drops incomplete data, and permits later complete recovery', async t => { + const gate = deferred(), entered = deferred(), encoded = await frame({ data: 'x'.repeat(6000) }, { createdAtMs: Date.now() }); + let calls = 0, complete = false; + t.mock.method(globalThis, 'fetch', async () => { + calls++; entered.resolve(); await gate.promise; + const frames = complete ? encoded.frames : encoded.frames.slice(0, 1); + return new Response([{ event: 'message', message: 'old attachment', attachment: { url: 'https://never.invalid' } }, + ...frames.map(message => ({ event: 'message', message }))].map(item => JSON.stringify(item)).join('\n')); + }); + const node = new WebRtcTransportNode({ peerId: 'reader', channelKey: 'mesh' }); + t.after(() => node.close()); + const work = node.fetchWarmEnvelopes('30m', { publicData: true }); await entered.promise; + assert.deepEqual(await node.fetchWarmEnvelopes('30m', { publicData: true }), []); + assert.equal(calls, 1); gate.resolve(); assert.deepEqual(await work, []); + complete = true; + const recovered = await node.fetchWarmEnvelopes('30m', { publicData: true }); + assert.equal(recovered.length, 1); assert.equal(recovered[0].data, 'x'.repeat(6000)); assert.equal(calls, 2); +}); + +test('expired/disposed verifications retain their bytes and shared admission until stalled digests settle', async t => { + let monotonic = 0; + const pool = new Map(); + const overhead = wireBytes({ from: 'remote', data: '' }); + const encoded = await frame({ data: 'x'.repeat(RELAY_LIMITS.messageBytes - overhead) }); + const receiver = assembler({ clock: () => monotonic, verificationPool: pool }); + const next = assembler({ clock: () => monotonic, verificationPool: pool }); + await Promise.all([receiver.channel, next.channel]); + const gate = deferred(), original = crypto.subtle.digest.bind(crypto.subtle); + t.mock.method(crypto.subtle, 'digest', async (...args) => { await gate.promise; return original(...args); }); + const pending = []; + for (let index = 0; index < RELAY_LIMITS.retainedBytes / RELAY_LIMITS.messageBytes; index++) { + const s = index.toString(16).padStart(32, '0'); + for (let chunk = 0; chunk < encoded.frames.length - 1; chunk++) await receiver.accept(alter(encoded.frames[chunk], { s })); + pending.push(receiver.accept(alter(encoded.frames.at(-1), { s }))); + // Reach the actual SHA await before admitting another complete message. + await new Promise(resolve => setImmediate(resolve)); + } + assert.equal(pool.size, 4); assert.equal(receiver.state.retainedBytes, RELAY_LIMITS.retainedBytes); + monotonic = RELAY_LIMITS.assemblyAge; + assert.equal(receiver.state.retainedBytes, RELAY_LIMITS.retainedBytes); + receiver.dispose(); + assert.equal(receiver.state.retainedBytes, RELAY_LIMITS.retainedBytes); + await assert.rejects(next.accept(alter(encoded.frames[0], { s: 'f'.repeat(32) })), code('relay-reassembly-capacity')); + gate.resolve(); + assert.deepEqual(await Promise.all(pending), [null, null, null, null]); + assert.equal(pool.size, 0); assert.equal(receiver.state.retainedBytes, 0); + assert.equal(await next.accept(alter(encoded.frames[0], { s: 'f'.repeat(32) })), null); + next.dispose(); +}); + +test('entire128KiB live object range survives framed relay without a contrived2048-byte cap', async t => { + const posts = []; + t.mock.method(globalThis, 'fetch', async (url, options) => { + if (options?.method === 'POST') { + const size = wireBytes(options.body); + // Model ntfy's documented long-body attachment conversion to catch regressions. + posts.push(size <= 4096 ? { event: 'message', message: options.body } : { event: 'message', message: 'attachment', attachment: { url: 'https://unused.invalid' } }); + return { ok: true, status: 200 }; + } + return new Response([...posts.slice().reverse(), posts[0]].map(item => JSON.stringify(item)).join('\n')); + }); + const sender = new WebRtcTransportNode({ peerId: 'writer', channelKey: 'mesh' }); + const receiver = new WebRtcTransportNode({ peerId: 'reader', channelKey: 'mesh' }); + t.after(() => { sender.close(); receiver.close(); }); + const writer = new LiveUorMeshDatabase({ transport: sender }); + const bytes = new Uint8Array(128 * 1024).fill(255); + const stored = await writer.put(bytes, { persistWarm: true, publicData: true }); + const { fragments } = await createObject(bytes); + const packet = writer._packet(stored, 0, fragments[0].bytes, { purpose: 'public-relay', holder: 'public-relay' }); + assert.ok(wireBytes({ ...packet, from: sender.peerId, tsMs: Date.now() }) > 4096); + assert.equal(stored.warmPublished, 2); assert.ok(posts.length >= 4); + assert.ok(posts.every(item => !item.attachment && wireBytes(item.message) <= 4096)); + await writer.clearLocal(); + const reader = new LiveUorMeshDatabase({ transport: receiver }); + assert.equal(await reader.syncFromNetwork('30m', { publicData: true }), 1); + assert.deepEqual(reader.get(stored.addressHex).bytes, bytes); + assert.equal(reader.get(stored.addressHex).entry.manifest.manifestDigest, stored.manifest.manifestDigest); +}); diff --git a/tests/run_all.js b/tests/run_all.js index 61ac78b..19aee7b 100644 --- a/tests/run_all.js +++ b/tests/run_all.js @@ -4,6 +4,7 @@ */ import assert from 'node:assert/strict'; +import { createCheckpoint, demoProgram } from '../src/layer4-compute/replay.js'; import { Datum, @@ -184,7 +185,7 @@ import { // Claim C2 & Objective O2: Cloudflare SRV/TXT writer + staleness measurement against TTL const cfCalls = []; let dohPolls = 0; - const mockDoh = new DohResolver({ + const mockDoh = new DohResolver({ format: "json", fetchImpl: async (url, opts) => { if (url.includes('api.cloudflare.com')) { cfCalls.push({ url, method: opts.method, body: JSON.parse(opts.body) }); @@ -200,7 +201,7 @@ import { ok: true, json: async () => ({ Status: 0, - Answer: [{ TTL: 30, data: `10 20 443 ${targetHost}` }] + Answer: [{ name: 'e1._stitch._udp.example.net.', type: 33, TTL: 30, data: `10 20 443 ${targetHost}` }] }) }; } @@ -238,13 +239,14 @@ import { network_pair_class: 'home<->mobile', success: i < 24, // 24/30 = 80% >= 60% used_turn: false, - ice_setup_sec: 1.8 + ice_setup_sec: 1.8, heartbeats_passed: i < 24 ? 10 : 2, qualification_elapsed_sec: 9, + ordered_channel: true, selected_path_observed: true }); } const c1Summary = logger.summarizeC1('home<->mobile'); assert.equal(c1Summary.trials, 30); assert.equal(c1Summary.direct_success_rate, 0.8); - assert.equal(c1Summary.c1_status, 'VERIFIED'); + assert.equal(c1Summary.c1_status, 'THRESHOLDS_MET'); assert.equal(logger.toJsonl().trim().split('\n').length, 30); } @@ -309,48 +311,32 @@ import { netA.handlers.push((from, msg) => dbA.handleMeshMessage(from, msg)); netB.handlers.push((from, msg) => dbB.handleMeshMessage(from, msg)); - const written = await dbA.put('state-across-zero-peer-gap', { label: 'kernel_state.txt', persistWarm: true }); - assert.equal(dbB.get(written.addressHex).ok, true); - assert.equal(dbB.get(written.addressHex).text, 'state-across-zero-peer-gap'); - assert.equal(mountedInVmB.length, 1); + const written = await dbA.put('state-across-zero-peer-gap', { label: 'kernel_state.txt', persistWarm: true, publicData: true }); + await new Promise(r => setTimeout(r, 20)); + assert.equal(dbB.get(written.addressHex).ok, false); // Only one assigned fragment, never fake full replication. + assert.equal(mountedInVmB.length, 0); // Destroy BOTH Peer A and Peer B (0 live peers online), then spawn Peer C and recover from warm buffer dbA.objects.clear(); dbB.objects.clear(); const netC = createWiredNode('node-C'); const dbC = new LiveUorMeshDatabase({ transport: netC }); - const recoveredCount = await dbC.syncFromNetwork(); + const recoveredCount = await dbC.syncFromNetwork('30m', { publicData: true }); assert.equal(recoveredCount, 1); assert.equal(dbC.get(written.addressHex).text, 'state-across-zero-peer-gap'); // 2. Peer A starts a 9-step compute job, crashes at step 3 (after checkpointing to warm bus), // and Peer C takes over from step 3, finishes steps 3..9, and verifies the 9-step UOR Trace! - const coordC = new LiveDistributedComputeCoordinator({ transport: netC, liveDb: dbC }); - // Simulate Peer A publishing checkpoint at step 3 before dying - const seed = Datum.w64(104729n); - const partial = executeProgramSlice({ - initialDatum: seed, - program: [ - { op: PrimitiveOp.ADD, arg: Datum.w64(257n) }, - { op: PrimitiveOp.XOR, arg: Datum.w64(0x9e3779b97f4a7c15n) }, - { op: PrimitiveOp.SUCC } - ] - }); - await netA.publishWarmEnvelope({ - type: 'compute_ckpt', - jobId: 'job-crash-test', - totalSteps: 9, - stepIndex: 3, - currentValueHex: '0x' + partial.datum.value.toString(16), - events: partial.events.map(e => ({ stepIndex: e.stepIndex, op: e.op, targetHex: e.target.toHex() })), - ownerPeerId: 'node-A-dead', - status: 'running' - }); + const coordC = new LiveDistributedComputeCoordinator({ transport: netC, liveDb: dbC, allowPublicRelay: true }); + // A canonical checkpoint identifies the complete program and input; replay checks its state. + const program = demoProgram(9); + await netA.publishWarmEnvelope({ type: 'compute_ckpt', jobId: 'job-crash-test', program, + checkpoint: await createCheckpoint(program, 3), ownerPeerId: 'node-A-dead' }); const resumedIds = await coordC.syncAndTakeOverJobs(); assert.deepEqual(resumedIds, ['job-crash-test']); // Wait for zero-delay takeover completion - await new Promise(r => setTimeout(r, 3000)); + await coordC.running.get('job-crash-test'); const completedJob = coordC.jobs.get('job-crash-test'); assert.equal(completedJob.status, 'completed'); assert.equal(completedJob.stepIndex, 9); diff --git a/tests/runtime-admission.test.js b/tests/runtime-admission.test.js new file mode 100644 index 0000000..6065f31 --- /dev/null +++ b/tests/runtime-admission.test.js @@ -0,0 +1,842 @@ +import { filesystemFixture } from './helpers/vm-filesystem.js'; +import { SyntheticAuthorityStore } from './helpers/transactional-authority.js'; +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import { installAuthorityControls } from '../src/authority-ui.js'; +import { installRecoveryControls } from '../src/recovery-ui.js'; +import { exportRecoveryBundle, recoveryObject } from '../src/recovery.js'; +import { createOperatorExperience, integrityLabel, executionLabel } from '../src/product-experience.js'; +import { placementStatus } from '../src/layer3-storage/custody.js'; +import { parseCanonicalJson } from '../src/layer1-uor/custody.js'; +import { ResourceAdmission, wireBytes, reserveNetwork } from '../src/layer2-schedulers/policy.js'; +import { generateAuthority, signPointer, PointerObserver, PointerPublisher, pointerDnsText, parsePointerDnsText } from '../src/layer1-uor/pointer.js'; +import { LiveUorMeshDatabase } from '../src/layer3-storage/index.js'; +import { LinuxVmNode, LiveDistributedComputeCoordinator } from '../src/layer4-compute/index.js'; +import { createCheckpoint, demoProgram, replayProgram } from '../src/layer4-compute/replay.js'; +import { DohResolver, WebRtcTransportNode, readBoundedText } from '../src/layer5-transport/index.js'; +import { BudgetPacedSurvivalScheduler } from '../src/layer2-schedulers/index.js'; +const code = expected => error => error.code === expected; +const limits = overrides => ({ requests: 100, transferBytes: 10000000, storageBytes: 100000, computeSteps: 10000, ...overrides }); +const admission = overrides => new ResourceAdmission({ clock: () => 0, durationMs: 100, limit: limits(overrides) }); +const transport = () => ({ peerId: 'local', sent: [], openPeers: () => [{ remoteId: 'remote' }], + sendToPeer(_, packet) { this.sent.push(packet); return true; }, + broadcast(packet) { this.sent.push(packet); return 1; }, + async publishWarmEnvelope(packet) { this.sent.push(packet); return true; }, + async fetchWarmEnvelopes() { return []; } }); + +test('effect admission reserves before work, keeps unknown charges, and never resets its epoch', () => { + let now = 5; + const policy = new ResourceAdmission({ clock: () => now, durationMs: 10, limit: limits({ requests: 1 }) }); + let effects = 0; + assert.throws(() => policy.run('place', { requests: 1 }, () => { effects++; throw Error('ambiguous'); }), /ambiguous/); + assert.equal(policy.state.spent.requests, 1); + assert.throws(() => policy.run('repair', { requests: 1 }, () => effects++), code('budget-exhausted')); + const exposed = policy.state; exposed.spent.requests = 0; exposed.limit.requests = 100; + assert.equal(policy.state.spent.requests, 1); + now = 4; + assert.throws(() => policy.reserve('refresh'), code('clock-regression')); + now = 15; + assert.throws(() => policy.reserve('refresh'), code('epoch-expired')); + assert.equal(effects, 1); +}); + +test('live storage refuses cache and outbound effects before their budgets can be exceeded', async () => { + const t = transport(); + const noCache = new LiveUorMeshDatabase({ transport: t, admission: admission({ storageBytes: 0 }) }); + await assert.rejects(noCache.put('secret'), code('budget-exhausted')); + assert.equal(noCache.objects.size, 0); assert.equal(t.sent.length, 0); + const noNetwork = new LiveUorMeshDatabase({ transport: t, admission: admission({ requests: 0 }) }); + await noNetwork.put('local only'); + assert.equal(t.sent.length, 0); + assert.equal(noNetwork.pendingTransfers.size, 0); + assert.equal([...noNetwork.placements.values()][0].requests[0].status, 'uncertain'); + await assert.rejects(noNetwork.syncFromNetwork(), code('budget-exhausted')); + assert.equal(t.sent.length, 0); +}); + +test('local wipe is ordered after pending writes, clears pending bytes, and cannot refund spent policy', async () => { + const t = transport(), policy = admission(); + const db = new LiveUorMeshDatabase({ transport: t, admission: policy }); + const original = new TextEncoder().encode('snapshot before queue'); + const work = db.put(original); original.fill(0); + const entry = await work; + assert.equal(db.get(entry.addressHex).text, 'snapshot before queue'); + const spent = policy.state.spent; + const second = db.put('queued second'); + await db.clearLocal(); await second; + assert.equal(db.objects.size, 0); assert.equal(db.placements.size, 0); assert.equal(db.pendingTransfers.size, 0); + assert.ok(policy.state.spent.storageBytes >= spent.storageBytes); + assert.ok(policy.state.spent.requests >= spent.requests); +}); + +test('live compute reserves every replay, and refusal prevents publishing or storing a claimed result', async () => { + const t = transport(), policy = admission({ computeSteps: 0 }); + let writes = 0; + const coordinator = new LiveDistributedComputeCoordinator({ transport: t, admission: policy, + liveDb: { put: async () => { writes++; return { addressHex: 'x' }; } } }); + const program = demoProgram(3), checkpoint = await createCheckpoint(program, 1); + assert.equal(await coordinator.ingestCheckpoint({ type: 'compute_ckpt', jobId: 'j', program, checkpoint, ownerPeerId: 'remote' }), false); + assert.equal(coordinator.jobs.size, 0); + await assert.rejects(coordinator.startOrResumeJob({ jobId: 'j', totalSteps: 3, stepDelayMs: 0 }), code('budget-exhausted')); + assert.equal(t.sent.length, 0); assert.equal(writes, 0); + assert.throws(() => replayProgram(program, 3, admission({ computeSteps: 2 })), code('budget-exhausted')); + const full = admission(); + replayProgram(program, 3, full); + assert.equal(full.state.spent.computeSteps, 3); +}); + +test('real WebRTC and DNS adapters share request/UTF-8 limits, including failed sends', async () => { + const policy = admission({ requests: 1, transferBytes: 1000 }); + const events = []; + const node = new WebRtcTransportNode({ peerId: 'p', admission: policy, onEvent: e => events.push(e) }); + let sends = 0, fetches = 0; + node.peers.set('r', { dc: { readyState: 'open', send: () => { sends++; throw Error('uncertain'); }, close() { this.readyState = 'closed'; } } }); + const packet = { type: 'data', value: '☃' }; + assert.equal(node.sendToPeer('r', packet), true, 'accepted queue reports the unknown browser send outcome separately'); + assert.ok(events.some(e => e.type === 'channel_send_result' && e.outcome === 'unknown')); + assert.equal(node.sendToPeer('r', packet), false, 'poisoned channel is not replayed'); + assert.equal(policy.state.spent.transferBytes, wireBytes(packet)); + assert.equal(policy.state.spent.requests, 1); + node.peers.set('r', { dc: { readyState: 'open', send: () => { sends++; }, close() { this.readyState = 'closed'; } } }); + assert.throws(() => node.sendToPeer('r', packet), code('budget-exhausted')); + node.close(); + const dns = new DohResolver({ admission: policy, fetchImpl: async () => { fetches++; return new Response('{}'); } }); + await assert.rejects(dns.resolve('example.test'), code('budget-exhausted')); + await assert.rejects(dns.writeCloudflareRecord({ zoneId: 'z', apiToken: 't', name: 'example.test' }), code('budget-exhausted')); + assert.equal(sends, 1); assert.equal(fetches, 0); +}); + +test('response readers cancel oversized streaming bodies and relay failure keeps its charge', async () => { + let cancelled = false; + const body = new ReadableStream({ start(c) { c.enqueue(new Uint8Array(20)); }, cancel() { cancelled = true; } }); + await assert.rejects(readBoundedText(new Response(body), 10), code('response-limit')); + assert.equal(cancelled, true); + const savedFetch = globalThis.fetch; + let fetches = 0; + try { + globalThis.fetch = async () => { fetches++; throw Error('uncertain'); }; + const policy = admission({ requests: 1 }); + const node = new WebRtcTransportNode({ peerId: 'p', admission: policy }); + assert.equal(await node.publishWarmEnvelope({ type: 'test' }, { publicData: true }), false); + assert.equal(await node.publishWarmEnvelope({ type: 'test' }, { publicData: true }), false); + assert.equal(fetches, 1); assert.equal(policy.state.spent.requests, 1); + } finally { globalThis.fetch = savedFetch; } +}); + +test('warm compute recovery accepts only bounded delivery metadata without treating it as authority', async () => { + const program = demoProgram(5), checkpoint = await createCheckpoint(program, 3); + const packet = { type: 'compute_ckpt', jobId: 'j', program, checkpoint, ownerPeerId: 'remote', from: 'delivery-peer', tsMs: 10 }; + const t = transport(); t.fetchWarmEnvelopes = async () => [packet]; + const c = new LiveDistributedComputeCoordinator({ transport: t, admission: admission(), allowPublicRelay: true, + liveDb: { put: async () => ({ addressHex: 'x' }) } }); + assert.deepEqual(await c.syncAndTakeOverJobs(), []); + assert.equal(c.jobs.get('j').stepIndex, 3); + assert.equal(c.jobs.get('j').ownerPeerId, 'remote'); + const bad = new LiveDistributedComputeCoordinator({ transport: { ...t, fetchWarmEnvelopes: async () => [{ ...packet, injected: true }] }, + admission: admission(), allowPublicRelay: true, liveDb: {} }); + assert.deepEqual(await bad.syncAndTakeOverJobs(), []); + assert.equal(bad.jobs.size, 0); +}); + +test('retained pointer heads serialize forks, reject foreign pins, and preserve complete multipart DNS roots', async () => { + const authority = await generateAuthority(); + const make = (revision, previousDigest) => signPointer({ version: 1, name: 'state.example.test', authorityKey: authority.publicKey, + revision, previousDigest, objectRoot: 'sha256:' + 'f'.repeat(64), validFromMs: 0, validUntilMs: 100 }, authority.privateKey); + const observer = new PointerObserver({ name: 'state.example.test', trustedAuthorityKey: authority.publicKey, clock: () => 5, admission: admission() }); + const first = await make(0, null); + assert.deepEqual(parsePointerDnsText(pointerDnsText(first)), first); + assert.ok(pointerDnsText(first).length > 255); + await observer.admit(first); + const next = await make(1, first.pointerDigest); + const outcomes = await Promise.allSettled([observer.admit(next), observer.admit(next)]); + assert.equal(outcomes.filter(x => x.status === 'fulfilled').length, 1); + assert.equal(observer.head.revision, 1); + const snapshot = observer.head; snapshot.revision = 0; + assert.equal(observer.head.revision, 1); + await assert.rejects(observer.admit(first), code('pointer-conflict')); + const attacker = await generateAuthority(); + const foreign = new PointerObserver({ name: 'state.example.test', trustedAuthorityKey: attacker.publicKey, clock: () => 5 }); + await assert.rejects(foreign.admit(first), code('wrong-authority')); + const noCache = new PointerObserver({ name: 'state.example.test', trustedAuthorityKey: authority.publicKey, clock: () => 5, + admission: admission({ storageBytes: 0 }) }); + await assert.rejects(noCache.admit(first), code('budget-exhausted')); + assert.equal(noCache.head, null); +}); + +async function browserHarness({ AdmissionClass = ResourceAdmission, AuthorityClass = SyntheticAuthorityStore, VmClass = null, publicationMode = 'success' } = {}) { + const html = await readFile(new URL('../index.html', import.meta.url), 'utf8'); + const script = html.match(/