Skip to content

Commit 27f8fcb

Browse files
fix: resolve relative K9 validator paths, check CI prerequisites, and validate lockfile changes
1 parent 0b34eab commit 27f8fcb

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

‎.github/hooks/validate-k9.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ set -euo pipefail
2626

2727
REPO="${INPUT_PATH:-.}"
2828
STANDARDS_DIR="${STANDARDS_DIR:-$(cd "$REPO/.." && pwd)/standards}"
29+
case "$STANDARDS_DIR" in
30+
/*) ;;
31+
*) STANDARDS_DIR="$PWD/$STANDARDS_DIR" ;;
32+
esac
2933
VALIDATOR="$STANDARDS_DIR/1-formats/k9/tools/k9-validate.sh"
3034

3135
if [ ! -f "$VALIDATOR" ]; then

‎.github/workflows/dogfood-gate.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ jobs:
104104
set -euo pipefail
105105
rm -rf "$RUNNER_TEMP/standards-k9"
106106
mv "$PWD/.standards-k9" "$RUNNER_TEMP/standards-k9"
107+
if [ ! -f "$RUNNER_TEMP/standards-k9/1-formats/k9/tools/k9-validate.sh" ]; then
108+
echo "::error::K9 validator is missing from the standards checkout"
109+
exit 1
110+
fi
111+
if ! command -v nickel >/dev/null 2>&1; then
112+
echo "::error::nickel is required for K9 layer L2 validation"
113+
exit 1
114+
fi
107115
STANDARDS_DIR="$RUNNER_TEMP/standards-k9" bash .github/hooks/validate-k9.sh
108116
109117
# ---------------------------------------------------------------------------

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
entry: bash .github/hooks/validate-k9.sh
4040
language: system
4141
pass_filenames: false
42-
files: '\.k9(\.ncl)?$'
42+
files: '\.k9(\.(ncl|lock))?$'
4343

4444
# --- Shell linting ---
4545
- repo: https://github.com/shellcheck-py/shellcheck-py

0 commit comments

Comments
 (0)