mirror of
https://github.com/jhuebert/MeshCore.git
synced 2026-12-03 10:54:13 +00:00
docs: correct the fork guide's build and test instructions
`xiao_s3_wio` is not an environment — `pio run -e xiao_s3_wio` fails with UnknownEnvNamesError. The real one is `Xiao_S3_WIO_repeater`, confirmed against `bash build.sh list`. The guide also said `sh build.sh`, which only worked here because this machine's sh is bash; the script uses bash arrays. Also records three things this work made load-bearing, each of which cost time or a wrong conclusion before it was written down: - Compile-check every filesystem family, not just the main target. Host-native tests cannot catch a platform-specific API difference, and RAK_4631 caught one: its file type has no default constructor, so the persistence code passed every host test and would not compile for nRF52. - PlatformIO does not track the force-included NativeShim.h as a dependency, so a struct change there leaves stale objects that silently disagree with the new layout. Clean the native envs after changing it. - The full four-env test run belongs in the verification list, since the generic envs are where a broken test selection shows up. Test counts updated to the current 278 filter / 44 battery.
This commit is contained in:
1 parent
6d5ae80c4e
commit
6ca90eb874
1 file changed
+31
-12
@@ -59,18 +59,26 @@ commit** — the guides are user-facing API documentation, not optional docs.
|
||||
dispatch, lazy-save loop).
|
||||
- `main.cpp` — serial CLI entry (upstream + fork's buffer-hardening lines).
|
||||
|
||||
**Tests:** `test/test_packet_filter/` (217 behavior-level cases: matching,
|
||||
**Tests:** `test/test_packet_filter/` (278 behavior-level cases: matching,
|
||||
content rules, limiter, persistence upgrades, CLI surface, TinyRegex,
|
||||
PatternMatch) and `test/test_battery_gate/`. Test-only shims: `NativeShim.h`,
|
||||
`NativeTestStubs.cpp`, `RegionMapStub.cpp`, `FilterTestHelpers.h`.
|
||||
|
||||
**Build & CI:** `pio test -e native_packet_filter` / `-e
|
||||
native_battery_gate` (host-native, no hardware); firmware via
|
||||
`sh build.sh build-firmware <target>` (`sh build.sh list`), the filter fork's
|
||||
flash target being `xiao_s3_wio`. `.github/workflows/filter-build.yml` builds
|
||||
release channels (dev → `repeater-filter`, stable → `repeater-filter-stable`);
|
||||
`sync-upstream.yml` merges upstream weekly. Upstream's own docs live in
|
||||
`docs/` (MeshCore protocol/CLI generally) — not fork-filter documentation.
|
||||
native_battery_gate` (host-native, no hardware), plus `-e
|
||||
native_packet_filter_san` / `-e native_battery_gate_san` for ASan+UBSan;
|
||||
firmware via `bash build.sh build-firmware <target>` (`bash build.sh list` —
|
||||
`build.sh` uses bash arrays, so `sh` is not a contract), the filter fork's flash
|
||||
target being `Xiao_S3_WIO_repeater`. **Compile-check every filesystem
|
||||
family** before calling persistence work done: `Xiao_S3_WIO_repeater`,
|
||||
`RAK_4631_repeater` (nRF52), `PicoW_repeater`, `wio-e5_repeater` — host-native
|
||||
tests cannot catch a platform-specific API difference, and one did (the nRF52
|
||||
file type has no default constructor).
|
||||
`.github/workflows/filter-build.yml` builds release channels (dev →
|
||||
`repeater-filter`, stable → `repeater-filter-stable`); `sync-upstream.yml` merges
|
||||
upstream weekly and promotes stable only on explicit dispatch. Upstream's own
|
||||
docs live in `docs/` (MeshCore protocol/CLI generally) — not fork-filter
|
||||
documentation.
|
||||
|
||||
## Branch model
|
||||
|
||||
@@ -208,8 +216,8 @@ FILTER.md:
|
||||
paths, added in the same commit. The suites are behavior-level (native
|
||||
googletest); reach them via the same CLI/`checkPacket`/`checkContent`
|
||||
entry points a user or the firmware would.
|
||||
- Pure refactors keep both suites green **unchanged** — the suite (217 filter
|
||||
cases) is the safety net that proves no behavior slipped.
|
||||
- Pure refactors keep both suites green **unchanged** — the suites (278 filter,
|
||||
44 battery) are the safety net that proves no behavior slipped.
|
||||
- Run both suites, then re-read the diff:
|
||||
|
||||
```
|
||||
@@ -217,9 +225,20 @@ pio test -e native_packet_filter # filter + PatternMatch + TinyRegex + CLI +
|
||||
pio test -e native_battery_gate # battery gate
|
||||
```
|
||||
|
||||
All green, and every touched line required. Touching firmware-hook or
|
||||
persistence code additionally warrants a compile check of the real target
|
||||
(e.g. `pio run -e xiao_s3_wio`).
|
||||
All green, and every touched line required — together with the full four-env
|
||||
run, since the generic envs are where a broken selection shows up:
|
||||
|
||||
```
|
||||
pio test -e native -e native_kiss_modem -e native_packet_filter -e native_battery_gate
|
||||
```
|
||||
|
||||
Touching firmware-hook or persistence code additionally warrants compile checks
|
||||
of `Xiao_S3_WIO_repeater`, `RAK_4631_repeater`, `PicoW_repeater` and
|
||||
`wio-e5_repeater`. Note that PlatformIO does **not** track the
|
||||
force-included `test/test_packet_filter/NativeShim.h` as a dependency: after
|
||||
changing a struct it defines, clean the native envs (`pio run -e
|
||||
native_packet_filter -t clean`) or the stale objects will silently disagree
|
||||
with the new layout.
|
||||
|
||||
## Commit / PR discipline
|
||||
|
||||
|
||||
Reference in new issue
Block a user