Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,22 @@ jobs:
python -m pytest tests/test_wasmer_parity.py -q
test -f test-results/wasmer-parity/parity.json

# Mobile Wasmer device matrix: explicit NOT_RUN (no device farm in CI).
# Desktop packaged shell + browser headless covered elsewhere (wasmer-browser.yml / desktop/).
# Mobile hosts: sources + status file. Runtime grade is iOS PARTIAL / Android
# NOT_RUN until an emulator or device log exists (see wasmer-mobile.yml).
mobile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Assert mobile NOT_RUN docs present
- name: Assert mobile host trees and status ADR
run: |
set -euo pipefail
test -f wasmer/mobile/NOT_RUN.md
test -f wasmer/mobile/shared/host.js
test -d wasmer/mobile/ios/Sources
test -d wasmer/mobile/android/app/src/main/java
test -f wasmer/desktop/run-decide.sh
echo "mobile Wasmer target: NOT_RUN — see wasmer/mobile/NOT_RUN.md"
echo "Desktop shell: wasmer/desktop/run-decide.sh (packaged beyond raw wasm bytes)"
echo "status ADR: wasmer/mobile/NOT_RUN.md"
echo "iOS simulator / Android emulator: workflow wasmer-mobile.yml"
echo "Desktop shell: wasmer/desktop/run-decide.sh"
echo "Browser headless: workflow wasmer-browser.yml"

92 changes: 92 additions & 0 deletions .github/workflows/wasmer-mobile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Wasmer mobile hosts

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
glue-and-android-sources:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Size budget + shared glue
run: |
set -euo pipefail
python scripts/wasmer_size_budget.py
chmod +x wasmer/mobile/sync-assets.sh
./wasmer/mobile/sync-assets.sh
node scripts/wasmer_mobile_glue_check.mjs
- name: Assert host trees
run: |
set -euo pipefail
test -f wasmer/mobile/NOT_RUN.md
test -d wasmer/mobile/ios/Sources
test -d wasmer/mobile/android/app/src/main/java
test -f wasmer/mobile/shared/host.js
- name: Android emulator (honest skip on ubuntu without device farm)
run: |
set +e
./wasmer/mobile/android/run-emulator.sh
RC=$?
set -e
if [ "$RC" -eq 0 ]; then
echo "[PASS] unexpected emulator success on ubuntu — keep evidence"
elif [ "$RC" -eq 2 ]; then
echo "[NOT_RUN] Android emulator not available on this runner (expected unless SDK is provisioned)"
else
echo "[FAIL] Android runner exit $RC"
exit "$RC"
fi
- name: Upload mobile glue evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: s-desktop-mobile-glue
path: |
test-results/s-desktop-mobile/mobile-glue-check.json
test-results/s-desktop-mobile/mobile-glue-check-*.log.txt
test-results/s-desktop-mobile/mobile-android.json
test-results/s-desktop-mobile/mobile-android-*.log.txt
if-no-files-found: warn

ios-simulator:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install xcodegen
run: brew install xcodegen
- name: iOS Simulator decide parity
run: |
set +e
chmod +x wasmer/mobile/ios/run-simulator.sh wasmer/mobile/sync-assets.sh
./wasmer/mobile/ios/run-simulator.sh
RC=$?
set -e
if [ "$RC" -eq 0 ]; then
echo "[PASS] iOS simulator"
elif [ "$RC" -eq 2 ]; then
echo "[NOT_RUN] iOS simulator unavailable on this runner — not faked"
else
echo "[FAIL] iOS simulator tests"
exit "$RC"
fi
- name: Upload iOS evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: s-desktop-mobile-ios
path: |
test-results/s-desktop-mobile/mobile-ios-simulator.json
test-results/s-desktop-mobile/mobile-ios-simulator-*.log.txt
if-no-files-found: warn
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,36 @@ build/
*.log
test-results/**/*.log.txt
!test-results/**/.gitkeep

# Wasmer package build output (reproducible from wasmer.toml; digest recorded
# in wasmer/artifacts/PACKAGE-DIGESTS.json)
*.webc
.DS_Store

# Rust / Wasmer crate
wasmer/crate/target/

# Track J browser smoke
wasmer/browser/node_modules/
# Copied from node_modules/@wasmer/sdk by wasmer/browser/vendor-sdk.mjs (postinstall)
wasmer/browser/vendor/

# Local Node microservices (agy-bridge, etc.)
node_modules/
services/**/node_modules/

