Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
7 changes: 7 additions & 0 deletions .claude/board/PR_ARC_INVENTORY.md
Original file line number Diff line number Diff line change
@@ -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 <host triple>`, 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.

## 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`.
Expand Down
8 changes: 8 additions & 0 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` 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)

Plan: `.claude/plans/nal-polyfill-v1.md`. Template: D-SQLP. No opcode, tenant or ABI change is authorized.
Expand Down
23 changes: 19 additions & 4 deletions crates/thinking-engine/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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/
Expand All @@ -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 <host triple>` 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
Expand Down
18 changes: 15 additions & 3 deletions crates/thinking-engine/Dockerfile.railway
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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 <host triple>` 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
Expand Down
Loading