From 4dcca9812f7e9ed1876ba6075a118acd0508dfed Mon Sep 17 00:00:00 2001
From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com>
Date: Thu, 30 Apr 2026 16:47:51 +0100
Subject: [PATCH] docs: re-measure cartridge counts and .so build status
 (2026-04-30)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Sweeps the date-stamped historical statements that PR #40 deliberately
left out of scope (because they were measurements taken on 2026-04-25
and substituting blind would have been wrong). Now re-measured against
the actual repo state on 2026-04-30 after `just build` produced 111
shared libraries from 115 cartridge directories.

Files updated:

  TOPOLOGY.md L4
    "Updated 2026-04-25. 112 cartridges across 6 tiers."
    -> "Updated 2026-04-30. 115 cartridges across 6 tiers (111 with
       `.so` built, 4 pending)."

  TEST-NEEDS.md L124
    "112 cartridges loaded ... as of 2026-04-25"
    -> "115 cartridges loaded ... as of 2026-04-30 (111 with `.so`
       built; the 4 without are database-mcp, echidna-llm-mcp,
       lang-mcp, orchestrator-lsp-mcp)"

  ROADMAP.adoc v1.0.1
    - cartridge.json + mod.js coverage checkboxes: bumped 112 -> 115
      and re-dated 2026-04-30
    - "Re-run cartridge matrix build/tests": now [x] (build re-run done;
      test re-run still deferred and called out)
    - "Refresh repo documentation claims": now [x] (PR #40 + this PR
      cover the canonical surfaces)

  ROADMAP.adoc v1.1.0 ("JS cartridge dispatch")
    "99 of 106 cartridges use mod.js, not Zig .so"
    -> "4 of 115 cartridges still use mod.js" — gap closed substantially
       since the original measurement.

  docs/ARCHITECTURE.md L138
    "Once all 112 cartridges have verified .so builds"
    -> 115 + parenthetical re-measurement footnote.

  docs/ARCHITECTURE.md L209-212 (cartridge production status)
    "1 complete (boj-health), 111 in progress" -> the breakdown is now
    inverted: 111 with .so built, 4 not yet building. Updated text
    reflects this.

  docs/READINESS.md L75 (Cartridge fleet row)
    Bumped (106) -> (115). Built-libs ratio refreshed (103/106 ->
    111/115). Re-assessed date 2026-05-28 -> 2026-04-30. Honestly noted
    that README counts, FFI test counts, and per-directory annotation
    were NOT re-verified in this sweep (those numbers are still the
    last-documented values; flagged for a separate readiness sweep).

What this PR deliberately does NOT do:

  * Re-run mix test / zig test / FFI test counts. The numbers in
    READINESS.md (113 FFI tests, 178 core tests, 4 believe_me, etc.)
    haven't been re-measured. They're left as last-documented values
    with a flag in the row text. Re-running tests is a separate
    follow-up — see ROADMAP "test re-run still deferred".

  * Re-count per-directory READMEs (the 393 number). That's a static
    annotation count; would need a small audit script.

  * Touch the 4 not-yet-building cartridges (database-mcp,
    echidna-llm-mcp, lang-mcp, orchestrator-lsp-mcp). Their build
    failures are out of scope; flagged here so the next investigator
    has a starting list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
 ROADMAP.adoc         | 10 +++++-----
 TEST-NEEDS.md        |  2 +-
 TOPOLOGY.md          |  2 +-
 docs/ARCHITECTURE.md | 18 ++++++++++++------
 docs/READINESS.md    |  2 +-
 5 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/ROADMAP.adoc b/ROADMAP.adoc
index 4fde26cb..a3f588a3 100644
--- a/ROADMAP.adoc
+++ b/ROADMAP.adoc
@@ -75,14 +75,14 @@ V-lang adapter migration complete (0 `.v` files).  Grade C achieved 2026-04-25.
 === v1.0.1 — Adapter Migration Recovery (P0, In Progress)
 
 * [x] Remove remaining V-lang adapters across `cartridges/` (confirmed 0 `.v` files 2026-04-25 — cleanup completed 2026-04-12)
