Skip to content

Fix Spectral artifact finding attribution - #688

Closed
LarryHu0217 wants to merge 1 commit into
camaraproject:mainfrom
LarryHu0217:codex/spectral-attribution-684
Closed

Fix Spectral artifact finding attribution#688
LarryHu0217 wants to merge 1 commit into
camaraproject:mainfrom
LarryHu0217:codex/spectral-attribution-684

Conversation

@LarryHu0217

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • correction

What this PR does / why we need it:

The Artifacts Lint workflow currently passes all four templates to one Spectral invocation. Shared $ref targets trigger stoplightio/spectral#2640, producing 152 results with 143 missing their source and hiding six genuine findings from the reported subset.

This runs Spectral once per template and deduplicates the JSON results by file, line, and rule. The formatter reads the pinned S-313 suppress_schema_paths metadata, summarizes the ten documented common-library findings as two notices, and leaves the other five findings as individual warnings at their real source locations. The resulting log and annotations consistently account for all 15 unique findings.

Which issue(s) this PR fixes:

Fixes #684

Does this PR introduce a breaking change?

  • Yes
  • No

Special notes for reviewers:

The formatter tests cover source normalization, duplicate suppression, allowlist-only grouping, native severity mapping, and GitHub annotation escaping. The workflow continues to block only on error-level findings.

Changelog input

Fix Spectral source attribution and annotation accounting in the common-artifact lint workflow.

Additional documentation

The artifacts linting README now documents per-template Spectral execution, deduplication, and S-313 baseline notices.

@rartych

rartych commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Thank you for the thorough work and tests here.

I'm closing this PR in favor of #685, which implements the same core fix (run Spectral per-template, dedupe results, and collapse the documented baseline into notice annotations) while also pulling the authoritative S-313 allowlist from the tooling repo and adding the expected-findings documentation (the single-source-of-truth).

Your formatter tests are valuable; they could be considered for inclusion in the future, if needed.

@rartych rartych closed this Jul 31, 2026
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.

Artifacts Lint: Spectral step loses finding attribution and under-reports the real findings

2 participants