Skip to content

Commit c7f6d83

Browse files
docs+build: re-derive status from the code (λδ, bridge, CI, PWA) and fix the Justfile (#46)
## Why `TOPOLOGY.md` predated the three LambdaDelta merges (#35, #36, #43) and never mentioned λδ. Because it is *the* status source, every downstream doc inherited its stale figures — including the wiki landed in #45. This re-derives the countable facts from the tree and corrects the cascade, then fixes the Justfile gaps found along the way. ## TOPOLOGY was understating the project on six axes | Claim | Reality | |---|---| | λδ absent entirely | **Built, not planned** — reader, value model, evaluator + Budget sandbox, hygienic macros, multimethods, prelude, host seam. ~3,400 LOC excl. tests, **~64% of the core**, its largest subsystem. Now its own dashboard row | | "12 passing unit tests" | **90** (81 unit + 3 exchange + 2 golden + 2 property + 2 doc) | | WASM bridge "40%, in progress" | **Wired and exercised** — `Main.res` loads the wasm at boot, `WasmStore` binds 21 of 31 exports, ui-ci runs a TEA↔WASM contract test against the real bundle | | CI "10%, landing in a parallel workstream" | `rust-ci.yml` + `ui-ci.yml` **load-bearing since #22**, SHA-pinned, green on main | | Web/PWA "no service worker yet (planned)" | Service worker + webmanifest + icon **ship and are registered** (`Main.res:88`, #27) | | UI "no drag-and-drop; GraphView placeholder" | Note drag **implemented** (`View.res:397`); GraphView renders a circular layout | **Overall ~35% → ~65%.** The critical path has **moved off the WASM bridge onto the UI surface**: 10 exports are unbound in ReScript, including both λδ entry points (`lambdadeltaEval`, `evalLambdadelta`) — the substrate is reachable from JS but nothing calls it. Also corrects **a mixed-basis error I introduced in #45**: λδ was reported as "~76% of the core" by dividing 4,049 LOC (*with* tests) by 5,344 (*without*). Like-for-like it is 3,407/5,344 = **~64%**. ## Justfile - **`just test` could not work on a clean checkout** — the UI tests import generated `*.res.js` and the wasm bindings, so type-check failed with 4 `TS2307` errors. Now `test → build → build-wasm`. Warm no-op costs ~0.45s, so it is not a tax on the inner loop; added `test-rust` for the Rust-only loop. - **`just check` was weaker than CI** (no `--all-targets`, no `--features wasm`, ran from `core/`) — it could pass locally while CI failed. Now mirrors `rust-ci.yml` exactly. - **`just doctor` ignored the wasm toolchain** — the one thing that actually blocks the browser build. Now checks the wasm32 target and compares the wasm-bindgen CLI against `Cargo.lock`, printing the exact fix command on drift. - **`crg-grade` and `crg-badge` were dead on arrival** — Make-style `$$(...)` under just/sh expanded `$$` to the shell PID, so `(` was a syntax error. They failed 100% of the time. Rewritten as bash shebang recipes. ## Verification - `just check` — pass (now compiles the `wasm` feature, which the old one never did) - `just test` from a **fully cleaned tree** (no `web/wasm`, no `*.res.js`) — rebuilds and passes **90 Rust + 10 UI** - `just doctor`, `crg-grade` (→ `D`), `crg-badge` — all run; doctor's FAIL path verified by hiding wasm-bindgen from `PATH` - `asciidoctor` renders README/ROADMAP/QUICKSTART-DEV clean; `just wiki-sync dry` still previews correctly ## Deliberately not done — needs your call - **`READINESS.md` grade D is probably stale.** All three *Path to C* criteria now appear met (product CI on every PR ✅, UI tests in CI ✅, WASM bridge built + smoke-tested ✅). The grade is assigned by audit, so I corrected the facts and flagged a re-audit rather than self-promoting. `just crg-badge` publishes that letter, so the badge is currently understating the project. - **`must-spdx-headers` is a broken gate** (pre-existing, untouched here). It runs `find . | head -20`, so it checks an arbitrary, readdir-order-dependent fifth of the tree *and* walks vendored `node_modules/`. It currently fails on `@rescript/react`'s own `.res` files — **every tracked source file does have SPDX**. Worse, `contractile.just` has drifted from its source: `contractiles/must/Mustfile.a2ml` contains no `spdx-headers` rule at all, and its `no-hardcoded-paths` rule (severity: **critical**) is missing from the generated file. The `contractile` tool isn't installed to regenerate, and this is your standards ecosystem — so I left it alone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e130223 commit c7f6d83

10 files changed

Lines changed: 197 additions & 69 deletions

File tree

Justfile

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,37 @@ setup:
1212
deno task setup
1313
rustup target add wasm32-unknown-unknown || true
1414

15-
# Build the project (ReScript compile + esbuild web bundle)
16-
build:
17-
deno task build
18-
1915
# Build the Rust core to WASM for the browser
2016
build-wasm:
2117
deno task build:wasm
2218

19+
# Build the project (ReScript compile + esbuild web bundle)
20+
# Depends on build-wasm: esbuild resolves web/wasm/nexia_core.js when it bundles.
21+
build: build-wasm
22+
deno task build
23+
2324
# Run all tests (Rust core + UI)
24-
test:
25+
# Depends on build: the UI tests import the generated *.res.js and the wasm
26+
# bindings, so a clean checkout cannot go straight to `just test` without them.
27+
# Both builds are incremental — a warm no-op costs well under a second.
28+
test: build
2529
deno task test
2630

31+
# Rust core tests only — no build step, for a tight inner loop
32+
test-rust:
33+
deno task test:rust
34+
2735
# Run the development server (http://localhost:5173)
2836
run:
2937
deno task dev
3038

3139
# Static checks — Deno lint, rustfmt, clippy
40+
# Mirrors rust-ci.yml exactly: --all-targets --features wasm, run from the
41+
# workspace root. A narrower clippy here would pass locally and fail in CI.
3242
check:
3343
deno lint
34-
cd core && cargo fmt --check && cargo clippy -- -D warnings
44+
cargo fmt --check
45+
cargo clippy --all-targets --features wasm -- -D warnings
3546

3647
# Publish docs/wikis/*.md to the GitHub wiki (docs/wikis/ is the source of truth)
3748
# just wiki-sync dry # preview what would change, push nothing
@@ -78,10 +89,35 @@ doctor:
7889
@command -v git >/dev/null 2>&1 && echo " [OK] git" || echo " [FAIL] git not found"
7990
@command -v deno >/dev/null 2>&1 && echo " [OK] deno" || echo " [FAIL] deno not found (need Deno 2.x)"
8091
@command -v cargo >/dev/null 2>&1 && echo " [OK] cargo" || echo " [FAIL] cargo not found (need Rust stable)"
92+
@echo "Checking the WASM toolchain (the browser build depends on it)..."
93+
@rustup target list --installed 2>/dev/null | grep -q wasm32-unknown-unknown \
94+
&& echo " [OK] wasm32-unknown-unknown target" \
95+
|| echo " [FAIL] wasm32-unknown-unknown target missing — run 'just setup'"
96+
@just _wasm-bindgen-check
8197
@echo "Checking for hardcoded paths..."
8298
@grep -rn '/var/mnt/eclipse' --include='*.rs' --include='*.ex' --include='*.res' --include='*.gleam' --include='*.sh' --include='*.toml' . 2>/dev/null | grep -v 'Justfile' | head -5 || echo " [OK] No hardcoded paths in source"
8399
@echo "Diagnostics complete."
84100

101+
# The wasm-bindgen CLI must match the wasm-bindgen crate in Cargo.lock exactly;
102+
# a mismatch fails the browser build with a confusing schema error, so report
103+
# the drift and the exact command that fixes it.
104+
[private]
105+
_wasm-bindgen-check:
106+
#!/usr/bin/env bash
107+
set -uo pipefail
108+
lock="$(grep -A1 '^name = "wasm-bindgen"$' Cargo.lock 2>/dev/null | grep '^version' | head -1 | cut -d'"' -f2)"
109+
cli="$(wasm-bindgen --version 2>/dev/null | awk '{print $2}')"
110+
if [ -z "${lock}" ]; then
111+
echo " [WARN] wasm-bindgen not found in Cargo.lock — skipping version check"
112+
elif [ -z "${cli}" ]; then
113+
echo " [FAIL] wasm-bindgen CLI not found — cargo install wasm-bindgen-cli --version ${lock} --locked"
114+
elif [ "${cli}" != "${lock}" ]; then
115+
echo " [FAIL] wasm-bindgen CLI ${cli} != Cargo.lock ${lock}"
116+
echo " cargo install wasm-bindgen-cli --version ${lock} --locked --force"
117+
else
118+
echo " [OK] wasm-bindgen ${cli} (matches Cargo.lock)"
119+
fi
120+
85121
# Guided tour of key features
86122
tour:
87123
@echo "=== nexia-list Tour ==="
@@ -121,17 +157,21 @@ llm-context:
121157

122158
# Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line)
123159
crg-grade:
124-
@grade=$$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \
125-
[ -z "$$grade" ] && grade="X"; \
126-
echo "$$grade"
160+
#!/usr/bin/env bash
161+
set -uo pipefail
162+
grade="$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1)"
163+
echo "${grade:-X}"
127164
128165
# Generate a shields.io badge markdown for the current CRG grade
129166
# Looks for '**Current Grade:** X' in READINESS.md; falls back to X
130167
crg-badge:
131-
@grade=$$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \
132-
[ -z "$$grade" ] && grade="X"; \
133-
case "$$grade" in \
134-
A) color="brightgreen" ;; B) color="green" ;; C) color="yellow" ;; \
135-
D) color="orange" ;; E) color="red" ;; F) color="critical" ;; \
136-
*) color="lightgrey" ;; esac; \
137-
echo "[![CRG $$grade](https://img.shields.io/badge/CRG-$$grade-$$color?style=flat-square)](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
168+
#!/usr/bin/env bash
169+
set -uo pipefail
170+
grade="$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1)"
171+
grade="${grade:-X}"
172+
case "${grade}" in
173+
A) color="brightgreen" ;; B) color="green" ;; C) color="yellow" ;;
174+
D) color="orange" ;; E) color="red" ;; F) color="critical" ;;
175+
*) color="lightgrey" ;;
176+
esac
177+
echo "[![CRG ${grade}](https://img.shields.io/badge/CRG-${grade}-${color}?style=flat-square)](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"

