fix: v0.35.0 — x-FuSa spec conformance (config schema, init reqs, qualify enum, audit-pack manifest) - #53
Merged
Merged
Conversation
…lify enum, audit-pack manifest) Closes #49, #50, #51, #52 - config.Config now accepts and writes both go-FuSa's legacy .fusa.json shape and x-FuSa spec §1.2.1's documented shape (configVersion, top-level standard/asil/sil/dal, legacy flat "project" string). Validate no longer hard-rejects a config missing go-FuSa's own "version" field when configVersion is present, so a spec-compliant .fusa.json from another x-FuSa tool now loads correctly. - init now creates .fusa-reqs.json (with {"requirements": []}) alongside .fusa.json, per spec §9.1, operating per file: it creates whichever target is missing and leaves an existing one untouched. - qualify.Result now carries the spec §6 results[].result PASS/FAIL/SKIP/ ERROR enum string, alongside the existing Passed bool. - audit-pack now writes the spec §8 lowercase manifest.json instead of AUDIT-MANIFEST.json. Registered REQ-CFG009 and REQ-QUALIFY010 for the new behaviour; gofusa trace reports zero orphan tags and zero test-coverage gaps. Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
| // is missing and leaves an existing one untouched, rather than failing | ||
| // outright whenever any one of them is already present. | ||
| wroteConfig := false | ||
| if _, err := os.Stat(cfgPath); err == nil { |
| } | ||
|
|
||
| wroteReqs := false | ||
| if _, err := os.Stat(reqsPath); err == nil { |
| if code != 0 { | ||
| t.Fatalf("runInit exit %d: %s", code, errBuf.String()) | ||
| } | ||
| if _, err := os.Stat(filepath.Join(dir, ".fusa-reqs.json")); err != nil { |
This was referenced Jul 28, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #49, #50, #51, #52 — all four found via
fusaops conform gofusaagainst go-FuSa 0.34.0.config.Configonly read/wrote go-FuSa's own proprietary.fusa.jsonshape (top-level"version","standard"/"asil"/"sil"nested under"project"), andValidatehard-rejected any config missing the non-spec"version"field. A fully spec-compliant.fusa.json(§1.2.1:configVersion, top-levelstandard/asil) from another x-FuSa tool madecheck/report/etc. fail outright.Confignow also carries the spec's top-levelconfigVersion/standard/asil/sil/dalfields and accepts the spec's legacy flat"project": "name"string;Load/Savenormalise between the two shapes (case-insensitively canonicalising the standard id onto go-FuSa's internal enum), andValidateaccepts eitherversionorconfigVersion.init's output now satisfies both shapes at once.initnever created.fusa-reqs.json, contrary to spec §9.1.initnow creates whichever of.fusa.json/.fusa-reqs.jsonis missing and leaves an existing one untouched, per the spec's per-file semantics, rather than failing outright whenever.fusa.jsonalone already existed.qualify --output's JSON shaped each case as{"passed": true}only; spec §6 requiresresults[].result: "PASS"|"FAIL"|"SKIP"|"ERROR".qualify.Resultnow carries both fields (Passedkept for existing callers/CLI text output).audit-packwroteAUDIT-MANIFEST.json; spec §8 requires the lowercase, case-sensitivemanifest.json. Renamed the ZIP entry (now exported asauditpack.ManifestFile).Also registered
REQ-CFG009andREQ-QUALIFY010in.fusa-reqs.jsonfor the new tagged behaviour —gofusa tracereports zero orphan tags and zero test-coverage gaps against this branch. Bumped to v0.35.0 (new exported API surface:qualify.Result{Pass,Fail,Skip,Error},auditpack.ManifestFile,config.Config/ProjectConfignew fields) and updated README/tool-safety-manual version references for the "Doc version check" CI gate.Test plan
go build ./...go test ./...— all packages pass, zero regressions, 89.7% total coverage (gate: 80%)gofmt -l ./go vet ./.../golangci-lint run ./...— cleango generate ./...— no diffgofusa trace --dir .— 0 orphan tags, 0/365 requirements untested, 100% function-tag coverage.fusa-reqs.jsonwith/without a pre-existing.fusa.json, qualifyresults[].resultenum + JSON round-trip, audit-packmanifest.jsonentry name)