Completed Phase 2

This commit is contained in:
John Poole 2026-05-19 09:44:03 -07:00
commit c7d1e8aafb
3 changed files with 283 additions and 5 deletions

View file

@ -237,4 +237,12 @@ or:
```text
For Phase 2, I want to address the scanner false-positive diagnostic separately as a platform robustness fix.
```
May 18, 2026 2:36 PM - saved a copy of the SQLite database under sql/archive. Memorialized prompt for Phase 2A from ChatGPT in Codex_prompt_State2A_20250518_1433.md.
May 18, 2026 2:36 PM - saved a copy of the SQLite database under sql/archive. Memorialized prompt for Phase 2A from ChatGPT in Codex_prompt_State2A_20250518_1433.md.
Trying to reconcile Codex's report of warnings vs. what I get, ChatGPT had me run several tests and I provided the results and it concluded:
Codex report showed “2 warnings,” but on jp the warnings were not reproducible.
Rerun with -W always -rw showed:
fragmentation backend shim: 9 passed, no warnings
Gate 2C/2D/2E regression: 39 passed, 1 skipped, no warnings
The single skip is expected and is not a warning.

View file

@ -16,7 +16,7 @@ timeout 240 python3 examples/ble_dual_node_echo.py \
# --message-file /home/jlpoole/US_Constitution.txt
--message-file If.txt \
# zerodev1 Command clump START
# zerodev1 Python Command clump START
date
cd /usr/local/src/ble-reticulum/
chronyc tracking
@ -40,7 +40,7 @@ chronyc sources -v
# zerodev2 Command clump START
# zerodev2 Python Command clump START
date
cd /usr/local/src/ble-reticulum/
chronyc tracking
@ -61,6 +61,33 @@ chronyc tracking
chronyc sources -v
# zerodev2 Command clump END
======================= CPP ======================
# Gate 2F Life Field Acceptance Bilaterial Constitution
# zerodev1 CPP Command clump START
date
cd /usr/local/src/ble-reticulum/
chronyc tracking
chronyc sources -v
echo .
PYTHONPATH=src:migration/protocol_core \
BLE_RETICULUM_SESSION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND_REPORT=1 \
timeout 90 python3 examples/ble_dual_node_echo.py \
--ble-role peripheral \
--message-file /home/jlpoole/US_Constitution.txt \
--message-chunk-size 900 \
--announce-only-when-disconnected \
--verbosity "debug"
echo .
chronyc tracking
chronyc sources -v
# zerodev1 Command clump END
# Gate 2F Life Field Acceptance Bilaterial Constitution
# zerodev2 CPP Command clump START
date
cd /usr/local/src/ble-reticulum/
@ -69,13 +96,173 @@ chronyc sources -v
echo .
PYTHONPATH=src:migration/protocol_core \
BLE_RETICULUM_SESSION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND_REPORT=1 \
timeout 60 python3 examples/ble_dual_node_echo.py \
timeout 90 python3 examples/ble_dual_node_echo.py \
--ble-role both \
--message-file /home/jlpoole/US_Constitution.txt \
--peer 926e6d3b35b7d5940be7edeb47c41b78 \
--announce-only-when-disconnected
--announce-only-when-disconnected \
--verbosity "debug"
echo .
chronyc tracking
chronyc sources -v
# zerodev2 Command clump END
# Gate 2F Life Field Acceptance If_4_lines
# zerodev1 CPP Command clump START
date
cd /usr/local/src/ble-reticulum/
chronyc tracking
chronyc sources -v
echo .
cd migration/protocol_core
python3 setup.py build_ext --inplace
cd ../..
PYTHONPATH=src:migration/protocol_core \
BLE_RETICULUM_SESSION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
python3 - <<'PY'
import os, sys
print("PYTHON:", sys.executable)
print("PYTHONPATH:", os.environ.get("PYTHONPATH"))
print("BLE_RETICULUM_SESSION_BACKEND:", os.environ.get("BLE_RETICULUM_SESSION_BACKEND"))
print("BLE_RETICULUM_FRAGMENTATION_BACKEND:", os.environ.get("BLE_RETICULUM_FRAGMENTATION_BACKEND"))
import ble_protocol_core_cpp
print("ble_protocol_core_cpp:", ble_protocol_core_cpp.__file__)
from ble_reticulum.BLEFragmentationBackend import BACKEND as FRAG_BACKEND
from ble_reticulum.BLESessionBackend import BACKEND as SESSION_BACKEND
print("fragmentation backend:", FRAG_BACKEND)
print("session backend:", SESSION_BACKEND)
if FRAG_BACKEND != "cpp":
raise SystemExit(f"ERROR: expected fragmentation backend cpp, got {FRAG_BACKEND!r}")
if SESSION_BACKEND != "cpp":
raise SystemExit(f"ERROR: expected session backend cpp, got {SESSION_BACKEND!r}")
print("CPP backend preflight: OK")
PY
echo .
PYTHONPATH=src:migration/protocol_core \
BLE_RETICULUM_SESSION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND_REPORT=1 \
timeout 90 python3 examples/ble_dual_node_echo.py \
--ble-role peripheral \
--message-file /usr/local/src/ble-reticulum/samples/If.txt \
--message-chunk-size 900 \
--announce-only-when-disconnected \
--verbosity debug
echo .
chronyc tracking
chronyc sources -v
# zerodev1 Command clump END for Gate 2F Life Field Acceptance If_4_lines
# Gate 2F Live Field Acceptance Bilateral Constitution
# zerodev2 CPP Command clump START
date
cd /usr/local/src/ble-reticulum/
chronyc tracking
chronyc sources -v
echo .
cd migration/protocol_core
python3 setup.py build_ext --inplace
cd ../..
PYTHONPATH=src:migration/protocol_core \
BLE_RETICULUM_SESSION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
python3 - <<'PY'
import os, sys
print("PYTHON:", sys.executable)
print("PYTHONPATH:", os.environ.get("PYTHONPATH"))
print("BLE_RETICULUM_SESSION_BACKEND:", os.environ.get("BLE_RETICULUM_SESSION_BACKEND"))
print("BLE_RETICULUM_FRAGMENTATION_BACKEND:", os.environ.get("BLE_RETICULUM_FRAGMENTATION_BACKEND"))
import ble_protocol_core_cpp
print("ble_protocol_core_cpp:", ble_protocol_core_cpp.__file__)
from ble_reticulum.BLEFragmentationBackend import BACKEND as FRAG_BACKEND
from ble_reticulum.BLESessionBackend import BACKEND as SESSION_BACKEND
print("fragmentation backend:", FRAG_BACKEND)
print("session backend:", SESSION_BACKEND)
if FRAG_BACKEND != "cpp":
raise SystemExit(f"ERROR: expected fragmentation backend cpp, got {FRAG_BACKEND!r}")
if SESSION_BACKEND != "cpp":
raise SystemExit(f"ERROR: expected session backend cpp, got {SESSION_BACKEND!r}")
print("CPP backend preflight: OK")
PY
echo .
PYTHONPATH=src:migration/protocol_core \
BLE_RETICULUM_SESSION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND_REPORT=1 \
timeout 90 python3 examples/ble_dual_node_echo.py \
--ble-role both \
--message-file /home/jlpoole/US_Constitution.txt \
--peer 926e6d3b35b7d5940be7edeb47c41b78 \
--announce-only-when-disconnected \
--verbosity debug
echo .
chronyc tracking
chronyc sources -v
# zerodev2 Command clump END
# zerodev1 CPP Command clump START
date
cd /usr/local/src/ble-reticulum/
chronyc tracking
chronyc sources -v
echo .
PYTHONPATH=src:migration/protocol_core \
BLE_RETICULUM_SESSION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND_REPORT=1 \
timeout 30 python3 examples/ble_dual_node_echo.py \
--ble-role peripheral \
--message-file /home/jlpoole/US_Constitution.txt \
--message-chunk-size 900 \
--announce-only-when-disconnected \
--verbosity "debug"
echo .
chronyc tracking
chronyc sources -v
# zerodev1 Command clump END
# Gate 2F Life Field Acceptance If_4_lines
# zerodev2 CPP Command clump START
date
cd /usr/local/src/ble-reticulum/
chronyc tracking
chronyc sources -v
echo .
PYTHONPATH=src:migration/protocol_core \
BLE_RETICULUM_SESSION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
BLE_RETICULUM_FRAGMENTATION_BACKEND_REPORT=1 \
timeout 30 python3 examples/ble_dual_node_echo.py \
--ble-role both \
--message-file /home/jlpoole/US_Constitution.txt \
--peer 926e6d3b35b7d5940be7edeb47c41b78 \
--announce-only-when-disconnected \
--verbosity "debug"
echo .
chronyc tracking

