Skip to content
Merged
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
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,16 @@ jobs:
exit 0
fi
# Rule 1: any PR touching kernel/** must declare 'kernel-change:' in its body.
if git diff --name-only origin/master...HEAD -- kernel/ | grep -q .; then
# #4828: kernel/package-lock.json is GENERATED state, not kernel source —
# agents' test-prep installs churn it without any intent to change the
# kernel (8 PRs tripped this gate on lockfile-only diffs). The human gate
# protects kernel SOURCE; lockfile consistency is already enforced by the
# separate lock-sync job (which FAILS on real drift). Exempt the lockfile
# here so pure churn passes without an owner round-trip.
KERNEL_TOUCHED="$(git diff --name-only origin/master...HEAD -- kernel/ | grep -v '^kernel/package-lock\.json$' || true)"
if [[ -n "$KERNEL_TOUCHED" ]]; then
if ! printf '%s' "$PR_BODY" | grep -q 'kernel-change:'; then
echo "::error::This PR modifies kernel/ but does not declare 'kernel-change: <reason>' in its body."
echo "::error::This PR modifies kernel/ ($KERNEL_TOUCHED) but does not declare 'kernel-change: <reason>' in its body."
echo "Kernel changes are human-gated: owner approval plus explicit declaration required. See AGENTS.md 'Kernel Boundary'."
exit 1
fi
Expand Down
Loading