Skip to content

Fix CLI and bounded input contracts; execute bit-exact floating IR - #333

Merged
LunaStev merged 8 commits into
wavefnd:masterfrom
LunaStev:feat/eight-batch-correctness
Oct 21, 2026
Merged

LunaStev merged 8 commits into
wavefnd:masterfrom
LunaStev:feat/eight-batch-correctness

Conversation

@LunaStev

@LunaStev LunaStev commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Fix 21 approved issues in eight DCO-signed commits. The changes make CLI reporting fallible, validate portable backend artifact sets, correct bounded archive/ELF ingestion and static AMD64 inspection, align IR validation, and execute exact floating values, storage, bitcasts and comparisons.

Commit Batch Issues
1 CLI output and structured diagnostic rendering #310, #316, #322
2 Portable backend artifact paths #311, #312, #313
3 Archive member selection and shared string budgets #320, #321
4 ELF object input and target diagnostics #314, #329
5 Wave stack decoding and static executable inspection #323, #324, #325, #326
6 IR parser, verifier and builder consistency #315, #327, #328
7 Bit-exact f16/f32/f64 values, tracked storage and scalar bitcasts #263, #268
8 NaN-aware comparison contract and execution #198, #265

Batch 7 was implemented, tested and committed before batch 8. Each batch has exactly one commit; this is the only PR for the eight batches.

Motivation

The retained regressions reproduce closed-stdout panics, misleading resource diagnostics, path collisions, lost archive members, undercounted names, rejected valid ELF metadata, incorrect PUSH boundaries, inconsistent IR validation, and unsupported floating execution. Negative controls preserve malformed-input rejection, resource ceilings, atomic output publication, pointer/callable authority and meaningful command failures.

Closes #310, closes #316, closes #322.
Closes #311, closes #312, closes #313.
Closes #320, closes #321.
Closes #314, closes #329.
Closes #323, closes #324, closes #325, closes #326.
Closes #315, closes #327, closes #328.
Closes #263, closes #268.
Closes #198, closes #265.

Target and compatibility impact

  • Backend artifacts require Windows-compatible components and ASCII-case-distinct paths without file/directory ancestor conflicts. Valid Unicode names retain their spelling; Unicode case folding is not applied.
  • Object serialization still supports little-endian ELF64 for AMD64, AArch64, RV64I and LoongArch64. Static linking and reverse decoding retain their AMD64 scope.
  • Decoder/CFG computation remains in actual Wave; Rust handles CLI, ELF/file handling and FFI. The opt-in native reverse core initially runs on Linux x86_64. Ordinary Cargo builds still need neither Wave nor LLVM and explicitly report unavailable analysis. The pinned LLVM bootstrap is retained.
  • Static inspection keeps zero-sized boundary markers as non-code metadata, omits STT_TLS offsets explicitly, and accepts pure-BSS conceptual file offsets without materializing BSS.
  • The interpreter preserves f16/f32/f64 storage bits, NaN payloads and signed zero across values, calls, tracked memory and equal-width integer/float bitcasts. Floating CLI arguments/results use exact-width hexadecimal bits. Numeric casts and floating arithmetic remain separate follow-ups.
  • Generic float equality/order are ordered predicates; inequality is unordered-or-not-equal and exactly negates equality. Explicit ordered/unordered predicates and constant evaluation share this contract. Comparison evaluates IEEE bit encodings without host floating conversion or exceptions.
  • No native IR backend, source recovery, extra ISA, optimization or release work is included. MSRV remains Rust 1.86.

Validation

Linux x86_64; stable Rust 1.96.0 and MSRV Rust 1.86.0. Commands use the committed lockfile, offline dependencies and two build jobs locally. All results below passed against the final integrated tree; test counts include unit/integration tests and doctests and are reported separately per configuration.