# Mobile host build products and copied wasm (sync-assets.sh)
wasmer/mobile/shared/compass_core_bg.wasm
wasmer/mobile/shared/snapshot_min.json
wasmer/mobile/ios/Resources/*
!wasmer/mobile/ios/Resources/.gitkeep
wasmer/mobile/ios/DerivedData/
wasmer/mobile/ios/build/
wasmer/mobile/ios/*.xcuserdatad
wasmer/mobile/ios/**/xcuserdata/
wasmer/mobile/android/.gradle/
wasmer/mobile/android/app/build/
wasmer/mobile/android/build/
wasmer/mobile/android/local.properties
wasmer/mobile/android/app/src/main/assets/*
!wasmer/mobile/android/app/src/main/assets/.gitkeep
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Versioning follows [SemVer](https://semver.org/) as described in [`docs/RELEASE.

## [Unreleased]

- Wasmer mobile hosts — iOS WKWebView **PARTIAL** on Simulator (`compass_decide_json` parity vs Python); Android WebView tree **NOT_RUN** (no SDK). Evidence `test-results/s-desktop-mobile/mobile-*.json`.
- Docs consolidation — `docs/FRAMEWORK.md` is now the canonical framework document (ADR 0001–0007 stated as current, supersession ledger in Appendix B); `PROTOTYPE.md` demoted to historical origin brief; "Ground truth" pointers repointed.
- Schema single-source — `src/compass/schema/model-graph.v1.json` is canonical (the only copy in the sdist/wheel); `schema/` and `docs/schema/` are generated mirrors written by `scripts/sync_schema.py`; `tests/test_schema.py` fails on checksum drift. Evidence `test-results/p-consolidation/`.
- Track N — paid pillars test-ready: `compass.sync` (paid automate / free manual), `compass.fleet` stub (opt-in), `compass.serve.governance` hooks; evidence `test-results/n-paid-pillars/`.
- Phase 2 **test-ready stack exit** flipped 2026-09-05 (PT) — F–N evidence present; **not** production-ready / SLA.

Expand Down
3 changes: 2 additions & 1 deletion PLANS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# comPASS program plans

**Date:** 2026-09-07
**Ground truth:** [`/Users/rosario/work/comPASS/PROTOTYPE.md`](/Users/rosario/work/comPASS/PROTOTYPE.md)
**Ground truth:** [`docs/FRAMEWORK.md`](docs/FRAMEWORK.md) — canonical framework document
**Origin brief (historical):** [`PROTOTYPE.md`](PROTOTYPE.md) — 2026-09-03, superseded in part by ADR 0005/0006/0007
**Summary:** [`/Users/rosario/work/comPASS/SUMMARY/2026-09-03-comPASS-prototype-session.md`](/Users/rosario/work/comPASS/SUMMARY/2026-09-03-comPASS-prototype-session.md)
**Canonical compressor:** `git@github.com:soltrinox/comPREssOR.git` at [`/Users/rosario/work/comPREssOR`](/Users/rosario/work/comPREssOR) (engine 0.2.0, `main` @ `44460ba`, CC-1..CC-10)
**Public sibling:** [`https://github.com/soltrinox/comPASS`](https://github.com/soltrinox/comPASS) @ `16e22ec`
Expand Down
25 changes: 24 additions & 1 deletion PROTOTYPE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# comPASS — Capability-Routed Model Selection with Portable Session State

**Status:** Prototype specification (pre-implementation)
> **HISTORICAL — origin brief, 2026-09-03. Superseded in part; not the current architecture.**
>
> This document is the **provenance record** for comPASS: the original prototype specification, kept
> unedited in its body so the reasoning that produced the product remains readable. It is **no longer
> ground truth.**
>
> **Canonical document:** [`docs/FRAMEWORK.md`](docs/FRAMEWORK.md) — read that first.
>
> Superseded here, by Accepted ADRs:
>
> | Section | Superseded by |
> |---|---|
> | §9 three-plane **process layout** (Probe daemon sidecar, IDE hook, local proxy) — the plane *boundaries* still hold, the process topology does not | [ADR 0005](docs/adr/0005-eni6ma-gated-browser-agent.md) — browser-only Wasmer appliance |
> | §13.1 "advisory, inside Cursor" as Tier 2's primary enforcement surface | [ADR 0005](docs/adr/0005-eni6ma-gated-browser-agent.md) — no Cursor/IDE product path; [ADR 0006](docs/adr/0006-generic-llm-adapter.md) — the generic LLM adapter is the enforcement target |
> | §13.1 OpenAI-compatible proxy as three separate enforcement targets | [ADR 0006](docs/adr/0006-generic-llm-adapter.md) — one ingress, three selection modes |
> | Appendix A.1 open naming decision | [ADR 0001](docs/adr/0001-product-name.md) — **comPASS** / `compass-router`, accepted |
> | §17.1 working-copy disposition | [ADR 0002](docs/adr/0002-working-copy-disposition.md) / [ADR 0003](docs/adr/0003-archive-disposition.md) |
> | §12.4 reward attribution left open | [ADR 0004](docs/adr/0004-reward-attribution.md) — recording mechanism decided; credit assignment still **not** claimed solved |
>
> Product science (§4 capability curvature, §10 schema rationale, §12 statistical discipline, §16
> equivalence band) and the non-claims are **unchanged and still current**. The full conflict list is
> the supersession ledger in [`docs/FRAMEWORK.md`](docs/FRAMEWORK.md) Appendix B.

**Status:** Prototype specification (pre-implementation) — **historical**, see banner above
**Date:** 2026-09-03
**Working name:** `comPASS` (placeholder — see Appendix A)
**Sibling engine:** `comPREssOR` — `git@github.com:soltrinox/comPREssOR.git`, engine version `0.2.0`
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Contracts and architecture live under [`docs/`](docs/).

| Doc | Purpose |
| --- | --- |
| [`PROTOTYPE.md`](PROTOTYPE.md) | Ground-truth product prototype (§9–§17) |
| [`docs/FRAMEWORK.md`](docs/FRAMEWORK.md) | **Canonical framework** — start here; ADR 0001–0007 as current |
| [`PROTOTYPE.md`](PROTOTYPE.md) | Historical origin brief (2026-09-03); superseded in part |
| [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) | Three planes, four tiers, credential boundary |
| [`docs/API.md`](docs/API.md) | Route plane API, fail-open, advisory contract |
| [`docs/STACK.md`](docs/STACK.md) | Stack + Wasmer boundary (Track D contract) |
Expand Down
17 changes: 17 additions & 0 deletions SUMMARY/2026-09-07-b2-browser-sdk-boot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Session summary — B2 browser @wasmer/sdk boot (2026-09-07 PT)

**Branch:** `feat/consolidation-and-wasmer`
**Scope:** Plan todos `b2-csp`, `b2-sdk`, `b2-zonea`.
**Grade:** PARTIAL (local SDK + compass guest green; registry `compass/decide` NOT_RUN).

## What landed

- nginx CSP in `services/browser-client/nginx.conf`: `worker-src 'self' blob: 'wasm-unsafe-eval' 'unsafe-eval'`; `blob:` and `'unsafe-eval'` on `script-src`; `connect-src` adds `https://registry.wasmer.io` and `https://cdn.wasmer.io`. COOP/COEP unchanged.
- `@wasmer/sdk` **0.11.0** in `wasmer/browser/package.json`. Dynamic import of the `/browser` entry file (`vendor/@wasmer/sdk/dist/index.js`). Guard on `window.crossOriginIsolated`.
- Zone A: local `compass-decide` `.webc` + host `compass_decide_json`; pinned `python/python@=3.13.18` from the registry (stdout `zone-a-python-ok`).
- Fail-open: existing `sandbox.js` raw instantiate when the page is not isolated. Track J smoke stayed FULL.
- Evidence: `test-results/r-browser-sdk/`.

## NOT_RUN

Registry `compass/decide` — unpublished, not attempted.
33 changes: 33 additions & 0 deletions SUMMARY/2026-09-07-b3-desktop-reconcile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Session summary — B3 desktop reconcile (2026-09-07 PT)

**Branch:** `feat/consolidation-and-wasmer`
**Scope:** Plan todo `b3-desktop` only. Did not edit the plan file.
**Evidence:** [`test-results/s-desktop-mobile/`](../test-results/s-desktop-mobile/README.md) (desktop-only files; no mobile coverage)

## What changed

`wasmer/desktop/run-decide.sh` now runs in this order:

1. **Registry-by-name** — only if `COMPASS_WASMER_USE_REGISTRY=1` or `--registry`. Tries `wasmer run compass/decide@0.1.0`, logs an honest failure, falls through.
2. **Local `.webc` (default)** — `wasmer run --offline compass-decide-0.1.0.webc`, building with `wasmer package build` if missing.
3. **Air-gap wasm** — `wasmer/artifacts/compass-decide.wasm` with `--volume "$PWD/wasmer:/wasmer"`.

`scripts/wasmer_parity.py` still shells `wasmer run` on the loose artifact (Python vs wasm). Packaged-vs-loose is `scripts/wasmer_desktop_packaged.py` / `tests/test_wasmer_desktop_packaged.py`.

## Results

| Check | Result |
|---|---|
| Packaged vs loose envelopes (`fixture_min`, `snapshot_missing`) | IDENTICAL |
| Registry-by-name | PARTIAL — code complete, runtime NOT_RUN, not faked |
| Registry then fall through to webc | envelope still selects `urn:mg:model:cheap` |
| `scripts/wasmer_parity.py` | green |
| `scripts/wasmer_size_budget.py` | green |
| Targeted pytest (3 modules, 4 tests) | 4 passed |

## Left for later

- **B4 mobile** — `wasmer/mobile/NOT_RUN.md`; this stage wrote desktop-only files under `test-results/s-desktop-mobile/` on purpose.
- Human `wasmer login` + claim namespace `compass` + `wasmer publish .` before the registry hop can be graded FULL.
- Stale `wasmer.toml` path references in `docs/WASMER.md` and `docs/WASMER-DEPLOYMENT.md` — owned by the docs consolidation agent.
- Full pytest and the cross-cutting proof report — out of scope for B3.
39 changes: 39 additions & 0 deletions SUMMARY/2026-09-07-b4-mobile-hosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Session summary — B4 mobile hosts (2026-09-07 PT)

**Branch:** `feat/consolidation-and-wasmer`
**Scope:** Plan todo `b4-mobile` only. Did not edit the plan file.
**Grade:** **PARTIAL** (iOS Simulator). Android **NOT_RUN**. Not FULL (no physical-device log).

## Host code

| Path | Role |
|---|---|
| `wasmer/mobile/shared/host.js` | Digest check, empty-import instantiate, `compass_decide_json` |
| `wasmer/mobile/ios/` | WKWebView app + `run-simulator.sh` |
| `wasmer/mobile/android/` | System WebView app + `run-emulator.sh` |
| `scripts/validate-wasmer-mobile.sh` | Discoverable runner |

## Five steps (`NOT_RUN.md`)

1. Host pick: iOS WKWebView + Android WebView (same JS ABI as `sandbox.js`).
2. Trees added; wasm loaded by `SHA256SUMS` digest; keyless snapshot; `compass_decide_json`.
3. CI workflow `.github/workflows/wasmer-mobile.yml` (honest Android skip).
4. Status field flipped to PARTIAL; `docs/WASMER.md` matrix updated. Filename `NOT_RUN.md` retained for CI `test -f`.
5. Size budget green (103980 ≤ 150000); same hash as `SHA256SUMS`.

## Runtime

- **iOS Simulator:** iPhone 16 Pro / iOS 18.6 via `simctl` (Xcode 26.2 had no scheme simulator destinations). fixture_min → `urn:mg:model:cheap`; missing → `snapshot_missing`.
- **Android:** SDK absent — compile/emulator **NOT_RUN**.
- **Node glue:** same reason codes; not a device run.

## Evidence

`test-results/s-desktop-mobile/mobile-ios-simulator.json`, `mobile-android.json`, `mobile-glue-check.json`, `mobile-size-budget.json`. Desktop B3 files left in place.

## Human blockers

- Android SDK + licenses + API 34 emulator/device.
- iOS 26.2 Simulator runtime (for `xcodebuild -destination` tests).
- Development team / signing for a physical device (FULL).
- A connected iPad was ineligible (`iOS 26.2 is not installed` device support).
37 changes: 37 additions & 0 deletions SUMMARY/2026-09-07-consolidation-part-a-session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Session summary — consolidation Part A (2026-09-07 PT)

**Branch:** `feat/consolidation-and-wasmer` (stacked on `feat/docker-browser-challenge`)
**Scope:** Part A of the consolidation plan — `a1-framework`, `a2-demote`, `a3-schema`.
**Out of scope:** Part B (`wasmer/`, `services/`) — owned by a concurrent agent this session.
**Evidence:** [`test-results/p-consolidation/`](../test-results/p-consolidation/README.md)

## What changed

| Todo | Result |
|---|---|
| `a1-framework` | [`docs/FRAMEWORK.md`](../docs/FRAMEWORK.md) created — canonical framework document; ADR 0001–0007 stated as current; historical Phase 1–2 layout in Appendix A; supersession ledger in Appendix B |
| `a2-demote` | [`PROTOTYPE.md`](../PROTOTYPE.md) banner-demoted to historical origin brief with its body byte-intact; "Ground truth" repointed in `PLANS.md`, `docs/README.md`, `docs/CHARTER.md`; canonical pointers added to `docs/ARCHITECTURE.md`, `docs/STACK.md`, root `README.md` |
| `a3-schema` | `src/compass/schema/model-graph.v1.json` confirmed canonical and left in place; [`scripts/sync_schema.py`](../scripts/sync_schema.py) generates the two mirrors (`--check` for read-only drift); `tests/test_schema.py` gains a sha256 drift guard and a packaged-path guard |

## Decisions taken

**Canonical schema stays put.** Packaging evidence settled it: `src/compass/schema/model-graph.v1.json`
is the only copy inside the built sdist and wheel (via `[tool.setuptools.package-data]`), and
`loader.py` reads it at runtime. `MANIFEST.in` needed no change and nothing had to move.

**Byte-level guard, not semantic.** The pre-existing test compared parsed JSON, which a reformat
passes while the digests diverge. Proven with a negative control: the reformat failed the new
checksum test while the old semantic test still passed.

**Documentation drift resolved rather than annotated.** Two lines in `docs/CHARTER.md` (the Tier 2
row and non-claim 4) described in-IDE advisory as Tier 2's surface, contradicting ADR 0005 where
they stood. The mechanical fact was kept; the product claim now matches the ADR.

## Left undone, deliberately

- Part B Wasmer work — concurrent owner.
- Cross-cutting proof report and the full e2e validation suite — later dedicated pass.
- `tests/test_paid_sync.py::test_manual_compass_bundle_api_stays_free` fails in the sibling
comPREssOR engine's `bundle.py:117`. Pre-existing (reproduced with this branch's edits stashed)
and outside this repo's edit surface per ADR 0002/0003. Graded, not papered over.
- Absolute plan-registry paths elsewhere in `PLANS.md` — pre-existing, out of scope.
41 changes: 41 additions & 0 deletions SUMMARY/2026-09-07-push-consolidation-wasmer-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Session: push remotes and stacked PR

**Date:** 2026-09-07 PT (commits/registry UTC 2026-09-08)
**Repo:** `/Users/rosario/work/comPASS`
**Branch:** `feat/consolidation-and-wasmer` (stacked on `feat/docker-browser-challenge`)

## Remote

- `origin` fetch/push: `git@github.com:soltrinox/comPASS.git`
- GitHub: https://github.com/soltrinox/comPASS
- Verified existing repo `soltrinox/comPASS` (not invented; sibling compressor historically `soltrinox/comPREssOR`).

## Push

- `git push -u origin feat/consolidation-and-wasmer` — **success** (new upstream).
- HEAD: `08beb26` `test: log-backed proof for consolidation and Wasmer validation`
- No force-push. Hooks not skipped. `git config` not changed.

## Pull requests

| PR | Base | Head | State | URL |
|---|---|---|---|---|
| #2 | `main` | `feat/docker-browser-challenge` | OPEN | https://github.com/soltrinox/comPASS/pull/2 |
| #3 | `feat/docker-browser-challenge` | `feat/consolidation-and-wasmer` | OPEN | https://github.com/soltrinox/comPASS/pull/3 |

PR #3 base is **PR #2’s branch** because #2 is still open/unmerged. Diff is Part A (FRAMEWORK, demote PROTOTYPE, schema checksum) + Part B (wasmer.toml, hosts). Registry publish and Android are **NOT_RUN**.

Proof on branch: `test-results/PROOF-consolidation-wasmer-20260907.md`

## Not pushed / not committed

- `scripts/APPLY_HANDOFF.sh`
- `scripts/push_dockerignore.sh`
- `scripts/ship_challenge_pr.sh`
- `scripts/ship_handoff.sh`
- Dirty leftover: `test-results/h-session-polish/{README.md,evidence.json,session-harness.txt}`
- Untracked leftover: `test-results/s-desktop-mobile/mobile-ios-sim-pick.err.txt`, `test-results/t-validation/TS.txt`

## Registry

Updated `ENI6MA-REGISTRY/projects/infra/compass.md` changelog and `git_last_commit` to `08beb26`. Registry repo was **not** pushed (this session authorized comPASS only).
Loading