Skip to content

fix: library compiles again — two spec defects + regenerated gen/rust - #94

Closed
gHashTag wants to merge 2 commits into
mainfrom
fix/regenerate-rust
Closed

fix: library compiles again — two spec defects + regenerated gen/rust#94
gHashTag wants to merge 2 commits into
mainfrom
fix/regenerate-rust

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

main has not compiled since 2026-07-23: 32 errors across 9 generated modules. This fixes our half. Companion: gHashTag/t27#1573 (the Rust backend).

Stacked on #93 (cargo fmt), which must land first.

Result

  • library: 32 errors → 0
  • cargo test --lib: 101 passed, 0 failed
  • cargo fmt --all --check: clean

Two defects were ours, not the generator's

specs/multipath_routing.t27:128 — a duplicated comparison:

if (get_path_valid(get_multipath(path_array, 3)) == path_valid == PATH_VALID) {

path_valid in lower case does not exist; the constant is PATH_VALID. The generator reproduced the typo faithfully — which is exactly what a spec-first toolchain should do. Corrected to a single comparison.

specs/etx.t27:45fp_mul(256 - alpha, est) with alpha: u8. 256 does not fit in u8. The Q0.8 complement is 255 - alpha.

⚠️ This one needs your eye. It shifts the EWMA weight by 1/256. 255 - alpha is the standard 8-bit complement and is what the signature forces, but if the intent was exact 1.0 = 256 then fp_mul should widen instead. I did not assume.

Newly visible: three binaries import modules that do not exist

These were masked while the library itself was broken. cargo build still fails on them (24 errors):

Binary Missing
src/bin/tri_rti.rs rti, tri_beamform, tri_video_fusion — no such files anywhere in the repo
src/bin/trios_meshd_video.rs video_bridge — exists as gen/rust/video_bridge.rs, never wired into src/lib.rs
src/bin/smoke_m1.rs Handshake, MeshError, Node re-exports
src/bin/trios_meshd.rs implements send/recv against a Transport trait that declares them, but with a mismatched signature (E0407)

video_bridge looks like a one-line wiring fix. The other three binaries reference code that was never committed or was deleted; writing it is authorship, not repair, so I left them alone.

🤖 Generated with Claude Code

Dmitrii Vasilev and others added 2 commits July 31, 2026 14:27
`cargo fmt --all --check` has been failing on main since 2026-07-23 and
blocks every PR, including documentation-only ones. Formatter output only,
three files, no logic changes.

Does not make CI green on its own: `cargo build` fails separately with 31
errors in tracked generated code under gen/rust/ (26x E0107 bare `Vec`,
E0425 lowercase constant reference, 3x E0308, E0277). That is a generator
defect and belongs upstream in the Rust backend.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… backend

The library did not compile: 32 errors across 9 generated modules, CI red
since 2026-07-23. Root cause was split between the t27 Rust backend and
two genuine defects in our own specs. The backend half is
gHashTag/t27#1573. This commit carries our half plus the regenerated
output.

Spec defect 1, specs/multipath_routing.t27:128 — a duplicated comparison:

    if (get_path_valid(...) == path_valid == PATH_VALID)

`path_valid` in lower case does not exist; the constant is PATH_VALID.
The generator reproduced the typo faithfully, which is the behaviour we
want from it. Corrected to a single comparison.

Spec defect 2, specs/etx.t27:45 — `fp_mul(256 - alpha, est)` where alpha
is u8. 256 does not fit in u8. The Q0.8 complement is 255 - alpha, which
is what the code now says. This changes the numeric contract by 1/256 in
the EWMA weight; flagged for review rather than assumed correct.

Regenerated all 86 modules with the fixed backend. Result: the library
compiles clean and 101 library tests pass.

Still red, and now visible for the first time: three binaries import
modules that do not exist anywhere in the repository — tri_rti.rs wants
`rti`, `tri_beamform` and `tri_video_fusion`, trios_meshd_video.rs wants
`video_bridge` (which exists only as generated code, unwired), and
smoke_m1.rs wants `Handshake`, `MeshError` and `Node` re-exports. Those
failures were masked while the library itself was broken. Not addressed
here: writing the missing modules is authorship, not repair.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gHashTag

Copy link
Copy Markdown
Owner Author

Включено в #97, который смержен: там и cargo fmt, и исправления генератора с перегенерацией. Закрываю в его пользу.

@gHashTag gHashTag closed this Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant