Fix schema diff workflow key extraction - #54647
Merged
pelikhan merged 3 commits intoAug 21, 2026
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix schema-diff workflow key extractor false positives
Fix schema diff workflow key extraction
Aug 21, 2026
pelikhan
marked this pull request as ready for review
August 21, 2026 23:04
Contributor
There was a problem hiding this comment.
Pull request overview
Improves schema consistency reporting by extracting only top-level workflow frontmatter keys.
Changes:
- Adds a dedicated AWK-based extractor and regression test.
- Integrates extraction into the schema checker.
- Regenerates the compiled workflow.
Show a summary per file
| File | Description |
|---|---|
scripts/extract-workflow-frontmatter-keys.sh |
Extracts top-level frontmatter keys. |
scripts/extract-workflow-frontmatter-keys_test.sh |
Tests nested and body-content filtering. |
Makefile |
Adds the new script test. |
.github/workflows/schema-consistency-checker.md |
Uses the dedicated extractor. |
.github/workflows/schema-consistency-checker.lock.yml |
Regenerates the compiled workflow. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Suppressed comments (1)
scripts/extract-workflow-frontmatter-keys.sh:23
- This pattern skips quoted top-level YAML keys. The repository already contains a valid example (
.github/workflows/mattpocock-skills-reviewer.md:22uses"on":), so the dedicated extractor does not actually emit every unindented frontmatter key and can under-report a field when its occurrences are quoted. Accept and normalize quoted forms as well as bare keys.
in_frontmatter && $0 ~ /^[a-z][a-z0-9_-]*:/ {
key = $0
sub(/:.*/, "", key)
print key
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
Comment on lines
+12
to
+16
| FNR == 1 && $0 ~ /^---[[:space:]]*$/ { | ||
| in_frontmatter = 1 | ||
| next | ||
| } | ||
| in_frontmatter && $0 ~ /^---[[:space:]]*$/ { |
Collaborator
|
@copilot Please address the current forward-progress items on this branch, then run the Unresolved review follow-up:
Also refresh the branch if GitHub offers it. Run: https://github.com/github/gh-aw/actions/runs/32537236290
|
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The schema consistency checker was inflating
used_in_workflowsandin_used_not_schemawith nested YAML keys and markdown body content. This made real schema gaps harder to spot in recurring reports.USED_FIELDS=$(bash scripts/extract-workflow-frontmatter-keys.sh .github/workflows/*.md 2>/dev/null || echo "")Workflow integration
Regression coverage