Skip to content

feat: add hex input to latch-dump - #25

Merged
TheusHen merged 1 commit into
laststate:prodfrom
tomatotomata:codex/hex-input-latch-dump-11
Jul 29, 2026
Merged

TheusHen merged 1 commit into
laststate:prodfrom
tomatotomata:codex/hex-input-latch-dump-11

Conversation

@tomatotomata

Copy link
Copy Markdown
Contributor

Summary

  • add a bounded latch-dump --hex mode that accepts ASCII whitespace between byte pairs
  • reject odd-length, non-hex, and over-limit input with explicit diagnostics
  • add portable CTest/Python coverage for valid hex, invalid input, oversized input, and the existing binary path
  • document the new host-tool usage

The default binary-file path remains unchanged. Hex decoding writes directly into a buffer bounded by LS_MAX_EVENT_SIZE, so oversized input is rejected before envelope validation or any unbounded allocation.

Validation

  • python -m py_compile tests/test_latch_dump.py
  • git diff --check
  • CMake build and CTest are delegated to repository CI because CMake/C compiler tooling is not installed in this environment

Fixes #11

@github-actions github-actions Bot added documentation Documentation improvements tests Tests, vectors, simulators, and qualification evidence ci Build, packaging, and repository automation size/m 50-249 changed lines labels Jul 29, 2026
@tomatotomata
tomatotomata force-pushed the codex/hex-input-latch-dump-11 branch from 94322bc to ced64de Compare July 29, 2026 16:44
@github-actions github-actions Bot added tooling Host tools and developer utilities build CMake, package consumers, and toolchains size/m 50-249 changed lines and removed size/m 50-249 changed lines labels Jul 29, 2026
@TheusHen
TheusHen force-pushed the codex/hex-input-latch-dump-11 branch from ced64de to a9e0518 Compare July 29, 2026 16:49
@github-actions github-actions Bot added size/m 50-249 changed lines and removed size/m 50-249 changed lines labels Jul 29, 2026

@TheusHen TheusHen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @ahmadalguydi — this is a useful and well-scoped contribution.

I reviewed the parser, CLI behavior, bounds, diagnostics, tests, documentation, and the unchanged binary path. Because #10 landed after this work started, I rebased the branch onto the current prod and resolved the README/CMake divergence without reverting the public-launch changes.

During the rebase I made a few small maintainer adjustments: deterministic ASCII-whitespace handling, correct usage for --hex without a file, one shared envelope validation/output path for binary and hex input, and additional coverage for the missing-argument and binary-output cases.

Validation is complete: 28/28 tests passed locally, including latch-dump-hex-tests, and the full GitHub matrix is green, including the required gate, multiplatform CI, CodeQL, quality, coverage, cross-toolchains, reproducibility, dependency checks, Rust, and libFuzzer.

The implementation is bounded, keeps the existing binary interface compatible, and satisfies #11. Approved.

@TheusHen TheusHen added the protocol LEP encoding, decoding, and compatibility label Jul 29, 2026
@TheusHen
TheusHen merged commit 59931de into laststate:prod Jul 29, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build CMake, package consumers, and toolchains ci Build, packaging, and repository automation documentation Documentation improvements protocol LEP encoding, decoding, and compatibility size/m 50-249 changed lines tests Tests, vectors, simulators, and qualification evidence tooling Host tools and developer utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add .hex input support to latch-dump

2 participants