fix(ci): key cve-watch off published releases, not bare tags #32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/cve-watch-published-oracle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The defect
cve-watch.ymlcompared the newest upstream tag against the newest local git tag, so the mere existence of a tag asserted "we already have this". But a tag can exist with nothing published:3cd8e59hard-fails — and that guard made this state common; it is exactly whatv7.1.5-hardened1is in right nowpublish.ymlwas simply never dispatchedIn every case
upstream == local, sonew=false, and the only automated "you are behind upstream on security patches" signal switched itself off — indefinitely, and precisely when a release had gone wrong. The failure mode silences the alarm it should be raising.The fix
Key off
releases/<tag>/manifest.json.publish.ymlis what commits that file, so its presence is evidence thatbuild-kernel.ymlcompleted and publish ran. Newtools/newest-published-release.shdoes the resolution — intools/rather than inline soshellcheck build/*.sh tools/*.shcovers it and it's testable against fixture directories.The newest git tag is still computed, now purely as a diagnostic: when a tag exists with no matching published release, the run emits a
::warning::and the filed issue carries a "Stuck release" note. The watcher becomes a stuck-release detector, which is the natural place for that signal.One deliberate behaviour change: the
[[ -z $local ]]branch used to suppress filing, because a shallow checkout could yield zero git tags and make every upstream tag read as new — that was issue #4's false positive. Readingreleases/from the working tree removes that failure mode entirely, so an emptylocalnow legitimately means "nothing has ever been published" and filing is correct. Reworded rather than left in place with an evaporated rationale.Also relabelled the body's
Local latest:→Local newest PUBLISHED:, since that is now what the value means.Verification
The oracle script, against the real repo and fixtures:
v7.1.4-hardened1--series 7.1/--series 7.0v7.1.4-hardened1/v7.0.12-hardened1v7.2.0dir and no manifestv7.1.4-hardened1— correctly ignoredv7.2.0-hardened1--series 7(malformed)--series 7.0with av7.10.1presentThe rewired comparison, run offline with a stubbed
curlagainst the real repo state (newest publishedv7.1.4, tagv7.1.5exists unpublished):newlocalstuckv7.1.6-hardened1truev7.1.4-hardened1v7.1.5-hardened1v7.1.5-hardened1truev7.1.4-hardened1v7.1.5-hardened1v7.1.4-hardened1falsev7.1.4-hardened1v7.1.5-hardened1The middle row is the whole point: that is today's state, and before this change it produced
new=false— silent forever.Issue body rendered both ways (real step body extracted, templates substituted): with a stuck tag the note lands as its own paragraph; without one there is no stray whitespace.
Validators:
shellcheckclean (including the new script),yamllint -d relaxedexit 0, bothworkflow-expressionsgreps clean, and the new run:-body template rule from #29 still passes.🤖 Generated with Claude Code