Commit Graph

4 Commits

Author SHA1 Message Date
torlando-tech 5e2c3a52bb CI: gate every PR on python-interop conformance
Hook equivalent to reticulum-kt's :rns-test:test and reticulum-swift's
Tests/Interop/. Each pyxis PR now runs the microReticulum conformance
bridge against canonical Python RNS, so a submodule-pin bump or any
change that breaks byte-equivalence with python is caught at PR time
instead of only by the reticulum-conformance repo's own CI (which
runs against pyxis main, not the PR branch).

Mechanism:
- Check out THIS pyxis branch + reticulum-conformance + markqvist/Reticulum
  + markqvist/LXMF
- Build the microReticulumBridge with -DMICRORETICULUM_DIR pointing at
  this branch's deps/microReticulum
- Run the same deselect set we lock in reticulum-conformance/.github/
  workflows/microreticulum.yml so the two CI surfaces stay in sync

Locked baseline: 52 passing against the pyxis fork submodule
(feat/t-deck @ ca355e5). The conformance CI on the spike/graft branch
will report a different number once the graft progresses — that's the
intended signal.
2026-05-04 20:19:08 -04:00
torlando-tech a135c761e6 chore(greptile): iter 1 — applied 4 (3 ACCEPT + 1 MODIFY), rejected 1
Greptile review feedback on PR #21:

ACCEPT:
- test_patch_nimble.py:151 (P1) — replace dead `if False else True`
  ternary with a real assertion that "already applied" is absent on
  the first run.
- test_patch_nimble.py:247 (P1) — invoke the shim subprocess via
  `sys.executable` instead of hardcoded `/usr/bin/python3` so CI's
  setup-python interpreter is used consistently.
- workflows/test.yml:50 (P2) — include hash of
  deps/microReticulum/platformio.ini in PlatformIO cache key so the
  cache invalidates when dependencies change.

MODIFY (narrowed):
- test_ring_buffers.cpp:209 (P2) — keep both `write(data, 0)` and
  `write(data, -1)` assertions, but add a comment clarifying that
  EncodedRingBuffer::write() takes signed `int length` (not size_t),
  so -1 hits the `length <= 0` branch — same as 0. Greptile's
  premise (size_t wrap to SIZE_MAX) does not apply to this codebase.
  The two assertions lock the contract in case the param is ever
  migrated to size_t.

REJECT (silently — no public reply per agent policy):
- test_audio_filters.cpp:237 (P1) — VoiceFilterChain::process()
  takes `numSamples = frames * channels` per the documented
  contract in audio_filters.h:33-40, and the implementation does
  `numFrames = numSamples / channels_` (audio_filters.cpp:63). The
  multichannel test correctly passes `(int)samples.size() = 8000`
  (4000 frames * 2 channels). No out-of-bounds read occurs.
2026-05-04 15:43:14 -04:00
torlando-tech 49ede41036 Fix CI: explicit cstdlib include + libbz2-dev install
- lib/lxst_audio/{packet,encoded}_ring_buffer.cpp use malloc/free without
  including <cstdlib>. macOS leaks it via header transitivity but Linux
  clang is stricter — real portability bug surfaced by the new pytest CI.
- microReticulum native17 tests link against system libbz2 via the fork's
  pre:link_bz2.py script. Ubuntu runners need libbz2-dev installed.
2026-05-04 14:56:50 -04:00
torlando-tech 14f937cf8a Add native pyxis test suite + CI
Standalone C++ tests of pyxis-unique code (BLE fragmenter/reassembler,
peer manager, GATT op queue, LXST ring buffers, audio filters, HDLC
framing) plus Python tests of the patch_nimble.py build script.

Each C++ test is compiled directly by clang++/g++ with shims in
tests/native/ (Bytes.h, Log.h, Utilities/OS.h) so pyxis sources can build
without microReticulum's full Arduino/MsgPack dep tree. A pytest wrapper
per test compiles, runs, and parses the summary line — the whole suite
is one command: `pytest tests/build_scripts tests/native -v`.

Total: 13 pytest tests, ~72 underlying C++ assertions, 3.4s.

Surfaced an HPF-formula bug in lxst_audio (mirrored upstream in
LXST-kt/native_audio_filters.cpp) — filed as LXST-kt#13 and tracked
in the corresponding test with a TODO link.

CI workflow runs the pyxis pytest suite plus the clean-passing
microReticulum native17 unit tests (94/114 of the existing fork
test/* suites) on push and PR.
2026-05-04 14:50:16 -04:00