docs(ruff-format): add hook-telemetry data schema + registry row - #886
Conversation
ruff-format.sh emits telemetry via hook::emit_telemetry("ruff-format", ...)
but never shipped the per-hook data schema or Implementers table row that
markdown-format and typos-format both have, leaving a discovery gap for any
sink validating the ruff-format hook value's data shape.
Closes #874
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1V3gkrfSf75isB8MiDy3o
|
Claude finished @kyle-sexton's task in 2m 32s —— View job PR Review: docs(ruff-format): add hook-telemetry data schema + registry row
Schema correctnessThe new schema at jq -n \
--arg tool "$TOOL" \
--arg file "$FILE_REL" \
--argjson findings "$1" \
'{tool:$tool,file:$file,findings:$findings}'All three required fields ( Structural consistency with peers
The PR correctly identified that ruff-format's findings are flat concise-format strings (same as markdown-format's markdownlint lines), not typos-format's structured objects. Shape choice is correct.
Registry rowThe row added to the Implementers table is correctly formatted and the Version bump and CHANGELOGPatch bump One gap worth a follow-up
A minimal example would look like: {
"schema_version": "1.0",
"timestamp": "2026-07-21T00:00:00Z",
"hook": "ruff-format",
"hook_event": "PostToolUse",
"status": "ok",
"duration_ms": 87,
"data": {
"tool": "Write",
"file": "src/app.py",
"findings": [
"src/app.py:14:1: E501 Line too long (92 > 88 characters)"
]
}
}SummaryThe schema is correct, the registry row is properly wired, the version bump and CHANGELOG are appropriately scoped. No correctness, security, or structural issues found. The example-fixture gap is pre-existing and out of scope for this PR. Looks good to merge. |
|
Claude finished @kyle-sexton's task in 1m 27s —— View job Security Review — PR #886
FindingsNo security issues found. This PR is a documentation/conformance fix: a new JSON Schema file, a README table row, a patch-version bump in Specific checks performed:
|
|
Post-green review classification (work lane):
No DEFER-FORBIDDEN class applies (docs/conformance-only change). No inline review threads to resolve (PR-level comments only). Flipping to ready, handing off to the babysit lane for ongoing watch. |
|
Claude finished @kyle-sexton's task in 1m 5s —— View job Security Review — PR #886
No security issues found. This PR changes four files, all static documentation/JSON with no executable code paths. File-by-file analysis
Checks performed
|
|
Claude finished @kyle-sexton's task in 1m 4s —— View job PR Review: docs(ruff-format): add hook-telemetry data schema + registry row
Schema correctness
jq -n \
--arg tool "$TOOL" \
--arg file "$FILE_REL" \
--argjson findings "$1" \
'{tool:$tool,file:$file,findings:$findings}'All three Structural consistency with peersThe schema structure is an exact mirror of Registry rowThe row in the Implementers table is correctly formatted. The Version bump and CHANGELOGPatch bump No issues foundThis is a clean, scoped documentation/conformance fix. No correctness, security, or structural issues found. Looks good to merge. |
Summary
plugins/ruff-format/hooks/ruff-format.shemits telemetry viahook::emit_telemetry("ruff-format", ...)but never shipped the hook-telemetry convention's per-hook data schema or Implementers table row, unlike themarkdown-formatandtypos-formatproducers. Consumer sinks discovering theruff-formathookvalue had no publisheddataschema to validate against.Fix
docs/conventions/hook-telemetry/data/ruff-format.schema.json, mirroringmarkdown-format.schema.json's shape (tool,file,findings: string[]) —ruff-format.shbuildsdata.findingsas an array of concise diagnostic lines fromruff check --no-fix --output-format concise, the same shape as markdown-format's lint-line findings (not typos-format's structured{typo, corrections}objects).ruff-formatrow to the Implementers table indocs/conventions/hook-telemetry/README.md.plugins/ruff-format/.claude-plugin/plugin.jsonto0.4.3(patch — conformance fix, no hook behavior change) with a matchingCHANGELOG.mdentry.Followed the same pattern as
typos-format's schema+registry-row addition (#872): nohook-telemetry/CHANGELOG.mdentry, since per-hookdataschemas are not separately version-stamped (README "Versioning").Verification
jq . docs/conventions/hook-telemetry/data/ruff-format.schema.jsonandjq . plugins/ruff-format/.claude-plugin/plugin.json— both valid JSON.origin/mainimmediately before opening this PR and confirmedplugins/ruff-format/.claude-plugin/plugin.jsonwas still at0.4.2(no collision with the version bump).scripts/run-plugin-tests.shandscripts/aggregate-hygiene-results.shfor an automated Implementers-table/schema-file consistency check — none exists; this gap is exactly what issue docs(ruff-format): missing hook-telemetry data schema + registry row #874 is about, so verification here is manual: diffed againstmarkdown-format.schema.jsonandtypos-format.schema.jsonfield-by-field, and cross-checkeddata.findings's shape against the actualjqconstruction inruff-format.sh'sbuild_data_json.gh pr list --state openshowed no other open PR touchingplugins/ruff-format/ordocs/conventions/hook-telemetry/— no collision risk.Related
markdown-formatplugin'sdata/markdown-format.schema.json+ registry row, andtypos-formatplugin'sdata/typos-format.schema.json+ registry row (feat(typos-format): add per-file typos autofix hook plugin #872).docs/topics/lint-static-analysis-gaps/PLAN.md).Closes #874