Skip to content

fix: v0.35.0 — x-FuSa spec conformance (config schema, init reqs, qualify enum, audit-pack manifest) - #53

Merged
SoundMatt merged 1 commit into
mainfrom
fix/xfusa-conform-49-52
Jul 28, 2026
Merged

fix: v0.35.0 — x-FuSa spec conformance (config schema, init reqs, qualify enum, audit-pack manifest)#53
SoundMatt merged 1 commit into
mainfrom
fix/xfusa-conform-49-52

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

Closes #49, #50, #51, #52 — all four found via fusaops conform gofusa against go-FuSa 0.34.0.

Also registered REQ-CFG009 and REQ-QUALIFY010 in .fusa-reqs.json for the new tagged behaviour — gofusa trace reports 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/ProjectConfig new 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 ./... — clean
  • go generate ./... — no diff
  • gofusa trace --dir . — 0 orphan tags, 0/365 requirements untested, 100% function-tag coverage
  • Manually reproduced and confirmed the fix for all four issues' repro steps from a built binary
  • Added regression tests for each fix (config spec-shape Load/Save round-trip, init creating .fusa-reqs.json with/without a pre-existing .fusa.json, qualify results[].result enum + JSON round-trip, audit-pack manifest.json entry name)

…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>
Comment thread cmd/gofusa/cmd_init.go
// 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 {
Comment thread cmd/gofusa/cmd_init.go
}

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 {
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.

config.Config's .fusa.json schema does not match x-FuSa spec §1.2.1 — breaks cross-tool interop and check --format json on spec-compliant configs

2 participants