Skip to content

fix: 2026-07-30 audit pass — diagnostic-frame routing, E2E gap re-sync, spec/doc drift, HARA ASIL correction - #39

Merged
SoundMatt merged 1 commit into
mainfrom
fix/audit-20260730-fixes
Jul 30, 2026
Merged

fix: 2026-07-30 audit pass — diagnostic-frame routing, E2E gap re-sync, spec/doc drift, HARA ASIL correction#39
SoundMatt merged 1 commit into
mainfrom
fix/audit-20260730-fixes

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

Applies the externally-generated x-Net audit fixes for rust-LIN confirmed genuine after independent review (diff-by-diff cross-check against the findings, own build/test, and independent re-derivation of the ASIL question against ISO 26262-3:2018 Table 4).

  • rust-LIN-01 (Critical): Bus::publish hardcoded Enhanced checksum, but validate_frame requires Classic for diagnostic frames (0x3C/0x3D) per ISO 17987 / RELAY §15.3 — diagnostics were unreachable through the documented API. publish_with_type now auto-selects Classic for 0x3C/0x3D. Added an end-to-end regression test.
  • rust-LIN-03: SPEC_VERSION/RELAY_SPEC_VERSION bumped 1.11 → 2.0 to match the governing spec, plus doc references. Also fixed a CI smoke-test assertion (ci.yml) that hardcoded the old value and would have broken post-bump.
  • rust-LIN-06/07/08: safety-artifact version headers and test/requirement counts were stale (v0.2.0 / 94 reqs / 140 tests vs actual v0.4.1 / 99 reqs / 155 tests). Corrected, with history preserved as separate version-history rows.
  • rust-LIN-09: E2E Receiver::unwrap advanced last_seq on a detected sequence gap before returning the error, so only the first out-of-order frame in a burst was reported. Fixed to report every gap.
  • rust-LIN-10: documented that CLI send/subscribe each use an independent in-process bus and cannot round-trip across processes.
  • rust-LIN-11: convert now emits the real RELAY sentinel ErrInvalidFrame instead of the non-spec INVALID_ARGUMENT.
  • rust-LIN-N2-01: .fusa-hara.json blanket-assigned ASIL-B to all 12 hazards. Independently re-derived every hazard against ISO 26262-3:2018 Table 4 (not the project's own tooling) — confirmed max per-hazard ASIL is A. This creates a real contradiction with the project's ASIL-B SEOOC claim; flagged explicitly in safety-case.md as an open safety-case item rather than silently resolved, since choosing between downgrading the classification vs. re-justifying the HARA risk parameters is a safety-engineer decision.

Not applied (advisory / no diff / broader design work, per the audit register): rust-LIN-02, -04, -05, -12, -N2-02. Left open.

Version bumped 0.4.1 → 0.4.2 (bugfix + doc-drift release, no public API break).

Test plan

  • cargo build --all-targets
  • cargo test — 156 tests (108 unit + 46 integration + 2 doc), 0 failed
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo fmt --check — clean
  • cargo build --release --bin rust-lin --locked + reproduced the CI smoke-test script locally
  • relay conform --strict and relay interop (LIN vectors) reproduced locally with the pinned relay@v1.11.0 CLI — both pass

…c, spec/doc drift, HARA ASIL correction

Applies the x-Net audit findings confirmed genuine for this repo:

- rust-LIN-01 (Critical): Bus::publish hardcoded Enhanced checksum, but
  validate_frame rejects diagnostic frames (0x3C/0x3D) not using Classic
  per ISO 17987 / RELAY §15.3, making diagnostics unreachable through the
  documented trait API. publish_with_type now auto-selects Classic for
  0x3C/0x3D regardless of caller-requested type. Added an end-to-end
  round-trip regression test through send_header.
- rust-LIN-03: RELAY spec target was declared v1.11; the governing spec is
  v2.0. Updated SPEC_VERSION/RELAY_SPEC_VERSION and doc references.
  Consequently fixed a CI smoke-test assertion in ci.yml that hardcoded
  the old spec_version string and would have failed post-bump.
- rust-LIN-06/07/08: safety-artifact version headers (BOUNDARY_DIAGRAM,
  SAFETY_MANUAL, SAFETY_PLAN, safety-case, DO178C_ALIGNMENT) and test/
  requirement counts were stale (pinned to v0.2.0 / 94 reqs / 140 tests)
  against the actual v0.4.1 / 99 reqs / 155 tests. Corrected, with the
  new baseline recorded as its own version-history entry rather than
  overwriting history.
- rust-LIN-09: Receiver::unwrap advanced last_seq on a detected sequence
  gap before returning the error, so only the first out-of-order frame in
  a burst was reported and subsequent frames silently re-synced. Removed
  the advance so every gap is reported until a frame that is genuinely
  last_seq+1 arrives.
- rust-LIN-10: CLI send/subscribe each construct an independent in-process
  VirtualBus and cannot round-trip across two processes. Documented the
  limitation in the README quickstart instead of implying they pair up.
- rust-LIN-11: `convert` wrote the non-spec sentinel `INVALID_ARGUMENT` to
  stderr on invalid input; RELAY §11.2 requires the actual sentinel name.
  Now emits `ErrInvalidFrame`.
- rust-LIN-N2-01: .fusa-hara.json blanket-assigned ASIL-B to all twelve
  hazards regardless of S/E/C. Independently re-derived each hazard's
  ASIL from ISO 26262-3:2018 Table 4 (not from any project tool's own
  output) and confirmed the corrected values: several compute to QM,
  the rest to ASIL-A — none reach ASIL-B. This creates a real, unresolved
  contradiction with the project's ASIL-B SEOOC claim; flagged explicitly
  in safety-case.md rather than silently changed, since resolving it is a
  safety-engineer classification decision, not a mechanical edit.

Not applied (advisory, no diff / requires broader design work, per the
audit register): rust-LIN-02, -04, -05, -12, -N2-02.

Version bumped 0.4.1 -> 0.4.2 (bugfix + doc-drift release; no public API
break) with matching updates to the safety-artifact version headers this
same change set just corrected, to avoid reintroducing the drift.

Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit c426db6 into main Jul 30, 2026
7 checks passed
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