Skip to content

feat: v0.5.47 — x-FuSa spec v1.15.0 adoption + deep-audit bug-fix sprint - #81

Merged
SoundMatt merged 1 commit into
mainfrom
feat/xfusa-v1-15-conformance
Jul 28, 2026
Merged

feat: v0.5.47 — x-FuSa spec v1.15.0 adoption + deep-audit bug-fix sprint#81
SoundMatt merged 1 commit into
mainfrom
feat/xfusa-v1-15-conformance

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

Closes #73, #74, #75, #76, #77, #78, #79. Adopts the actionable parts of #80
(x-FuSa spec v1.15.0).

Fixes found and verified by running cfusa fmea/cfusa tara/cfusa hara/
cfusa sci against c-FuSa's own codebase and diffing real output against
docs/x-fusa-spec.md in FuSaOps (the master spec):

Bonus fix found while dogfooding

cfusa_walk_sources() only skipped a fixed directory-name enum
(build/vendor/build-cov/node_modules). A local working tree with other
build-type variants side by side (build-asan, build_fortify, ...) had
every one of them scanned as project source too, picking up CMake's own
generated CompilerIdC probe as fake FMEA/TARA entries. Now skips any
build/build-*/build_* directory, matching this repo's own .gitignore.

Also fixed a real bug found while writing tests: cfusa_relativize_path()
deliberately does not call realpath() — since cfusa_walk_sources()
always builds path by literally concatenating the given --dir, resolving
symlinks first can silently break the prefix match (macOS aliases /tmp to
/private/tmp).

Regenerated fmea.json/fmea.csv/tara.json/tara.md/safety-case.json/
safety-case.md against the fixes above (dogfooding, same convention as
v0.5.46).

Test plan

  • ctest --test-dir build --output-on-failure — 39/39 passing, including
    13 new regression tests in tests/test_xfusa_v114.c and 2 new
    HARA006 tests in tests/test_safety_rules.c
  • cfusa fmea --dir . --strict / cfusa tara --dir . --strict exit 0
    against this repo's own regenerated artifacts
  • cfusa trace --dir . --gaps shows the same 5 pre-existing gaps as the
    main baseline (no new untested requirements)
  • cfusa check --dir . shows the same 9 pre-existing errors as the
    main baseline (no new findings introduced)
  • Local coverage run (cfusa coverage --lcov ... --threshold 80):
    91.4% line coverage, well above the CI gate
  • Verified the macOS /tmp symlink relativization case manually and via
    a dedicated regression test

Closes issues #73-80 filed by a deep-audit pass that ran c-FuSa against
its own codebase and diffed real output against the x-FuSa master spec.

- HARA006 check rule + hara --format json completeness.asilMismatches:
  risk.asil is now cross-checked against the ISO 26262-3 Table 4 S x E x C
  derivation as a gating Finding, not just a hara-show text warning (#74).
- hara --format json is now a verbatim passthrough of hazards[].source/
  situations/safetyGoals, safetyGoals[].hazards/safeState, and the
  document attestation (#73).
- fmea/tara/sci file/location.file are project-relative (including
  subdirectory) instead of a bare basename or a leaked absolute path,
  regardless of whether --dir is given relative or absolute (#77).
- fmea/tara content generators no longer pick up standard-library calls or
  string-literal text as project components/assets — 18% of this repo's
  own previously-committed fmea.json was stdlib noise (#78).
- fmea/tara 'standard' now emits the canonical lowercase id (iso26262/
  iso21434) instead of a citation string (#75).
- tara impact.* uses the v1.14.1 closed enum (critical/major/moderate/
  negligible); risk is derived from the spec's combination table instead
  of an ad hoc score (#76).
- cfusa fmea --output <file> — previously undefined, so getopt_long's
  prefix matching silently treated it as an abbreviation of --output-dir
  (#79).
- summary.coveragePct defensive clamp on fmea/tara, with regression tests
  using a non-trivial test-source tree (#80 point 3).
- Shared cfusa_is_test_source_file()/cfusa_extract_call_name()/
  cfusa_is_stdlib_call()/cfusa_relativize_path() utilities, replacing
  near-duplicate per-command scanners (#80 point 2's reuse guidance).
- cfusa_walk_sources() now skips any build/build-*/build_* directory
  (matching this repo's own .gitignore), not just a fixed name enum —
  found while dogfooding the fmea/tara fix against this repo's own local
  build trees, which were being scanned as project source.

Regenerated fmea.json/fmea.csv/tara.json/tara.md/safety-case.json/
safety-case.md against the fixes above. Attestation carry-forward (spec
v1.15.0 point 1) was already conformant for fmea/tara/safety-case/sas
before this PR; only hara's own JSON passthrough had a gap, closed above.

Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cfusa found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

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.

hara --format json is not a verbatim passthrough of .fusa-hara.json — drops cross-references and attestation

2 participants