QUICKSTART-DEV.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ deno task dev # dev server on http://localhost:5173
5959
[source]
6060
----
6161
nexia-list/
62-
├── core/ # Rust core engine (12 passing unit tests)
62+
├── core/ # Rust core engine + λδ substrate (90 passing tests)
6363
├── ui/ # ReScript TEA-style UI
6464
│ └── src/bindings/ # DOM bindings
6565
├── scripts/ # Deno build/dev scripts (esbuild)

READINESS.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->
22
<!-- READINESS.md — Component Readiness Grade (CRG) for nexia-list -->
3-
<!-- Last updated: 2026-07-02 -->
3+
<!-- Last updated: 2026-07-17 -->
44

55
# Readiness
66

77
**Current Grade:** D
88

9+
> **Re-audit due — this grade is probably stale.** Every criterion listed under
10+
> *Path to C* below now appears to be met (see the checklist). The grade is
11+
> assigned by audit, not by this file, so it is left at D pending a maintainer
12+
> re-audit rather than self-promoted. `just crg-badge` publishes this letter, so
13+
> the badge is understating the project until that happens.
14+
915
Graded per the hyperpolymath
1016
[Component Readiness Grades](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)
1117
standard. Grade assigned in the
@@ -16,21 +22,23 @@ standard. Grade assigned in the
1622

