From 367dc86541563070e7f2928d64736cb80d23e437 Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Wed, 22 Jul 2026 13:28:20 -0400 Subject: [PATCH] fix(actionlint): align emitted telemetry hook id with schema (#959) The hook emitted "actionlint" on all three telemetry paths (skipped / findings / clean), but the envelope `hook` value is the hook-script basename, discovered at `data/.schema.json`. Emit "actionlint-check" to match `data/actionlint-check.schema.json` and the README Implementers table. Producer-conformance fix; the published envelope/data contract is unchanged. Co-Authored-By: Claude Sonnet 5 --- plugins/actionlint/.claude-plugin/plugin.json | 2 +- plugins/actionlint/CHANGELOG.md | 12 ++++++++++++ plugins/actionlint/hooks/actionlint-check.sh | 6 +++--- plugins/actionlint/hooks/actionlint-check.test.sh | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/plugins/actionlint/.claude-plugin/plugin.json b/plugins/actionlint/.claude-plugin/plugin.json index 240f997da8..222e40004c 100644 --- a/plugins/actionlint/.claude-plugin/plugin.json +++ b/plugins/actionlint/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "actionlint", - "version": "0.5.0", + "version": "0.5.1", "description": "Lint GitHub Actions workflow files on edit via actionlint, surfacing findings as advisory context.", "author": { "name": "Melodic Software", diff --git a/plugins/actionlint/CHANGELOG.md b/plugins/actionlint/CHANGELOG.md index bf13d0e106..fe5058d2d5 100644 --- a/plugins/actionlint/CHANGELOG.md +++ b/plugins/actionlint/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to the `actionlint` plugin are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. +## [0.5.1] + +### Fixed + +- **Emitted telemetry `hook` id now matches the published schema.** The hook emitted + `"actionlint"` on all three paths (skipped / findings / clean), but the envelope + `hook` value is the hook-script basename and its schema is discovered at + `data/.schema.json`. It now emits `"actionlint-check"`, matching + `docs/conventions/hook-telemetry/data/actionlint-check.schema.json` and the + README Implementers table. Producer-conformance fix only — the published + envelope/data contract is unchanged. + ## [0.5.0] ### Added diff --git a/plugins/actionlint/hooks/actionlint-check.sh b/plugins/actionlint/hooks/actionlint-check.sh index d0a8b4c982..fa9b13be72 100755 --- a/plugins/actionlint/hooks/actionlint-check.sh +++ b/plugins/actionlint/hooks/actionlint-check.sh @@ -102,7 +102,7 @@ build_data_json() { # status so a consumer sink can observe the coverage gap. if ! command -v actionlint >/dev/null 2>&1; then data_json=$(build_data_json '[]') - emit_tel "actionlint" "PostToolUse" "skipped" "$start" "$data_json" "$REPO_ROOT" + emit_tel "actionlint-check" "PostToolUse" "skipped" "$start" "$data_json" "$REPO_ROOT" if hook::notice_once "actionlint-missing" "$INPUT"; then hook::emit_skip_notice PostToolUse "actionlint: 'actionlint' not found on PATH — workflow lint skipped for this session. Install: https://github.com/rhysd/actionlint/blob/main/docs/install.md" fi @@ -133,11 +133,11 @@ if [[ -n "$AL_OUTPUT" ]]; then FINDINGS_JSON=$(printf '%s' "$findings_raw" | jq -R . | jq -s . 2>/dev/null) || FINDINGS_JSON='[]' fi data_json=$(build_data_json "$FINDINGS_JSON") - emit_tel "actionlint" "PostToolUse" "ok" "$start" "$data_json" "$REPO_ROOT" + emit_tel "actionlint-check" "PostToolUse" "ok" "$start" "$data_json" "$REPO_ROOT" exit 0 fi # Clean workflow. data_json=$(build_data_json '[]') -emit_tel "actionlint" "PostToolUse" "ok" "$start" "$data_json" "$REPO_ROOT" +emit_tel "actionlint-check" "PostToolUse" "ok" "$start" "$data_json" "$REPO_ROOT" exit 0 diff --git a/plugins/actionlint/hooks/actionlint-check.test.sh b/plugins/actionlint/hooks/actionlint-check.test.sh index cb7478dacd..9cf9295b5b 100755 --- a/plugins/actionlint/hooks/actionlint-check.test.sh +++ b/plugins/actionlint/hooks/actionlint-check.test.sh @@ -201,7 +201,7 @@ if [[ -s "$TEL" ]]; then fail "envelope: $field missing ($(cat "$TEL"))" fi done - if [[ "$(jq -r '.hook' "$TEL")" == "actionlint" ]]; then ok "envelope: hook is actionlint"; else fail "envelope: hook=$(jq -r '.hook' "$TEL")"; fi + if [[ "$(jq -r '.hook' "$TEL")" == "actionlint-check" ]]; then ok "envelope: hook is actionlint-check"; else fail "envelope: hook=$(jq -r '.hook' "$TEL")"; fi if [[ "$(jq -r '.status' "$TEL")" == "ok" ]]; then ok "envelope: status ok"; else fail "envelope: status=$(jq -r '.status' "$TEL")"; fi if [[ "$(jq -r '.schema_version' "$TEL")" == "1.0" ]]; then ok "envelope: schema_version 1.0"; else fail "envelope: schema_version=$(jq -r '.schema_version' "$TEL")"; fi if [[ "$(jq '.data.findings | length' "$TEL")" -ge 1 ]]; then ok "envelope: findings populated"; else fail "envelope: findings empty ($(jq '.data.findings' "$TEL"))"; fi