Fix Spectral artifact finding attribution - #688
Closed
LarryHu0217 wants to merge 1 commit into
Closed
Conversation
LarryHu0217
requested review from
PedroDiez,
bigludo7,
eric-murray,
jlurien and
rartych
as code owners
July 30, 2026 23:45
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. |
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.
What type of PR is this?
What this PR does / why we need it:
The Artifacts Lint workflow currently passes all four templates to one Spectral invocation. Shared
$reftargets 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_pathsmetadata, 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?
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
Additional documentation
The artifacts linting README now documents per-template Spectral execution, deduplication, and S-313 baseline notices.