Configuration Passed Intentionally ignored
cargo test --workspace --locked --offline --jobs 2 481 4
cargo test --workspace --all-features --locked --offline --jobs 2 without Wave 549 4
cargo +1.86.0 test --workspace --all-features --locked --offline --jobs 2 549 4
All-feature workspace tests with the freshly built actual Wave core 574 4
  • cargo fmt --all -- --check, default/all-feature cargo clippy --workspace --all-targets --locked --offline --jobs 2 -- -D warnings, and RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --locked --offline --jobs 2 passed.
  • Default/all-feature workspace builds and standalone CLI smoke passed with an empty PATH; optimized all-feature workspace build and release CLI smoke also passed.
  • Python tool tests: 42 passed. The CI-pinned actionlint 1.7.12 passed after checksum verification.
  • Bounded assembler/object/IR/AST mutations: 512 cases per target; independent object campaign: 10,000 mutations. Schema/decoder agreement: 77 cases across AST versions 2/3/4. Independent tracked-memory campaign: 256 cases (the normally ignored generated campaign was run explicitly).
  • Rebuilt from the final kernel using LLVM_SYS_211_PREFIX=/usr/lib64/llvm21 python3 tools/build_wave_reverse.py --wave-source /mnt/hdd/Wave --out-dir /tmp/whale-21-agent-wave --rust-toolchain 1.89. The separate Wave checkout was read only; bootstrap revision remains e0952ed65d07e14c6ed0aa64f3c9a5532dd7533b.
  • Actual Wave: 11 valid fixtures plus 100,000 mutations under 512 MiB/300-second limits; a final integrated 10,000-mutation campaign also passed. Native all-target/all-feature Clippy passed. GNU/LLVM disassembly agrees with the PUSH/CFG boundaries; GNU plain/TLS/pure-BSS and archive-member executables exited 42 and inspected successfully.
  • Exhaustive binary16 storage/copy and numerical comparison vectors passed, alongside f32/f64 payload/initialization/alignment/authority cases. An independent Python IEEE oracle matched 27,120 explicit/generic predicate results over 1,356 pairs; an additional 204 independent bitcast/storage CLI roundtrips passed.

GitHub CI: 27/27 checks passed on 3c4219ddd0295de88d257d076475a87d2a4806d6, including all six native host matrices, both MSRV configurations, optimized tests, coverage, QEMU, quality checks and both actual Wave workflows. No merge, release publication, or deployment is part of this PR.

Checklist

  • Eight commits include DCO Signed-off-by trailers and preserve existing attribution.
  • Tests cover the changed behavior, including malformed-input and authority controls.
  • Public behavior and support boundaries are documented.
  • Final diff reviewed; unrelated formatting and refactors excluded.
  • Applicable license notices preserved and repository policies reviewed.

Handle broken stdout without panicking or hiding artifact command failures, escape control characters only at the diagnostic rendering boundary, and identify each link byte-limit flag correctly.

Refs wavefnd#310, wavefnd#316, wavefnd#322

Signed-off-by: LunaStev <luna@lunastev.org>
Reject component ancestor conflicts and ASCII case collisions in either order, and validate Windows-compatible path components before returning artifacts. Preserve valid Unicode paths and original display spelling.

Refs wavefnd#311, wavefnd#312, wavefnd#313

Signed-off-by: LunaStev <luna@lunastev.org>
Resolve wavefnd#320 and wavefnd#321 by recognizing exact BSD index names and charging member-name inspection plus ownership to cumulative reader limits.

Signed-off-by: LunaStev <luna@lunastev.org>
Resolve wavefnd#314 and wavefnd#329 while retaining raw reader limits and AMD64-only consumer validation.

Signed-off-by: LunaStev <luna@lunastev.org>
Resolve wavefnd#323, wavefnd#324, wavefnd#325 and wavefnd#326 with effective REX.W stack decoding, non-code boundary metadata, explicit TLS symbol omission and zero-file-size PT_LOAD handling.

Signed-off-by: LunaStev <luna@lunastev.org>
Keep function body, declaration, and global diagnostic locations in their own namespaces. Reject pointer division/remainder and function link names already used by global storage without consuming identities.

Refs wavefnd#315, wavefnd#327, wavefnd#328

Signed-off-by: LunaStev <luna@lunastev.org>
Preserve f16/f32/f64 storage bits through runtime values, tracked memory,
globals and Whale calls. Execute equal-width integer/float bitcasts without
changing NaN payloads or pointer authority; expose exact hexadecimal CLI
arguments and results.

Closes wavefnd#263
Closes wavefnd#268

Signed-off-by: LunaStev <luna@lunastev.org>
Map generic equality and ordering to ordered predicates, and generic inequality
to unordered-or-not-equal. Share this contract between constant evaluation and
runtime execution, with integer IEEE comparison that preserves NaN payloads
and avoids host floating exceptions. Execute all explicit ordered/unordered
predicates and document the public mapping and executable examples.

Closes wavefnd#198
Closes wavefnd#265

Signed-off-by: LunaStev <luna@lunastev.org>
@LunaStev
LunaStev merged commit 00c87fc into wavefnd:master Oct 21, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment