Skip to content

fix: move schema-demo files to non-protected schema-demos/ folder#28838

Merged
pelikhan merged 3 commits intomainfrom
copilot/fix-schema-feature-coverage-checker
Apr 28, 2026
Merged

fix: move schema-demo files to non-protected schema-demos/ folder#28838
pelikhan merged 3 commits intomainfrom
copilot/fix-schema-feature-coverage-checker

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

The Schema Feature Coverage Checker was 100% blocked on every run because the demo files it creates (schema-demo-*.md) fall under .github/workflows/, which is a top-level dot-folder protected by the default protect_top_level_dot_folders policy.

Changes

  • .github/workflows/schema-feature-coverage.md — Updated the workflow to create demo files in schema-demos/ (a non-protected folder) instead of .github/workflows/. The coverage grep (Step 2) now checks both .github/workflows/ and schema-demos/ so existing and new demo files both count toward coverage:
grep -rl "^${field}:" .github/workflows/ schema-demos/ --include="*.md" 2>/dev/null

Demo files are now created at schema-demos/schema-demo-<field>.md instead of .github/workflows/schema-demo-<field>.md.

  • .github/workflows/schema-feature-coverage.lock.yml — Recompiled to reflect the updated workflow configuration.

Copilot AI changed the title [WIP] Fix Schema Feature Coverage Checker blocking PRs from schema-demo outputs fix: allow schema-demo-*.md files in schema-feature-coverage workflow Apr 28, 2026
Copilot AI requested a review from gh-aw-bot April 28, 2026 02:37
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot do not create files in that folder, use another on protected folder

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 28, 2026

@copilot do not create files in that folder, use another on protected folder

Done in 91ca64c. Demo files are now created at schema-demos/schema-demo-<field>.md instead of .github/workflows/. The coverage grep was updated to also check schema-demos/ alongside .github/workflows/, and the allowed-files workaround was removed.

Copilot AI changed the title fix: allow schema-demo-*.md files in schema-feature-coverage workflow fix: move schema-demo files to non-protected schema-demos/ folder Apr 28, 2026
Copilot AI requested a review from pelikhan April 28, 2026 02:49
@pelikhan pelikhan marked this pull request as ready for review April 28, 2026 03:16
Copilot AI review requested due to automatic review settings April 28, 2026 03:16
@pelikhan pelikhan merged commit a626a9b into main Apr 28, 2026
19 checks passed
@pelikhan pelikhan deleted the copilot/fix-schema-feature-coverage-checker branch April 28, 2026 03:16
@github-actions github-actions Bot mentioned this pull request Apr 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Schema Feature Coverage Checker workflow instructions to avoid creating schema-demo-*.md files under the protected top-level .github/ directory by moving demo output to a new schema-demos/ folder, and recompiles the generated lock workflow.

Changes:

  • Update coverage scanning to include both .github/workflows/ and schema-demos/.
  • Update demo file creation guidance and messaging to use schema-demos/schema-demo-<field>.md.
  • Recompile .github/workflows/schema-feature-coverage.lock.yml to reflect workflow changes.
Show a summary per file
File Description
.github/workflows/schema-feature-coverage.md Adjusts coverage instructions/grep targets and demo file destination to schema-demos/.
.github/workflows/schema-feature-coverage.lock.yml Regenerated compiled lock workflow for the updated MD workflow.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

For each uncovered field (process up to 10 per run; subsequent weekly runs will handle any remaining ones):

1. **Create a new minimal demo workflow file** at `.github/workflows/schema-demo-<field-name>.md`
1. **Create a new minimal demo workflow file** at `schema-demos/schema-demo-<field-name>.md`
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schema-demos/ does not currently exist in the repository. Step 4 instructs creating schema-demos/schema-demo-<field-name>.md, which may fail for agents/tools that don’t auto-create parent directories. Either add the schema-demos/ directory to the repo (e.g., with a placeholder file) or explicitly instruct the workflow to create the directory (e.g., mkdir -p schema-demos) before writing demo files.

See below for a potential fix:

1. **Ensure the demo directory exists** by running:
   ```bash
   mkdir -p schema-demos
  1. Create a new minimal demo workflow file at schema-demos/schema-demo-<field-name>.md
    (use the field name with any special characters replaced by hyphens, e.g., disable-model-invocationschema-demo-disable-model-invocation.md)
  2. Include only the required minimum frontmatter needed to compile (description, on, permissions, engine, timeout-minutes), plus the target field with a valid value
  3. Extract the field's description from the schema using:
    jq -r '.properties["<FIELD>"].description // .properties["<FIELD>"] | if type == "string" then . else "See schema for details" end' pkg/parser/schemas/main_workflow_schema.json
  4. Write a brief markdown body explaining what the field does (use the description from the schema)
  5. Call create_pull_request with an informative title and body

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw-failures] Schema Feature Coverage Checker: protected-files config blocks all PRs from schema-demo-*.md outputs

4 participants