Brummel 6b7ee45e49 test(series): RED pin for the SMA worked example (#61 headline)
The headline acceptance of #61: the simple-moving-average worked
example from design/models/0007-kernel-extensions.md must build via
`ail build --alloc=rc`, run, and print the correct moving averages.
Green ⇒ the kernel-tier `Series` library extension works end to end
(ring-buffer push, financial-style indexing at index 0 = newest,
count/total bookkeeping).

The fixture is the 0007 worked example with two corrections applied,
both verified against the live tool this session:

- `>=` is not a surface symbol; the polymorphic Ord helper is `ge`
  (here on Int operands: total_count vs window size).
- `print` on Float emits no trailing newline, so the four averages
  would concatenate into an unreadable blob. The emit branch now
  prints the average followed by `io/print_str "\n"`, so each
  average lands on its own line and the output is deterministic and
  assertable. (This legibility fix is also queued to be carried back
  into model 0007.)

RED reason (right-for-the-right-reason): `ail check` rejects with
[bare-cross-module-type-ref] on `Series` — the kernel-tier module
does not exist yet. The fixture itself parses and is otherwise valid.

Expected stdout was derived by probing the live %g float formatter
independently (the SMA averages are 9/3, 16/3, 17/3, 16/3 over the
stream 1,5,3,8,6,2 with window 3): `3.0\n5.33333\n5.66667\n5.33333`.

GREEN side (the `series` kernel module + the five ops) is the next
mini-mode iteration.
2026-06-02 12:59:34 +02:00
S
Description
No description provided
26 MiB
Languages
Rust 91.6%
Python 4.6%
C 1.8%
LLVM 1.6%
Shell 0.4%