Skip to content

The fork builds under -Werror on Linux: test temp paths, and no deprecated batch/decode calls - #165

Merged
joelteply merged 3 commits into
fable/context-memory-rowsfrom
fable/moe-residency-test-clean
Nov 27, 2026
Merged

joelteply merged 3 commits into
fable/context-memory-rowsfrom
fable/moe-residency-test-clean

Conversation

@joelteply

Copy link
Copy Markdown

Every PR on fable/context-memory-rows went red on Linux (cpu, CUDA ubuntu, wasi; #163 merged that
way) compiling this test: four std::tmpnam calls whose result was ignored (warn_unused_result)
and a ContainerHeader built and never read in test_iq2_source_packs_and_reads_back. The four
sites now take a fixed per-test path under the system temp dir from one helper (each test
removes or rewrites its own container), and the unused header is gone. The retained writable
mapping assertions are untouched.

Built with -DLLAMA_FATAL_WARNINGS=ON on the M5 (clang): test-moe-residency 108 passed, 0 failed.
The Linux (gcc) jobs are the receipt for the warnings themselves.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…t, no unused header

Every PR on fable/context-memory-rows went red on Linux (cpu, CUDA ubuntu, wasi; #163 merged that
way) compiling this test: four std::tmpnam calls whose result was ignored (warn_unused_result)
and a ContainerHeader built and never read in test_iq2_source_packs_and_reads_back. The four
sites now take a fixed per-test path under the system temp dir from one helper (each test
removes or rewrites its own container), and the unused header is gone. The retained writable
mapping assertions are untouched.

Built with -DLLAMA_FATAL_WARNINGS=ON on the M5 (clang): test-moe-residency 108 passed, 0 failed.
The Linux (gcc) jobs are the receipt for the warnings themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ted batch and decode wrappers

With test-moe-residency fixed, Linux reached the next deprecated calls (server-context-learn-checkpoint.inc's
llama_batch_init/free); a full build with -DLLAMA_FATAL_WARNINGS=ON and -k on the M5 listed every remaining
one: 25 errors in test-walk-exact.cpp and test-state-restore-streams.cpp. Now 0.

- llama_opt_batch_init/llama_opt_batch_free (llama.h, beside llama_opt_prepare_restore, defined over the
  internal llama_batch_init_impl that #6ac892187 made for the learn path): the labelled batch the opt path
  takes (tokens, positions, one sequence, logits, labels, label weights). The server's retained-row restore
  and test-walk-exact's training decodes allocate through it.
- test-walk-exact decodes and encodes through the context's own decode/encode, as the deprecated wrappers
  did; its one llama_batch_get_one view becomes the same value-initialised batch with one token.
- test-state-restore-streams has no labels, so it moves to the house pattern (common_batch +
  llama_process(DECODE), as test-persona-blocks), and its hand-rolled batch helper is deleted.

Measured on the M5 (tiny random qwen35moe): full fork build, fatal warnings, 0 errors. test-moe-residency
108 passed; test-state-restore-streams exit 0; test-walk-exact matches its unmodified self exactly: every
exactness line identical and the same one failure, the device-refusal horizon retry ("0 retries, 1 graph
refusals ... optimizer workspace allocation was refused"), which the unmodified test also fails on this host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply joelteply changed the title test-moe-residency builds under -Werror on Linux The fork builds under -Werror on Linux: test temp paths, and no deprecated batch/decode calls Nov 27, 2026
…elper (GCC -Werror)

Linux CI (GCC) refused its operator delete's free() as mismatched with an operator new that called
malloc directly (-Wmismatched-new-delete). It now allocates through one counting helper and replaces
new, new[], delete, delete[] and their sized forms, as test-persona-blocks does (clean under the same
GCC). Counting unchanged; passes on the M5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 41f3276 into fable/context-memory-rows Nov 27, 2026
8 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant