From c2d01f3c416c59107d24e01d138bf0ae18a44829 Mon Sep 17 00:00:00 2001 From: Marcel Verdult Date: Mon, 19 Oct 2026 23:19:42 +0200 Subject: [PATCH 1/3] fix(meshtracker_x1): inherit MicroNMEA in every environment of the variant What changes - variants/meshtracker_x1/platformio.ini moves stevemarple/MicroNMEA from the four environments that listed it into the [MeshTracker_X1] base section, the way nano_g2_ultra already keeps it, and drops the four copies. Why - MeshTracker_X1_kiss_modem was the one environment of this variant that did not list the library, so it did not build: src/helpers/sensors/MicroNMEALocationProvider.h:4: fatal error: MicroNMEA.h: No such file or directory variants/meshtracker_x1/target.cpp includes the location provider unconditionally and every environment of this variant compiles target.cpp, so every one of them needs the library. Putting it in the base section makes that true by construction rather than by repeating the line and hoping none is forgotten, which is exactly what happened here. Compatibility - All five environments of the variant were built, which is the whole reach of this change. MeshTracker_X1_kiss_modem now builds (text 240180, bss 18236; on unchanged dev it does not build at all). For the four that already built, text and bss are byte for byte identical to a build from unchanged dev c9fa617c with the same toolchain, so inheriting the library instead of listing it changes nothing for them: MeshTracker_X1_repeater text 299524 bss 32024, _room_server 292020 / 35740, _companion_radio_usb 316356 / 141000, _companion_radio_ble 322036 / 145432, each text +0 and bss +0 against dev. --- variants/meshtracker_x1/platformio.ini | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/variants/meshtracker_x1/platformio.ini b/variants/meshtracker_x1/platformio.ini index 2194d48d..80286460 100644 --- a/variants/meshtracker_x1/platformio.ini +++ b/variants/meshtracker_x1/platformio.ini @@ -34,6 +34,7 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/meshtracker_x1> lib_deps = ${nrf52_base.lib_deps} https://github.com/adafruit/Adafruit_SPA06_003/archive/refs/tags/1.0.2.zip + stevemarple/MicroNMEA @ ^2.0.6 debug_tool = jlink upload_protocol = nrfutil @@ -51,7 +52,6 @@ build_flags = ${MeshTracker_X1.build_flags} build_src_filter = ${MeshTracker_X1.build_src_filter} +<../examples/simple_repeater> lib_deps = ${MeshTracker_X1.lib_deps} - stevemarple/MicroNMEA @ ^2.0.6 [env:MeshTracker_X1_room_server] extends = MeshTracker_X1 @@ -67,7 +67,6 @@ build_flags = ${MeshTracker_X1.build_flags} build_src_filter = ${MeshTracker_X1.build_src_filter} +<../examples/simple_room_server> lib_deps = ${MeshTracker_X1.lib_deps} - stevemarple/MicroNMEA @ ^2.0.6 [env:MeshTracker_X1_companion_radio_usb] extends = MeshTracker_X1 @@ -94,7 +93,6 @@ build_src_filter = ${MeshTracker_X1.build_src_filter} +<../examples/companion_radio/ui-orig/*.cpp> lib_deps = ${MeshTracker_X1.lib_deps} densaugeo/base64 @ ~1.4.0 - stevemarple/MicroNMEA @ ^2.0.6 end2endzone/NonBlockingRTTTL@^1.3.0 adafruit/Adafruit DRV2605 Library @ ^1.2.4 @@ -127,7 +125,6 @@ build_src_filter = ${MeshTracker_X1.build_src_filter} +<../examples/companion_radio/ui-orig/*.cpp> lib_deps = ${MeshTracker_X1.lib_deps} densaugeo/base64 @ ~1.4.0 - stevemarple/MicroNMEA @ ^2.0.6 end2endzone/NonBlockingRTTTL@^1.3.0 adafruit/Adafruit DRV2605 Library @ ^1.2.4 From 02081ba500c3cc4d3c3410a4fb6feae30e1b3501 Mon Sep 17 00:00:00 2001 From: Blake Latchford Date: Sat, 7 Nov 2026 10:21:01 -0500 Subject: [PATCH 2/3] Incorporate PR Backtesting into CONTRIBUTING.md I used an LLM to review what changes the likelihood of a PR getting merged. I then asked it to select potential changes based on its findings. I selected from those options and carefully guided the LLM to produce several pull requests. I fed the subset of PRs that failed back into the skill and discovered additional missing factors. --- CONTRIBUTING.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b998610e..da30c3ae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,6 +18,15 @@ Thanks for considering contributing to this project! ### 3. Submitting Code Changes (Pull Requests) +The project receives far more code than it is able to process. +To increase the likelihood of your PR being accepted, please consider +the following: + +- **Keep it small.** Changes of about 10 lines or fewer were merged 64% of the time; changes over 1000 lines, 10%. +- **Keep the description short.** A few sentences on what changed and why is enough. Longer descriptions were merged less often. +- **Build a track record with small fixes first.** First-time contributors were merged 31% of the time, rising to 74% after 10 merged PRs. +- **Open the PR when it is ready for review, not as a draft.** + #### Small fixes (typos, comments, examples, small bug fixes) → Just open a pull request — no prior issue needed @@ -52,6 +61,15 @@ Please follow the existing C++ style (per the .clang-format) (But consistency with existing code is more important than strict rules) +## LLM Agent Specific Advice + +- **Have a human read and understand every line before opening the PR.** Check every claim in the description against the code. +- **Search open PRs first** so you don't duplicate one that's already waiting. +- **Pick a subsystem maintainers are actively merging in.** If several PRs for the same board or feature have sat for weeks with no response, a new one will likely sit too. +- **Prefer low-risk changes.** Build fixes and documentation fixes merge most often (about 61% and 64%). Changes to protocol or behavior, and crash or overflow fixes, get much more scrutiny. +- **Make a minimal diff in the existing style.** Don't reformat, rename, or "tidy" code next to your change. +- **Don't use a templated description.** Lots of headings and boilerplate on a small change reads as generated. Just say what changed, why, and what hardware you tested on. + ## Thank You! > [!NOTE] From 2f00b0e83a8434bbbab14d20328826e5fc146233 Mon Sep 17 00:00:00 2001 From: anders-dc Date: Sun, 8 Nov 2026 11:01:05 +0100 Subject: [PATCH 3/3] fix(companion): guard null _serial in contact overwrite and full callbacks --- examples/companion_radio/MyMesh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index 755c56d1..28e5c3ec 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -341,7 +341,7 @@ uint8_t MyMesh::getAutoAddMaxHops() const { void MyMesh::onContactOverwrite(const uint8_t* pub_key) { _store->deleteBlobByKey(pub_key, PUB_KEY_SIZE); // delete from storage - if (_serial->isConnected()) { + if (_serial && _serial->isConnected()) { out_frame[0] = PUSH_CODE_CONTACT_DELETED; memcpy(&out_frame[1], pub_key, PUB_KEY_SIZE); _serial->writeFrame(out_frame, 1 + PUB_KEY_SIZE); @@ -349,7 +349,7 @@ void MyMesh::onContactOverwrite(const uint8_t* pub_key) { } void MyMesh::onContactsFull() { - if (_serial->isConnected()) { + if (_serial && _serial->isConnected()) { out_frame[0] = PUSH_CODE_CONTACTS_FULL; _serial->writeFrame(out_frame, 1); }