From 6ccbcf1be96a67c6c0e5f49f5570c7ad84a4f1e1 Mon Sep 17 00:00:00 2001 From: Matt Jones <47545907+SoundMatt@users.noreply.github.com> Date: Tue, 28 Jul 2026 21:45:13 -0700 Subject: [PATCH] =?UTF-8?q?chore:=20v0.47.0=20=E2=80=94=20declare=20x-FuSa?= =?UTF-8?q?=20spec=20v1.15.2=20conformance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both intervening spec releases (1.15.0 -> 1.15.1 -> 1.15.2) are pure documentation clarifications per §14 of the spec changelog, with no wire-format or required-behavior change: - v1.15.1 blessed the already-in-use MAJOR.MINOR.PATCH form as the correct schemaVersion/specVersion value (a tool emits its SpecVersion constant verbatim; compatibility is still judged on the MAJOR.MINOR prefix only). - v1.15.2 added an explicit worked example to §1.6.1 Rule A with no rule change. While confirming this, found that go-FuSa's own SchemaVersion() helper truncated to a MAJOR.MINOR prefix instead of emitting SpecVersion verbatim, so fmea.json/tara.json/.fusa-hara.json/safety-case.json/ sas.json/sci.json emitted "schemaVersion": "1.15" while every other document (check/trace/qualify/report/gap-reports/sbom/provenance/ audit-pack/capabilities) already emitted the full patch version. Fixed SchemaVersion() to return SpecVersion unmodified, aligning all document kinds on the spec-blessed form. Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com> --- CHANGELOG.md | 22 ++++++++++++++++++++++ README.md | 2 +- docs/tool-safety-manual.md | 2 +- fusa.go | 23 +++++++++++------------ fusa_test.go | 10 +++------- 5 files changed, 38 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e25d696..0c40f14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,28 @@ Dates reference the merged commit timestamp. ## [Unreleased] +## v0.47.0 — 2026-07-28 (declare x-FuSa spec v1.15.2 conformance) + +### Changed +- **`SpecVersion` bumped from `1.15.0` to `1.15.2`.** Both intervening spec + releases are pure documentation clarifications with no wire-format or + required-behavior change (§14 Changelog): v1.15.1 blessed the + already-in-use `MAJOR.MINOR.PATCH` form as the correct `schemaVersion`/ + `specVersion` value (a tool emits its `SpecVersion` constant verbatim; + compatibility is still judged on the `MAJOR.MINOR` prefix only), and + v1.15.2 added an explicit worked-example to §1.6.1 Rule A with no rule + change. + +### Fixed +- **`SchemaVersion()` now emits the full `MAJOR.MINOR.PATCH` `SpecVersion` + verbatim instead of a truncated `MAJOR.MINOR` prefix** (x-FuSa spec §3.2 + "schemaVersion semantics", MUST, clarified in v1.15.1). `fmea.json`, + `tara.json`, `.fusa-hara.json`, `safety-case.json`, `sas.json`, and + `sci.json` were emitting `"schemaVersion": "1.15"` while every other document + (`check`/`trace`/`qualify`/`report`/gap-reports/`sbom`/`provenance`/ + audit-pack/`capabilities`) already emitted the full patch version — this + aligns all document kinds on the one correct, spec-blessed form. + ## v0.46.0 — 2026-07-28 (deep-audit round 2: standard ids, SARIF, tara/qualify/audit-pack) ### Fixed diff --git a/README.md b/README.md index d825d24..9ced98c 100644 --- a/README.md +++ b/README.md @@ -285,7 +285,7 @@ docker build -t go-fusa . docker run --rm -v "$(pwd)":/project go-fusa check ``` -Published tags: `latest`, `0.46`, `0.46.0` (and matching semver for every release). +Published tags: `latest`, `0.47`, `0.47.0` (and matching semver for every release). ## Standards coverage diff --git a/docs/tool-safety-manual.md b/docs/tool-safety-manual.md index ae4399e..9351769 100644 --- a/docs/tool-safety-manual.md +++ b/docs/tool-safety-manual.md @@ -1,6 +1,6 @@ # go-FuSa Tool Safety Manual -**Version:** 0.46.0 +**Version:** 0.47.0 **Module:** `github.com/SoundMatt/go-FuSa` **License:** Mozilla Public License 2.0 **Standards addressed:** ISO 26262, IEC 61508, ISO 21434, DO-178C diff --git a/fusa.go b/fusa.go index 48f028b..134a5ef 100644 --- a/fusa.go +++ b/fusa.go @@ -23,21 +23,20 @@ import ( ) // Version is the current release of go-FuSa. -const Version = "0.46.0" +const Version = "0.47.0" // SpecVersion is the x-FuSa spec version this release implements. -const SpecVersion = "1.15.0" - -// SchemaVersion returns the MAJOR.MINOR prefix of SpecVersion, the value -// every report document's "schemaVersion" header field (§2.8/§3.1) MUST -// carry — the spec version a document *conforms to*, one level less precise -// than the tool's own SpecVersion (§9.1 `version --format json`). +const SpecVersion = "1.15.2" + +// SchemaVersion returns the value every document's "schemaVersion" header +// field (§3.1/§3.2) MUST carry — the spec version a document *conforms to*, +// emitted as the tool's full MAJOR.MINOR.PATCH SpecVersion verbatim (§3.2 +// "schemaVersion semantics", clarified in spec v1.15.1: a PATCH component is +// never itself a compatibility signal, so a consumer MUST compare only the +// MAJOR.MINOR prefix, but the emitted value carries all three components +// unmodified — no truncation). func SchemaVersion() string { - parts := strings.SplitN(SpecVersion, ".", 3) - if len(parts) < 2 { - return SpecVersion - } - return parts[0] + "." + parts[1] + return SpecVersion } // Exit codes (§2.3). diff --git a/fusa_test.go b/fusa_test.go index b296c62..69f06da 100644 --- a/fusa_test.go +++ b/fusa_test.go @@ -426,17 +426,13 @@ func TestAttestationValid(t *testing.T) { } //fusa:test REQ-ATT001 -func TestSchemaVersion_IsMajorMinor(t *testing.T) { +func TestSchemaVersion_IsFullSpecVersionVerbatim(t *testing.T) { got := fusa.SchemaVersion() - parts := strings.Split(got, ".") - if len(parts) != 2 { - t.Errorf("SchemaVersion() = %q, want MAJOR.MINOR (2 dot-separated parts)", got) - } if strings.Count(fusa.SpecVersion, ".") < 2 { t.Fatalf("SpecVersion %q is expected to be MAJOR.MINOR.PATCH for this test to be meaningful", fusa.SpecVersion) } - if !strings.HasPrefix(fusa.SpecVersion, got+".") { - t.Errorf("SchemaVersion() = %q is not a prefix of SpecVersion %q", got, fusa.SpecVersion) + if got != fusa.SpecVersion { + t.Errorf("SchemaVersion() = %q, want SpecVersion %q emitted verbatim (§3.2 schemaVersion semantics, spec v1.15.1+)", got, fusa.SpecVersion) } }