ci: increase fragmentation check limit for v2 devices
What changed, and why it matters
This commit only changes a test script. It raises the acceptable memory-fragmentation threshold for a newer Jade hardware version (JADE_V2) during automated continuous integration testing. There is no change to the actual device firmware, no user-facing behavior change, and no security fix or vulnerability present in the diff.
No security action required. Treat as a normal test-maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies test_jade.py’s check_mem_stats() helper. It detects JADE_V2 boards and sets a larger JADE_LARGEST_DRAM threshold (18500 bytes) for fragmentation checks on PSRAM-equipped non-BLE devices, versus the previous 4096 byte limit. A TODO comment notes further investigation is needed for noradio CI runs. This is purely a CI/test tolerance adjustment.
Changed components
test_jade.pyCI memory-statistics validationInspect captured patch +6 / −1
diff --git a/test_jade.py b/test_jade.py
index 9e698c4..7714cd6 100644
--- a/test_jade.py
+++ b/test_jade.py
@@ -2477,12 +2477,17 @@ def check_mem_stats(startinfo, endinfo, has_psram, has_ble, strict=True):
# as there is too much memory allocation outside of our control.
# Also skip for no-psram (qemu) devices.
check_frag = has_psram and not has_ble
+ is_v2 = startinfo['BOARD_TYPE'] in ['JADE_V2']
# Memory stats to log/check
+ dram_frag_limit = -1
+ if check_frag:
+ # TODO: Investigate fragmentation in noradio CI runs
+ dram_frag_limit = 18500 if is_v2 else 4096
breaches = []
for field, limit in [('JADE_FREE_HEAP', 1536),
('JADE_FREE_DRAM', 8192 if has_ble else 1536),
- ('JADE_LARGEST_DRAM', 4096 if check_frag else -1),
+ ('JADE_LARGEST_DRAM', dram_frag_limit),
('JADE_FREE_SPIRAM', 0),
('JADE_LARGEST_SPIRAM', 0 if check_frag else -1)]:
initial = int(startinfo[field])
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.