83
scripts/txt_console_to_html.pl Executable file
View file

@ -0,0 +1,83 @@
#!/usr/bin/env perl
#
# txt_console_to_html.pl
#
# Example:
# chmod +x txt_console_to_html.pl
# ./txt_console_to_html.pl 20260518_1855_zerodev2_Gate2F_BilateralConstitution_90seconds.txt
#
# Subversion:
# $Id$
# $HeadURL$
#
use strict;
use warnings;
use File::Basename qw(basename);
use POSIX qw(strftime);
my $infile = shift or die "Usage: $0 console_capture.txt\n";
open my $in, '<:encoding(UTF-8)', $infile
or die "Cannot open $infile: $!\n";
my $text = do { local $/; <$in> };
close $in;
my $base = basename($infile);
$base =~ s/\.[^.]+$//;
my $timestamp = strftime('%Y%m%d_%H%M%S', localtime);
my $outfile = "${base}_console_${timestamp}.html";
$text =~ s/&/&amp;/g;
$text =~ s/</&lt;/g;
$text =~ s/>/&gt;/g;
open my $out, '>:encoding(UTF-8)', $outfile
or die "Cannot write $outfile: $!\n";
print $out <<"HTML";
<!DOCTYPE html>
<!--
Created by: txt_console_to_html.pl
Date: $timestamp
Source file: $infile
\$Id\$
\$HeadURL\$
-->
<html>
<head>
<meta charset="UTF-8">
<title>$base</title>
<style>
html, body {
margin: 0;
padding: 0;
background: #111;
color: #eee;
}
body {
padding: 10px;
font-family: "DejaVu Sans Mono", "Liberation Mono", "Courier New", monospace;
font-size: 13px;
line-height: 1.25;
white-space: pre;
}
.console-title {
color: #9fd7ff;
font-weight: bold;
}
</style>
</head>
<body><span class="console-title">$base</span>
$text</body>
</html>
HTML
close $out;
print "Wrote: $outfile\n";