Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7c07b9b
Develop Stitch Prism model and enforce typed runtime contracts
afflom Nov 10, 2026
4eb61c5
Correct source entrypoint order and retain pinned compiler diagnostics
afflom Nov 10, 2026
c93a3cf
Verify baseline Prism model and resource invariants
afflom Nov 10, 2026
4b41402
Bind complete source model, contextual journeys and protocol boundaries
afflom Nov 10, 2026
78a984e
Implement verified recovery and bounded channel and guest operations
afflom Nov 10, 2026
9c2c36f
Persist browser authority and reconcile publication across restarts
afflom Nov 10, 2026
bcc6e26
Complete typed primitive replay and contextual operator recovery
afflom Nov 10, 2026
53c5a60
Restore trusted live observer anchors and package pinned SeaBIOS source
afflom Nov 10, 2026
d17aa7f
Complete operational controls and add native browser and source-compl…
afflom Nov 10, 2026
3e6858e
Fix native DataChannel pairing and align browser lifecycle qualification
afflom Nov 10, 2026
2f1fde8
Prove VM guest bridge readiness before accepting serialized shell com…
afflom Nov 10, 2026
fcb07fa
Complete live placement repair, authenticated job ownership and retir…
afflom Nov 10, 2026
cbf751b
Bind retained source proof to actual inputs for cheap evidence reuse
afflom Nov 10, 2026
5b57e88
Qualify preserved guest in production Chromium VM and Ethernet paths
afflom Nov 10, 2026
0311f35
Retain qualified guest probe and compact corresponding-source evidenc…
afflom Nov 10, 2026
723df67
Qualify final guest runtime with explicit addresses and compatible VG…
afflom Nov 10, 2026
04db21d
Complete explicit static guest networking and retain actual kernel proof
afflom Nov 10, 2026
039d300
Qualify natural guest neighbor recovery after explicit Ethernet consent
afflom Nov 10, 2026
d4280af
Qualify truthful VM termination states and contextual network controls
afflom Nov 10, 2026
d998432
Verify settled VM configuration controls unlock after confirmed destr…
afflom Nov 10, 2026
528f1c0
Complete truthful operator lifecycle, contextual controls and matchin…
afflom Nov 10, 2026
407c0fe
Record final guest source and real Chromium qualification evidence
afflom Nov 10, 2026
6f7e4d4
Adopt source-backed Linux guest with actual proof and permanent Ether…
afflom Nov 10, 2026
0b0639d
Qualify complete integrated host using unchanged production runtime a…
afflom Nov 10, 2026
8508a84
Record exact integrated host and guest qualification evidence
afflom Nov 10, 2026
bcad55a
Preserve actual narrow fixture regeneration and provenance for native…
afflom Nov 11, 2026
fa5b2d0
Retain genuine source evidence with reproducible validated summaries
afflom Nov 11, 2026
4988ca4
Reconcile complete Stitch implementation for fork-only upstream quali…
afflom Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions .github/workflows/guest-browser-qualification.yml
Original file line number Diff line number Diff line change
@@ -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
94 changes: 94 additions & 0 deletions .github/workflows/guest-candidate.yml
Original file line number Diff line number Diff line change
@@ -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
109 changes: 109 additions & 0 deletions .github/workflows/prism.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/target
/node_modules
*.log

node_modules/
app/.lexlean/
app/.prism/
app/.lake/
verification-output/
72 changes: 57 additions & 15 deletions CONTRACT.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
{
"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.",
"failed_connect": "A browser-to-browser connection attempt that fails to open an ordered WebRTC DataChannel and complete 10 consecutive heartbeats within 10.0 seconds."
},
"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,
Expand All @@ -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"
}
}
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading
Loading