Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/hypatia-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ permissions:

jobs:
scan:
uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@857ff096af11451841fb10488fed1438523973a1
uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@58362c24cf225694b388fc660b3525d8207b7c61
88 changes: 71 additions & 17 deletions .github/workflows/workflow-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,23 @@
- name: Check SPDX Headers
run: |
echo "=== Checking SPDX License Headers ==="
# The header comment block is read, not line 1 alone. gh actions-lock
# inserts "# This workflow is managed by gh actions-lock." at line 1
# whenever it refreshes the lockfile, so a line-1 test fails every
# workflow the tool has touched. The test below is the one in
# standards' governance-reusable.yml: the leading run of comment
# lines must hold the identifier.
failed=0
for file in .github/workflows/*.yml .github/workflows/*.yaml; do
[ -f "$file" ] || continue
if ! head -1 "$file" | grep -q "^# SPDX-License-Identifier:"; then
echo "ERROR: $file missing SPDX header"
if ! awk '/^---[[:space:]]*$/ { next } /^#/ { print; next } { exit }' "$file" \
| grep -q "^# SPDX-License-Identifier:"; then
echo "ERROR: $file has no SPDX-License-Identifier in its header comment block"

Check warning on line 48 in .github/workflows/workflow-linter.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_vocarium&issues=AaHqWsA-DrQhMJ0mkWN1&open=AaHqWsA-DrQhMJ0mkWN1&pullRequest=56
failed=1
fi
done
if [ $failed -eq 1 ]; then
echo "Add '# SPDX-License-Identifier: MPL-2.0' as first line"
echo "Add '# SPDX-License-Identifier: <id>' to the header comment block"
exit 1
fi
echo "All workflows have SPDX headers"
Expand All @@ -65,24 +72,71 @@
fi
echo "All workflows have permissions declared"

- name: Check SHA-Pinned Actions

Check warning on line 75 in .github/workflows/workflow-linter.yml

View workflow job for this annotation

GitHub Actions / Hypatia neurosymbolic scan

[hypatia] workflow .github/workflows/workflow-linter.yml:75 step `Check SHA-Pinned Actions` swallows non-zero exit via `|| true` — failures will be masked
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "=== Checking Action Pinning ==="
# Find any uses: lines that don't have @SHA format
# Pattern: uses: owner/repo@<40-char-hex>
unpinned=$(grep -rnE "^[[:space:]]+uses:" .github/workflows/ | \
grep -v "@[a-f0-9]\{40\}" | \
grep -v "uses: \./\|uses: docker://\|uses: actions/github-script" || true)

if [ -n "$unpinned" ]; then
echo "ERROR: Found unpinned actions:"
echo "$unpinned"
echo ""
echo "Replace version tags with SHA pins, e.g.:"
echo " uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.0.1"
exit 1
if [ -f .github/workflows/actions.lock ]; then
# Pin authority is the Actions dependency lockfile: workflows use
# readable tags, the lockfile maps each ref to an exact commit and
# the runner enforces it. Verify every action ref has a lockfile
# entry (offline coverage check).
gh extension install github/gh-actions-lock
gh actions-lock --verify-local

# Reusable workflow calls are outside lockfile scope and must
# remain SHA-pinned inline.
# A reusable workflow call is a job-level `uses:`. With yq each
# workflow is parsed and the DECODED value is judged, so quoting,
# escapes, flow style and trailing comments cannot hide a ref: a
# call that is not local (./) must end in @ followed by exactly
# 40 lowercase hex characters.
# No parser, no verdict: reading the raw text instead would let a
# flow-style mapping or an escaped path through, so the step fails
# when yq is missing.
if ! command -v yq >/dev/null 2>&1; then
echo "ERROR: yq is not on this runner; reusable workflow refs cannot be checked"

Check warning on line 99 in .github/workflows/workflow-linter.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_vocarium&issues=AaHqZ9epbha0xIJcq-i3&open=AaHqZ9epbha0xIJcq-i3&pullRequest=56
exit 1
fi
unpinned=""
for file in .github/workflows/*.yml .github/workflows/*.yaml; do
[ -f "$file" ] || continue
if ! calls="$(yq -r '.jobs[] | select(has("uses")) | .uses' "$file" 2>&1)"; then
echo "ERROR: $file is not parseable as YAML: $calls"

Check warning on line 106 in .github/workflows/workflow-linter.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_vocarium&issues=AaHqZd21NS0um8-QIkQI&open=AaHqZd21NS0um8-QIkQI&pullRequest=56
exit 1
fi
while IFS= read -r call; do
[ -n "$call" ] || continue
case "$call" in ./*) continue ;; esac

Check failure on line 111 in .github/workflows/workflow-linter.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add a default case (*) to handle unexpected values.

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_vocarium&issues=AaHqZd21NS0um8-QIkQJ&open=AaHqZd21NS0um8-QIkQJ&pullRequest=56
if ! printf '%s\n' "$call" | grep -qE '@[0-9a-f]{40}$'; then
unpinned="${unpinned}${file}: ${call}"$'\n'
fi
done < <(printf '%s\n' "$calls")
done
if [ -n "$unpinned" ]; then
echo "ERROR: Found reusable workflow calls not pinned to a SHA:"

Check warning on line 118 in .github/workflows/workflow-linter.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_vocarium&issues=AaHqWsA-DrQhMJ0mkWN2&open=AaHqWsA-DrQhMJ0mkWN2&pullRequest=56
echo "$unpinned"
exit 1
fi
echo "Lockfile coverage verified; reusable workflow calls are SHA-pinned"
else
# No lockfile: every uses: must carry an inline SHA pin.
# Pattern: uses: owner/repo@<40-char-hex>
unpinned=$(grep -rnE "^[[:space:]]+uses:" .github/workflows/ | \
grep -v "@[a-f0-9]\{40\}" | \
grep -v "uses: \./\|uses: docker://\|uses: actions/github-script" || true)

Check warning on line 128 in .github/workflows/workflow-linter.yml

View workflow job for this annotation

GitHub Actions / Hypatia neurosymbolic scan

[hypatia] workflow .github/workflows/workflow-linter.yml:128 pins container `docker://\|uses:` by tag — tag is mutable; pin by sha256 digest instead

if [ -n "$unpinned" ]; then
echo "ERROR: Found unpinned actions:"
echo "$unpinned"
echo ""
echo "Replace version tags with SHA pins, e.g.:"
echo " uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.0.1"
exit 1
fi
echo "All actions are SHA-pinned"
fi
echo "All actions are SHA-pinned"

- name: Check for Duplicate Workflows
run: |
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning].

==== Fixed

* *Workflow lint reads the SPDX header block and the lockfile (2026-11-17).*
The lint tested line 1 of each workflow for the SPDX identifier, but
`+gh actions-lock+` puts its own banner on line 1 whenever it refreshes the
lockfile, so the test failed on 26 of 28 workflows here and on `+main+`. It now
reads the leading comment block, the same test as `+standards+`
`+governance-reusable.yml+`; a workflow with no identifier there still fails.
The pin step required an inline commit on every action, which the move to
`+actions.lock+` made unsatisfiable (38 tag references). It now checks lockfile
coverage and keeps the inline-commit rule for reusable workflow calls, as the
copy of this lint in haec does.

* *Stack coherence: the checker pin and the scan pin (2026-11-17).* The
invoke-slice gate pins trope-checker at `+0dceab6+` (was `+4ecba4f+`), the
commit haec and hermeneia move to in the same sweep. Between the two commits
trope-checker's `+src/+`, `+schemas/+`, `+spec/+` and conformance fixtures are
unchanged. `+zig build test+` and `+tests/e2e/invoke_slice.sh+` pass at the new
pin (Zig 0.16.0, run locally). The Hypatia scan pin moves to the revision that
installs OTP 27.3.4.19 (hypatia#1061).

* *The `+proof-check-idris2+` account was wrong (2026-11-09).* Review found it,
and it was right. `+docs/status/PROOF-STATUS.adoc+` said that with a toolchain
present every individual `+proof-check-*+` recipe would report green on
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/invoke_slice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set -euo pipefail
cd "$(dirname "$0")/../.."

ZIG_EXPECTED="$(awk '$1=="zig"{print $2}' .tool-versions)"
TROPECHECK_PIN="4ecba4f1862aec144ec940b1d8a93ddabd1cb591"
TROPECHECK_PIN="0dceab68459d46b2cda22137c261023223c30e9a"

fail() { echo "GATE FAIL: $*" >&2; exit 1; }

Expand Down
Loading