-* [x] Ensure every cartridge has `cartridge.json` metadata (all 112 cartridges covered 2026-04-25)
-* [x] Ensure every cartridge has `mod.js` tool handlers (all 112 cartridges covered 2026-04-25)
-* [ ] Re-run cartridge matrix build/tests and update `TEST-NEEDS.md` with current evidence
-* [ ] Refresh repo documentation claims after migration closure (counts, completion text, handover docs)
+* [x] Ensure every cartridge has `cartridge.json` metadata (all 115 cartridges covered, re-verified 2026-04-30)
+* [x] Ensure every cartridge has `mod.js` tool handlers (all 115 cartridges covered, re-verified 2026-04-30)
+* [x] Re-run cartridge matrix build and update `TEST-NEEDS.md` with current evidence (build count refreshed 2026-04-30 — 111/115 cartridges have `.so`; pending: `database-mcp`, `echidna-llm-mcp`, `lang-mcp`, `orchestrator-lsp-mcp`. Test re-run deferred to next sweep.)
+* [x] Refresh repo documentation claims after migration closure — counts, completion text, handover docs (PR #40 + this re-measurement PR cover the canonical doc surfaces; cartridge count is now 115 across all surfaces)
 
 === v1.1.0 — JS Dispatch + Gateway Sidecar
 
-JS cartridge dispatch (the large remaining gap — 99 of 106 cartridges use `mod.js`, not Zig `.so`):
+JS cartridge dispatch (gap closed substantially since the original measurement — as of 2026-04-30, 4 of 115 cartridges still use `mod.js` not Zig `.so`: `database-mcp`, `echidna-llm-mcp`, `lang-mcp`, `orchestrator-lsp-mcp`):
 
 * [x] `BojRest.JsInvoker` — shells out to `deno run mod.js` per invocation (Phase 1: fork-per-call, ~200 ms cold-start)
 * [x] Router dispatch branch: if `cart["ffi"]` key present → `Invoker` (Zig path); else → `JsWorkerPool` (Deno pool path)
diff --git a/TEST-NEEDS.md b/TEST-NEEDS.md
index 0ed91c41..f15ccef7 100644
--- a/TEST-NEEDS.md
+++ b/TEST-NEEDS.md
@@ -121,6 +121,6 @@ Grade B requires:
 - **E2E tests are Deno-gated** — tagged `@tag :e2e` and skip cleanly if `deno` is absent.
   CI must install Deno for E2E coverage.
 - **FFI/Zig tests** are not in this suite — they run via `zig test` in `ffi/zig/`.
-- **112 cartridges loaded** from `cartridges/` as of 2026-04-25.
+- **115 cartridges loaded** from `cartridges/` as of 2026-04-30 (111 with `.so` built; the 4 without are `database-mcp`, `echidna-llm-mcp`, `lang-mcp`, `orchestrator-lsp-mcp`).
 - **Panic-attack pre-commit hook** runs `panic-attack assail` — check `PANIC-ATTACK.a2ml`
   for current Clade classification and any open findings.
diff --git a/TOPOLOGY.md b/TOPOLOGY.md
index e64ebbf8..bb554e1f 100644
--- a/TOPOLOGY.md
+++ b/TOPOLOGY.md
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: PMPL-1.0-or-later
 # TOPOLOGY.md — BoJ Server Component Matrix
 #
-# Updated 2026-04-25. 112 cartridges across 6 tiers.
+# Updated 2026-04-30. 115 cartridges across 6 tiers (111 with `.so` built, 4 pending).
 
 ## Ports
 
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 288bf033..ae765db7 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -135,8 +135,10 @@ The `mod.js` files serve as behavioural reference implementations for what each
 cartridge's Zig FFI symbols must produce. They are **transitional** — as each
 cartridge's `.so` is compiled and verified, the Elixir Router switches to the
 Zig FFI path automatically (presence of `"ffi"` key in `cartridge.json` controls
-which path is taken). Once all 112 cartridges have verified `.so` builds,
-the Deno pool is retired.
+which path is taken). Once all 115 cartridges have verified `.so` builds,
+the Deno pool is retired. (As of 2026-04-30: 111/115 have `.so`; 4
+pending — `database-mcp`, `echidna-llm-mcp`, `lang-mcp`,
+`orchestrator-lsp-mcp`.)
 
 **Dispatch selector (BojRest.Router):**
 ```elixir
@@ -206,10 +208,14 @@ launch-scaffolder realign <name>
   → re-applies standards (ADR-0006 ABI, spdx header, schema version)
 ```
 