1723
| Aspect | Status |
1824
| --- | --- |
19-
| Builds from source | Yes — `deno task build` (ReScript + esbuild bundle); Rust core builds and its 12 unit tests pass |
25+
| Builds from source | Yes — `deno task build` (ReScript + esbuild bundle); Rust core builds and its **90 tests** pass (81 unit + 3 exchange + 2 golden + 2 property + 2 doc) |
2026
| Lockfiles | Yes — `deno.lock`, `Cargo.lock` |
21-
| CI | Estate governance/scanning workflows only; product CI (rust-ci.yml, ui-ci.yml) landing in a parallel workstream |
22-
| Tests | Rust core unit tests only; no UI or integration tests yet |
23-
| Docs | Truth-reset 2026-07-02; roadmap and topology reflect actual state |
27+
| CI | Estate governance/scanning **plus product CI**: `rust-ci.yml` (fmt, clippy `--all-targets --features wasm`, tests, wasm32 build) and `ui-ci.yml` (ReScript, wasm, Deno tests, bundle, lint) — both on every PR, SHA-pinned, green on main |
28+
| Tests | Rust core (90) **and** UI (10, via `deno task test:ui`), including a TEA↔WASM contract test. No browser-level integration test yet |
29+
| Docs | Truth-reset 2026-07-02; TOPOLOGY re-derived 2026-07-17 after the λδ merges (#35, #36, #43) had gone unrecorded |
2430
| Known debt | unwrap/expect calls in core and desktop; unsafe `get` in View.res (see audit report) |
2531

2632
## Path to C
2733

28-
- Product CI running on every PR (Rust build+test, ReScript build, lint)
29-
- Tests beyond the core crate: UI unit tests exercised in CI
30-
- WASM bridge built and smoke-tested in CI
34+
All three appear **met** as of 2026-07-17 — a re-audit should confirm and regrade:
35+
36+
- [x] Product CI running on every PR (Rust build+test, ReScript build, lint) — `rust-ci.yml` + `ui-ci.yml`, both `on: pull_request`
37+
- [x] Tests beyond the core crate: UI unit tests exercised in CI — 10 tests via `ui-ci.yml`
38+
- [x] WASM bridge built and smoke-tested in CI — `rust-ci.yml` builds wasm32 + generates bindings; `ui-ci.yml` runs the `TEA update delegates to the wasm core` contract test against the real bundle
3139

3240
## Path to B
3341

34-
- Integration tests covering the UI → WASM core → persistence path
35-
- Canvas interaction coverage (pan/zoom, note creation, drag-and-drop once implemented)
42+
- Integration tests covering the UI → WASM core → persistence path (the UI → WASM half is covered; the IndexedDB persistence half needs a browser-level test)
43+
- Canvas interaction coverage (pan/zoom, note creation, drag — all now implemented; geometry is unit-tested, direct interaction is not)
3644
- Known-debt items from the audit resolved or explicitly waived

README.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ Download it and you have the file to keep, yourself, forever.
117117
|Note/Notebook model, backlinks reverse index, substring search, JSON storage
118118

119119
|Browser Bridge
120-
|wasm-bindgen (in progress)
121-
|Compiles the Rust core to WASM so the browser runs the real engine
120+
|wasm-bindgen (wired)
121+
|Compiles the Rust core to WASM so the browser runs the real engine; loaded at boot and covered by a CI contract test
122122

123123
|Tooling
124124
|Deno 2 tasks + esbuild
@@ -196,7 +196,7 @@ a parenthesis, while power users gain the full expressive reach of Lisp.
196196
[source]
197197
----
198198
nexia-list/
199-
├── core/ # Rust — note/notebook engine (~623 LOC, 12 unit tests)
199+
├── core/ # Rust — note/notebook engine + λδ substrate (5,344 LOC, 90 tests)
200200
│ ├── Cargo.toml
201201
│ └── src/
202202
│ ├── lib.rs # Crate root

ROADMAP.adoc

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,32 @@
77

88
This document outlines the development phases for Nexia-List, from MVP to full-featured knowledge management platform.
99

10-
.Revised sequencing (2026-07)
10+
.Revised sequencing (updated 2026-07-17)
1111
[NOTE]
1212
====
1313
Nexia-List is now **web-first**: the Rust core is compiled to WASM and the browser
1414
is the primary target (see link:docs/adr/0001-wasm-core-web-first.md[ADR-0001]).
15-
The desktop shell (Gossamer) is optional and external. Current sequencing:
15+
The desktop shell (Gossamer) is optional and external.
16+
17+
Every item in the previous sequencing block has now shipped:
1618
1719
. Build resurrection (Deno 2 tasks, ReScript compile, esbuild bundle) — ✅ done
18-
. WASM core integration (wasm-bindgen bridge, IndexedDB/file persistence) — in progress
19-
. Product CI (rust-ci.yml, ui-ci.yml — landing in a parallel workstream)
20-
. Tests beyond the core unit suite
21-
. Canvas drag-and-drop + accessibility + PWA (service worker)
22-
. Wiki-links, graph view, agents, import/export
20+
. WASM core integration (wasm-bindgen bridge, IndexedDB autosave + file save/load) — ✅ done
21+
. Product CI (rust-ci.yml, ui-ci.yml) — ✅ done, green on main
22+
. Tests beyond the core unit suite — ✅ done (10 UI tests incl. a TEA↔WASM contract test)
23+
. Canvas drag + accessibility (WCAG 2.2 AA) + PWA (service worker) — ✅ done
24+
. Wiki-links, graph view, agents, import/export — ✅ done
25+
. **λδ (LambdaDelta) substrate** — ✅ largely done, and unrecorded until now: L0 kernel,
26+
notebook host seam, hygienic macros, multimethods, prelude (~64% of the core)
27+
28+
Next sequencing:
29+
30+
. Bind the dormant WASM exports in ReScript — 10 of 31 are unbound, including both
31+
λδ entry points (`lambdadeltaEval`, `evalLambdadelta`)
32+
. Give λδ a door: L1 fx-fields → L2 action hooks → L3 REPL, gated by progressive
33+
disclosure (see link:docs/design/mind-management-plan.md[the mind-management plan])
34+
. Headless `index.rs` (concordance/BM25/See-Also) — zero UI, zero on-disk change
35+
. UI surface: multi-pane, command palette, inspector, markdown render
2336
====
2437

2538
toc::[]

0 commit comments

Comments
 (0)