fix(diagnostics): bound formatting and release ingress before callbacks

Bound UTF-8 formatting and release diagnostic ingress before invoking
callbacks. Check error-ID collisions at Rust/C++ release final link.

Validation: diagnostic tests, strict Clippy, Miri and final-link cases.
This commit is contained in:
Onur Özkan committed 2026-11-07 18:12:11 +03:00
1 parent 3226ef97fe
commit 84807dde4e
12 files changed
+547 -48

No files matched your search

+8 -1
View File
@@ -1,5 +1,6 @@
override SHELL := /bin/sh
override MAKEFLAGS += --no-print-directory
export CARGO_BUILD_JOBS ?= 2
.DEFAULT_GOAL := help
.DELETE_ON_ERROR:
@@ -29,7 +30,7 @@ ifeq ($(PRIMARY_GOAL),run)
else
.PHONY: help run fmt clippy test docs pre-commit check clean
.PHONY: help run fmt clippy test native-test docs pre-commit check clean
help:
@printf '%s\n' 'Usage: make firmware -- <cargo arguments...>' '' \
@@ -38,6 +39,7 @@ help:
' fmt Check Rust formatting' \
' clippy Run host and embedded Clippy checks' \
' test Run Rust and firmware script tests' \
' native-test Check cross-crate error IDs at Rust/C++ release final link' \
' docs Build Rust API documentation with warnings denied' \
' pre-commit Run fmt, clippy, test, and docs' \
' check Alias for pre-commit' \
@@ -58,6 +60,11 @@ test:
$(CARGO) test --workspace $(CARGO_FLAGS)
$(PYTHON) -m unittest \
scripts/test-analyze-fw.py scripts/test-summarize-test-coverage.py
+@$(MAKE) native-test
native-test:
python3 libs/kaptan-err-reportable-macros/tests/final_link.py \
--work-dir "$(or $(CARGO_TARGET_DIR),target)/native-tests/final-link"
docs:
RUSTDOCFLAGS='-D warnings' $(CARGO) doc --workspace --no-deps \