-All 112 cartridges have the scaffold. Status:
-- **1 complete** (boj-health): Zig source compiled, `.so` verified, in production
-- **111 in progress**: Zig source present and substantial (100–1,260 lines each),
-  `.so` not yet compiled — transitional `mod.js` in use
+All 115 cartridges have the scaffold. Status (re-measured 2026-04-30):
+- **111 with `.so` built**: Zig source compiles cleanly, artefact present
+  under `cartridges/<name>/ffi/zig-out/lib/lib<name>.so`, dispatched via
+  the Zig FFI path (`cartridge.json` has the `"ffi"` key).
+- **4 not yet building**: `database-mcp`, `echidna-llm-mcp`, `lang-mcp`,
+  `orchestrator-lsp-mcp` — Zig source present but `just build` doesn't
+  emit a `.so` for these; transitional `mod.js` (Deno fork-per-call)
+  remains the dispatch path until they build cleanly.
 
 > **Note:** `tools/cartridge-minter/` exists but uses Node.js (banned language).
 > The `launch-scaffolder` is the canonical tool; cartridge-minter is a legacy artefact.
diff --git a/docs/READINESS.md b/docs/READINESS.md
index 5a1972e1..fa91716e 100644
--- a/docs/READINESS.md
+++ b/docs/READINESS.md
@@ -72,7 +72,7 @@ component's state **within its home context only** unless noted.
 | Catalogue ABI (Idris2)       | C     | `alpha-stable`          | Type-checks with `%default total`. 4 `believe_me` (down from 31). Deep annotation complete. Dogfooded for 4+ weeks. | None — promoted to C.                                  | 2026-05-25    |
 | Catalogue FFI (Zig)          | C     | `alpha-stable`          | Builds clean. 178 core tests pass. Deep annotation complete. Dogfooded for 4+ weeks.                | None — promoted to C.                                  | 2026-05-25    |
 | C Headers (generated)        | D     | `alpha-unstable`         | Generated, matches Idris2 encodings. Not tested via a C consumer.                                  | Real C consumer + ABI round-trip test                   | 2026-04-18    |
-| Cartridge fleet (106)         | C     | `alpha-stable`          | 103/106 shared libs built. 106/106 cartridges have `README.adoc`. 113 FFI tests pass. Deep annotation complete (393 per-directory READMEs). Dogfooded for 4+ weeks. | None — promoted to C.                                  | 2026-05-28    |
+| Cartridge fleet (115)         | C     | `alpha-stable`          | 111/115 shared libs built (re-measured 2026-04-30; 4 pending: `database-mcp`, `echidna-llm-mcp`, `lang-mcp`, `orchestrator-lsp-mcp`). README.adoc / FFI test counts / per-directory README counts not re-verified in this sweep — last documented values were 106/106, 113 tests, 393 READMEs. Dogfooded for 4+ weeks. | None — promoted to C; full re-measurement (READMEs, FFI tests, per-directory annotation) deferred to a separate sweep. | 2026-04-30    |
 | Zig adapter layer (per cartridge) | C | `alpha-stable`          | All adapters are Zig-only. V-lang files eliminated. Deep annotation complete. Dogfooded for 4+ weeks. | None — promoted to C.                                  | 2026-05-25    |
 | Dynamic Loader               | D     | `alpha-unstable`         | Hash verification, mount/unmount. 14 loader tests pass.                                            | Use in anger on multi-cartridge live reload             | 2026-04-18    |
 | Guardian module              | D     | `alpha-unstable`         | Resource-aware failure tolerance. 12 tests pass.                                                   | Fault-injection campaign                                | 2026-04-18    |
