Add C++ identity helper bindings

This commit is contained in:
John Poole 2026-05-17 12:49:55 -07:00
commit 7f0b302d00
5 changed files with 698 additions and 0 deletions

View file

@ -0,0 +1,145 @@
--
-- For ChatGPT's tracking
--
-- 20260517 ChatGPT
-- $Header$
--
-- Example:
-- cd /usr/local/src/ble-reticulum/migration
-- sqlite3 ble_migration.sqlite ".read sql/executive_summary.sql"
--
-- Purpose:
-- Executive summary of BLE Reticulum C++ migration status.
.headers on
.mode column
.width 14 14 10 8 6 60
.print ''
.print '============================================================'
.print 'BLE Reticulum Migration Executive Summary'
.print '============================================================'
.print ''
.print '1. Counts by phase/status/tag'
SELECT
phase,
status,
tag,
COUNT(*) AS symbol_count
FROM symbols
GROUP BY phase, status, tag
ORDER BY phase, status, tag;
.print ''
.print '2. Phase-1 C++ candidates'
SELECT
source_file,
COALESCE(class_name, '') AS class_name,
symbol_name,
line_number,
tag,
status
FROM symbols
WHERE phase = '1_protocol_core'
OR cpp_candidate = 1
ORDER BY source_file, line_number;
.print ''
.print '3. Symbols marked TESTED or ACCEPTED'
SELECT
source_file,
COALESCE(class_name, '') AS class_name,
symbol_name,
phase,
status,
substr(COALESCE(notes, ''), 1, 80) AS notes_preview
FROM symbols
WHERE status IN ('TESTED', 'ACCEPTED', 'FIELD_ACCEPTED', 'WRAPPED_FOR_PYTHON')
ORDER BY source_file, line_number;
.print ''
.print '4. Remaining CORE symbols not accepted'
SELECT
source_file,
COALESCE(class_name, '') AS class_name,
symbol_name,
line_number,
phase,
status,
substr(COALESCE(rationale, ''), 1, 80) AS rationale_preview
FROM symbols
WHERE tag = 'CORE'
AND status NOT IN ('ACCEPTED', 'FIELD_ACCEPTED', 'REJECTED', 'DEFERRED')
ORDER BY source_file, line_number;
.print ''
.print '5. Unknown or needs-review symbols'
SELECT
source_file,
COALESCE(class_name, '') AS class_name,
symbol_name,
line_number,
tag,
status,
substr(COALESCE(rationale, ''), 1, 80) AS rationale_preview
FROM symbols
WHERE tag = 'UNKNOWN'
OR status = 'NEEDS_REVIEW'
ORDER BY source_file, line_number;
.print ''
.print '6. Do-not-port-yet inventory'
SELECT
tag,
COUNT(*) AS symbol_count
FROM symbols
WHERE tag IN ('GLUE', 'PLATFORM', 'TEST')
GROUP BY tag
ORDER BY tag;
.print ''
.print '7. Candidate next tasks'
SELECT
source_file,
COALESCE(class_name, '') AS class_name,
symbol_name,
line_number,
tag,
phase,
status,
cpp_candidate,
substr(COALESCE(rationale, ''), 1, 100) AS rationale_preview
FROM symbols
WHERE (
tag = 'CORE'
AND status IN ('DISCOVERED', 'CLASSIFIED', 'TESTED', 'WRAPPED_FOR_PYTHON')
)
OR (
cpp_candidate = 1
AND status NOT IN ('ACCEPTED', 'FIELD_ACCEPTED', 'REJECTED', 'DEFERRED')
)
ORDER BY
CASE
WHEN source_file LIKE '%BLEInterface.py%' THEN 1
WHEN source_file LIKE '%BLEFragmentation.py%' THEN 2
ELSE 3
END,
source_file,
line_number;
.print ''
.print '8. Latest review notes'
SELECT
r.reviewed_at,
r.reviewer,
s.source_file,
COALESCE(s.class_name, '') AS class_name,
s.symbol_name,
r.old_status,
r.new_status,
substr(COALESCE(r.note, ''), 1, 100) AS note_preview
FROM reviews r
JOIN symbols s ON s.symbol_id = r.symbol_id
ORDER BY r.reviewed_at DESC
LIMIT 20;

View file

@ -0,0 +1,78 @@
-- 20260517 ChatGPT
-- $Header$
--
-- Example:
-- cd /usr/local/src/ble-reticulum/migration
-- sqlite3 ble_migration.sqlite ".read sql/mark_fragmentation_cpp_field_accepted_20260517.sql"
--
-- Purpose:
-- Mark Phase 1 C++ fragmentation/reassembly/HDLC work as field accepted
-- after successful bilateral Constitution transfer using the C++ backend.
BEGIN;
UPDATE symbols
SET status = 'FIELD_ACCEPTED',
phase = '1_protocol_core',
notes = trim(COALESCE(notes, '') || char(10) ||
'2026-05-17: FIELD_ACCEPTED. C++ protocol-core backend passed live bilateral Constitution transfer after rebooting devzero1 and increasing transfer timeout from 60 to 90 seconds. A forensic run directory was preserved for the pre-reboot hardware/timeout lock investigation.'),
updated_at = CURRENT_TIMESTAMP
WHERE source_file = 'src/ble_reticulum/BLEFragmentation.py'
AND (
symbol_name IN (
'BLEFragmenter',
'__init__',
'fragment_packet',
'get_fragment_overhead',
'BLEReassembler',
'receive_fragment',
'_reassemble',
'cleanup_stale_buffers',
'get_statistics',
'reset_statistics',
'HDLCFramer',
'frame_packet',
'deframe_packet'
)
OR class_name IN ('BLEFragmenter', 'BLEReassembler', 'HDLCFramer')
);
INSERT INTO reviews (
symbol_id,
reviewer,
old_tag,
new_tag,
old_status,
new_status,
note
)
SELECT
symbol_id,
'jlpoole + Codex + ChatGPT',
tag,
tag,
status,
'FIELD_ACCEPTED',
'2026-05-17: C++ fragmentation/reassembly/HDLC backend accepted after live bilateral Constitution transfer. Reboot of devzero1 cleared suspected BLE/hardware lock after earlier 60-second timeout runs. Timeout increased to 90 seconds. Forensic run directory preserved.'
FROM symbols
WHERE source_file = 'src/ble_reticulum/BLEFragmentation.py'
AND (
symbol_name IN (
'BLEFragmenter',
'__init__',
'fragment_packet',
'get_fragment_overhead',
'BLEReassembler',
'receive_fragment',
'_reassemble',
'cleanup_stale_buffers',
'get_statistics',
'reset_statistics',
'HDLCFramer',
'frame_packet',
'deframe_packet'
)
OR class_name IN ('BLEFragmenter', 'BLEReassembler', 'HDLCFramer')
);
COMMIT;