From c76b8bc4a2eba422ad0f632328b0d21bc77abedb Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 13 Oct 2026 06:27:38 +0000 Subject: [PATCH 1/3] =?UTF-8?q?board:=20#1529=20merged=20(D-PROD-V4)=20?= =?UTF-8?q?=E2=80=94=20arc=20entry,=20LATEST=5FSTATE,=20STATUS=5FBOARD=20r?= =?UTF-8?q?ow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh --- .claude/board/LATEST_STATE.md | 6 +++--- .claude/board/PR_ARC_INVENTORY.md | 7 +++++++ .claude/board/STATUS_BOARD.md | 8 ++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.claude/board/LATEST_STATE.md b/.claude/board/LATEST_STATE.md index a5847a842..dbc07eca9 100644 --- a/.claude/board/LATEST_STATE.md +++ b/.claude/board/LATEST_STATE.md @@ -1,12 +1,12 @@ -## 2026-10-13 — main after #1505, #1506, #1507–#1509, #1514, #1516, #1518, #1520, #1523, #1524, #1525, #1526 (merged); #1529 open +## 2026-10-13 — main after #1505, #1506, #1507–#1509, #1514, #1516, #1518, #1520, #1523, #1524, #1525, #1526, #1529 (merged) - **On `main`, live:** `.cargo/config.toml` defaults to `-Ctarget-cpu=native` with `config-v3.toml` as the portable baseline and `debug = 0` everywhere (#1505); `compute_dag_kahn` checks all 256 field positions (#1506); R2IL `MIN`/`MAX` lowering onto mask-risc (#1518, the part outside glove-parity). - **Merged then withdrawn by #1524 (D-CMR-RESET):** the class-method layer of `lance-graph-glove-parity` (`method`, `call`, `decl`, `gremlin`, `awareness`; #1507, #1508, #1509, #1514, #1516, #1518, #1520). Prior state: `backup/session-011BMJ-2026-10-12`. Inventory: entry `2026-10-12-session-reset-inventory.md`. - **Docs only:** SAG capstone (#1523): `ProposedMethod`, four-state status; not built. - **On `main` (#1525, merged `08635ed`):** D-NALP W1/W2, `crates/lance-graph-nal` (NodeGuid-keyed beliefs, byte apertures, `Question`/`TruthAtLeast`/`Choice` over compiled mask-risc programs; mask-risc `CompiledProgram`). -- **Open:** #1529 D-PROD-V4 (shipped images and the wheel build at x86-64-v4; `linux-build-v4` compiles the v4 arm in CI without running it). +- **On `main` (#1529, merged `2d33bb0`):** D-PROD-V4. `Dockerfile.avx512` builds `sapphirerapids`, `Dockerfile` builds `native`, the other images and the wheel build `x86-64-v4`; `linux-build-v4` compiles both tiers in CI without running them. - **CI (#1526, merged `abc0a1f`):** the native default plus `rust-cache` reused AVX-512 artifacts on runners without them (SIGILL in `dir-sim log in Lance`). `native` is now written out as each runner's exact feature list, and the cache is keyed to it. -- **Rules carried from this session (operator):** classid-dependent methods go through the existing `hotplug.rs` plug-and-play; NAL/NARS operations are global core methods (no classid check, no plug, no `BeliefClass`); internal pins are forbidden (the v3 pins in the Dockerfiles and wheel build are replaced by v4 in #1529). +- **Rules carried from this session (operator):** classid-dependent methods go through the existing `hotplug.rs` plug-and-play; NAL/NARS operations are global core methods (no classid check, no plug, no `BeliefClass`); internal pins are forbidden (the v3 pins in the Dockerfiles and wheel build were replaced in #1529). ## 2026-10-12 — dir-sim membership path witness + role evidence on branch `ccr-0455e606-wmtsor` (unmerged) diff --git a/.claude/board/PR_ARC_INVENTORY.md b/.claude/board/PR_ARC_INVENTORY.md index bd0f58201..072a96b8c 100644 --- a/.claude/board/PR_ARC_INVENTORY.md +++ b/.claude/board/PR_ARC_INVENTORY.md @@ -1,3 +1,10 @@ +## 2026-10-13 — lance-graph PR #1529 (merged `2d33bb0`, branch `ccr-9f3b8075-74u47l-prod-v4`, head `6197dac`, 13 commits) — D-PROD-V4: production build tiers + +- **Added:** shipped builds leave v3. `Dockerfile.avx512` (canonical deploy) builds `sapphirerapids`; plain `Dockerfile` (fallback) builds `native`; `Dockerfile.hhtld`, `crates/cognitive-stack/Dockerfile`, `crates/symbiont/Dockerfile` copy the new `.cargo/config-v4.toml`; both thinking-engine images and `make publish` build `x86-64-v4`. `build.yml` gains `linux-build-v4`, a compile-only matrix over `x86-64-v4` and `sapphirerapids` (nothing runs; most runners are v3), debug 0 for every artifact. The two root Dockerfiles now clone ndarray and OGAR at their default branches and copy `tools/`; before, they could not resolve the workspace. Also carries #1525's board entries. +- **Locked:** every v4/Sapphire Rapids build that runs build scripts on a possibly older host passes `--target `, so the CPU flags reach only target artifacts (codex P1, coderabbit). Measured on a scratch crate: without `--target` the build script compiled with `target-cpu=x86-64-v4` and `-C debuginfo=2`; with it, neither. AMD: v4 covers Zen 4/5 completely; `sapphirerapids` lacks only `avx512fp16` there (and `avxvnni` on Zen 4); Zen 3 has no AVX-512 (`rustc --print cfg`). +- **Deferred / open:** merged before its own CI finished, so `linux-build-v4`'s first full run is the push run on `main`. No `docker build` was run; the root Dockerfiles were checked only in a Docker-shaped layout (all members and path deps resolve). The test jobs still run on a v3 pin instead of per-runner `native`. `crates/symbiont` and `crates/cognitive-stack` still clone ndarray from a feature branch. Railway switches over after a successful build; whether a failed start (`cpu_guard` on an older run host) blocks the switch depends on a healthcheck, not checked. Companion: AdaWorldAPI/ndarray#361 (both tiers in ndarray CI), ndarray#360 (merged). +- **Confidence:** medium. The flag scoping is measured; the images and the wheel were not built here. + ## 2026-10-13 — lance-graph PR #1525 (merged `08635ed`, branch `ccr-9f3b8075-74u47l-nalp`, head `077bb0a`, 16 commits) — D-NALP-1/2: NAL queries as NodeGuid apertures over the fold path - **Added:** new crate `crates/lance-graph-nal` (excluded, own workspace root, like `lance-graph-r2il`). A belief's key is its NodeGuid in the reading `nal-statement-v1` (`[classid, S, copula, P, id]`); `f` and `c` are value lanes in the key's sealed order. A selection is `Aperture { key, bytes }` (4 = class, 6 = subject, 10 = statement), resolved to one range by `SealedFacetLane::bound_aperture`. `nal::{Question, TruthAtLeast, Choice}` lower their R2IL procedure over `FoldDialect` once at bind and keep the mask-risc `Program`; calls run `execute_compiled` with the aperture range as the extent. mask-risc gains `CompiledProgram`. diff --git a/.claude/board/STATUS_BOARD.md b/.claude/board/STATUS_BOARD.md index 07e539797..0ed0ffa2b 100644 --- a/.claude/board/STATUS_BOARD.md +++ b/.claude/board/STATUS_BOARD.md @@ -46,6 +46,14 @@ Plan: `.claude/plans/gremlin-composable-algebra-v1.md`. | D-CMH-G1-5 | FirstOfRun | Withdrawn 2026-10-12 (backup `backup/session-011BMJ-2026-10-12`; see entry session-reset-inventory) | insufficiency proof first; Quack + R2IL vs independent oracle | | D-CMH-G1-6 | ordered `I32` conditions + `MIN`/`MAX` folds as method steps; R2IL `MIN`/`MAX` wired | Withdrawn 2026-10-12 (backup `backup/session-011BMJ-2026-10-12`; see entry session-reset-inventory) | both frontends == row loop incl. empty selection; 8 disable runs red | +## D-PROD-V4 — production build tiers (2026-10-13) + +Entry: `entries/2026-10-13-production-targets-v4.md`. + +| D-id | scope | status | gate / falsifier | +|---|---|---|---| +| **D-PROD-V4** | Shipped images and wheel off v3: `Dockerfile.avx512` `sapphirerapids`, `Dockerfile` `native`, the rest `x86-64-v4`; compile-only CI for both tiers | Shipped #1529 `2d33bb0`; ndarray side in AdaWorldAPI/ndarray#361 | `--target` keeps CPU flags off build scripts (scratch crate: build script without `target-cpu`); `linux-build-v4` on both tiers: first full run is the `main` push run (pending when written); no `docker build` run | + ## D-NALP — `NAL::narsese()` polyfill over R2IL procedures and mask-risc (2026-10-12) Plan: `.claude/plans/nal-polyfill-v1.md`. Template: D-SQLP. No opcode, tenant or ABI change is authorized. From 2d67e54db445101ec27fbf7e73b718b2560d4b8f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 13 Oct 2026 06:40:42 +0000 Subject: [PATCH 2/3] thinking-engine images: build v4 with --target , clone ndarray, rust 1.99, build the copied example codex P2 on #1530: both images set the v4 flags but invoked cargo without --target, so build scripts and proc-macros were compiled for v4 and run on the build host. Building the new line in a Docker-shaped layout also showed three earlier breaks: no ndarray sibling, a 1.98.1 base image against the 1.99 toolchain, and no playground example built for the COPY. The Railway image's '2>/dev/null || true' hid all of them. PR_ARC entry for #1529 records the gap and the fix. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh --- .claude/board/PR_ARC_INVENTORY.md | 2 +- crates/thinking-engine/Dockerfile | 23 +++++++++++++++++++---- crates/thinking-engine/Dockerfile.railway | 18 +++++++++++++++--- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/.claude/board/PR_ARC_INVENTORY.md b/.claude/board/PR_ARC_INVENTORY.md index 072a96b8c..744bffd7d 100644 --- a/.claude/board/PR_ARC_INVENTORY.md +++ b/.claude/board/PR_ARC_INVENTORY.md @@ -1,7 +1,7 @@ ## 2026-10-13 — lance-graph PR #1529 (merged `2d33bb0`, branch `ccr-9f3b8075-74u47l-prod-v4`, head `6197dac`, 13 commits) — D-PROD-V4: production build tiers - **Added:** shipped builds leave v3. `Dockerfile.avx512` (canonical deploy) builds `sapphirerapids`; plain `Dockerfile` (fallback) builds `native`; `Dockerfile.hhtld`, `crates/cognitive-stack/Dockerfile`, `crates/symbiont/Dockerfile` copy the new `.cargo/config-v4.toml`; both thinking-engine images and `make publish` build `x86-64-v4`. `build.yml` gains `linux-build-v4`, a compile-only matrix over `x86-64-v4` and `sapphirerapids` (nothing runs; most runners are v3), debug 0 for every artifact. The two root Dockerfiles now clone ndarray and OGAR at their default branches and copy `tools/`; before, they could not resolve the workspace. Also carries #1525's board entries. -- **Locked:** every v4/Sapphire Rapids build that runs build scripts on a possibly older host passes `--target `, so the CPU flags reach only target artifacts (codex P1, coderabbit). Measured on a scratch crate: without `--target` the build script compiled with `target-cpu=x86-64-v4` and `-C debuginfo=2`; with it, neither. AMD: v4 covers Zen 4/5 completely; `sapphirerapids` lacks only `avx512fp16` there (and `avxvnni` on Zen 4); Zen 3 has no AVX-512 (`rustc --print cfg`). +- **Locked:** every v4/Sapphire Rapids build that runs build scripts on a possibly older host passes `--target `, so the CPU flags reach only target artifacts (codex P1, coderabbit). #1529 missed the two thinking-engine images (codex P2 on #1530); #1530 adds the host triple to both and fixes three earlier breaks that kept them from building at all: no ndarray clone, `rust:1.98.1` against the 1.99 toolchain, and `cargo build` without `--example playground` while the runtime stage copies that example (the Railway one also hid failures behind `2>/dev/null || true`). Checked by running the new build line in a Docker-shaped layout with the image's v4 flags: it finishes, and the binary lands where `COPY` reads it. Measured on a scratch crate: without `--target` the build script compiled with `target-cpu=x86-64-v4` and `-C debuginfo=2`; with it, neither. AMD: v4 covers Zen 4/5 completely; `sapphirerapids` lacks only `avx512fp16` there (and `avxvnni` on Zen 4); Zen 3 has no AVX-512 (`rustc --print cfg`). - **Deferred / open:** merged before its own CI finished, so `linux-build-v4`'s first full run is the push run on `main`. No `docker build` was run; the root Dockerfiles were checked only in a Docker-shaped layout (all members and path deps resolve). The test jobs still run on a v3 pin instead of per-runner `native`. `crates/symbiont` and `crates/cognitive-stack` still clone ndarray from a feature branch. Railway switches over after a successful build; whether a failed start (`cpu_guard` on an older run host) blocks the switch depends on a healthcheck, not checked. Companion: AdaWorldAPI/ndarray#361 (both tiers in ndarray CI), ndarray#360 (merged). - **Confidence:** medium. The flag scoping is measured; the images and the wheel were not built here. diff --git a/crates/thinking-engine/Dockerfile b/crates/thinking-engine/Dockerfile index f58e3261e..27d86e671 100644 --- a/crates/thinking-engine/Dockerfile +++ b/crates/thinking-engine/Dockerfile @@ -1,10 +1,14 @@ -FROM rust:1.98.1-bookworm AS builder +FROM rust:1.99.0-bookworm AS builder # Production target (x86-64-v4) for x86_64 only: this image does not copy # .cargo, so the per-target variable is the only flag source, and it does not # apply when building for another architecture. ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C target-cpu=x86-64-v4" WORKDIR /app +# thinking-engine path-deps the ndarray fork as a sibling (`../../../ndarray` +# from crates/thinking-engine), so clone it next to /app at its default branch. +RUN git clone --depth 1 https://github.com/AdaWorldAPI/ndarray.git /ndarray + # Dependencies first (cached layer) COPY Cargo.toml ./ COPY crates/thinking-engine/Cargo.toml crates/thinking-engine/ @@ -13,7 +17,8 @@ COPY crates/highheelbgz/Cargo.toml crates/highheelbgz/ RUN mkdir -p crates/thinking-engine/src && echo "fn main() {}" > crates/thinking-engine/src/lib.rs \ && mkdir -p crates/bgz-tensor/src && echo "" > crates/bgz-tensor/src/lib.rs \ && mkdir -p crates/highheelbgz/src && echo "" > crates/highheelbgz/src/lib.rs \ - && cargo build --release --manifest-path crates/thinking-engine/Cargo.toml 2>/dev/null || true + && cargo build --release --target "$(rustc -vV | sed -n 's/^host: //p')" \ + --manifest-path crates/thinking-engine/Cargo.toml 2>/dev/null || true # Source code COPY crates/ crates/ @@ -28,8 +33,18 @@ RUN cd /app/crates/thinking-engine/data && \ tar xzf /tmp/jina-reranker-v3-BF16-7lane.tar.gz && \ rm /tmp/*.tar.gz -# Build thinking engine -RUN cargo build --release --manifest-path crates/thinking-engine/Cargo.toml +# Build thinking engine. The runtime stage copies the `playground` example, so +# build it by name: a plain `cargo build` builds no examples. +# `--target ` keeps the v4 flags on the binary only. Without it +# cargo also compiles build scripts and proc-macros for v4 and runs them +# here, so a build host without AVX-512 would die with SIGILL mid-build. +# The binary is copied back to the path the runtime stage reads. +RUN T="$(rustc -vV | sed -n 's/^host: //p')" \ + && cargo build --release --target "$T" \ + --manifest-path crates/thinking-engine/Cargo.toml --example playground \ + && mkdir -p crates/thinking-engine/target/release/examples \ + && cp "crates/thinking-engine/target/$T/release/examples/playground" \ + crates/thinking-engine/target/release/examples/ # Runtime image FROM debian:bookworm-slim diff --git a/crates/thinking-engine/Dockerfile.railway b/crates/thinking-engine/Dockerfile.railway index cd8adbfe2..def80e41c 100644 --- a/crates/thinking-engine/Dockerfile.railway +++ b/crates/thinking-engine/Dockerfile.railway @@ -6,13 +6,17 @@ # For ReaderLM-v2 HTML→markdown: download BF16 safetensors (3 GB) separately # The codebooks run standalone for reasoning at 5,676 queries/sec -FROM rust:1.98.1-bookworm AS builder +FROM rust:1.99.0-bookworm AS builder # Production target (x86-64-v4) for x86_64 only: this image does not copy # .cargo, so the per-target variable is the only flag source, and it does not # apply when building for another architecture. ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C target-cpu=x86-64-v4" WORKDIR /app +# thinking-engine path-deps the ndarray fork as a sibling (`../../../ndarray` +# from crates/thinking-engine), so clone it next to /app at its default branch. +RUN git clone --depth 1 https://github.com/AdaWorldAPI/ndarray.git /ndarray + # Copy workspace COPY Cargo.toml ./ COPY crates/ crates/ @@ -22,8 +26,16 @@ ADD https://github.com/AdaWorldAPI/lance-graph/releases/download/v1.0.0-context- RUN cd /app/crates/thinking-engine/data && tar xzf /tmp/context-spine-v1.0.tar.gz && rm /tmp/*.tar.gz # Build thinking engine (release, no calibration feature = no candle = small binary) -RUN cargo build --release --manifest-path crates/thinking-engine/Cargo.toml \ - --example playground 2>/dev/null || true +# `--target ` keeps the v4 flags on the binary only. Without it +# cargo also compiles build scripts and proc-macros for v4 and runs them +# here, so a build host without AVX-512 would die with SIGILL mid-build. +# The binary is copied back to the path the runtime stage reads. +RUN T="$(rustc -vV | sed -n 's/^host: //p')" \ + && cargo build --release --target "$T" \ + --manifest-path crates/thinking-engine/Cargo.toml --example playground \ + && mkdir -p crates/thinking-engine/target/release/examples \ + && cp "crates/thinking-engine/target/$T/release/examples/playground" \ + crates/thinking-engine/target/release/examples/ # Runtime FROM debian:bookworm-slim From 6cb34a0fafdea3f9b9f131f729fe70b979d009cc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 13 Oct 2026 06:42:22 +0000 Subject: [PATCH 3/3] board: D-PROD-V4 gate: linux-build-v4 green on main for both tiers Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh --- .claude/board/STATUS_BOARD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/board/STATUS_BOARD.md b/.claude/board/STATUS_BOARD.md index 0ed0ffa2b..bf43fd205 100644 --- a/.claude/board/STATUS_BOARD.md +++ b/.claude/board/STATUS_BOARD.md @@ -52,7 +52,7 @@ Entry: `entries/2026-10-13-production-targets-v4.md`. | D-id | scope | status | gate / falsifier | |---|---|---|---| -| **D-PROD-V4** | Shipped images and wheel off v3: `Dockerfile.avx512` `sapphirerapids`, `Dockerfile` `native`, the rest `x86-64-v4`; compile-only CI for both tiers | Shipped #1529 `2d33bb0`; ndarray side in AdaWorldAPI/ndarray#361 | `--target` keeps CPU flags off build scripts (scratch crate: build script without `target-cpu`); `linux-build-v4` on both tiers: first full run is the `main` push run (pending when written); no `docker build` run | +| **D-PROD-V4** | Shipped images and wheel off v3: `Dockerfile.avx512` `sapphirerapids`, `Dockerfile` `native`, the rest `x86-64-v4`; compile-only CI for both tiers | Shipped #1529 `2d33bb0`; ndarray side in AdaWorldAPI/ndarray#361 | `--target` keeps CPU flags off build scripts (scratch crate: build script without `target-cpu`); `linux-build-v4` green on both tiers on the `main` push of `2d33bb0` (run 38356680938); thinking-engine images fixed and their build line run in a Docker-shaped layout in #1530; no `docker build` run | ## D-NALP — `NAL::narsese()` polyfill over R2IL procedures and mask-risc (2026-10-12)