Skip to content

Add user-invokable to ignored frontmatter fields#16259

Merged
pelikhan merged 3 commits intomainfrom
copilot/add-user-invokable-field
Feb 17, 2026
Merged

Add user-invokable to ignored frontmatter fields#16259
pelikhan merged 3 commits intomainfrom
copilot/add-user-invokable-field

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

The user-invokable field is a GitHub Copilot custom agent field (controls automatic vs. manual agent invocation) that appears in agent file frontmatter but isn't part of the gh-aw workflow schema. Without ignoring it, validation fails on otherwise valid agent files.

Changes

  • Added "user-invokable" to IgnoredFrontmatterFields in pkg/constants/constants.go
  • Added test coverage for filtering and validation with the field present

Example frontmatter that now validates without errors:

---
user-invokable: true
description: Custom agent for code review
on: push
engine: copilot
---

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login + "/" + .name ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet applyTo b/gh-aw/pkg/testcheckout ndor/bin/grep ache/go/1.25.0/x64/pkg/tool/linuconfig estl�� vH0z/uiz1_Xgh1tVoCLn1vH0z ./scripts/README-conformance.md 0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh applyTo ude-code.md 64/bin/grep ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login + "/" + .name 0/x64/bin/sh applyTo 6-3.md /usr/local/.ghcu--git-dir ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet --no�� */*.ts' '**/*.json' --ignore-path ../../../.prettierignore grep x_amd64/vet applyTo .md rep x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login + "/" + .name ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet applyTo 6-3.md 0/x64/bin/grep ache/go/1.25.0/x64/pkg/tool/linuconfig (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha applyTo d x_amd64/link applyTo t.md /usr/local/sbin/prettier x_amd64/link /pre�� applyTo p-headers/SKILL.--ignore-path /node applyTo (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build2510361401/b386/importcfg -pack /tmp/go-build2510361401/b386/_testmain.go -l w/js/**/*.json' --ignore-path on/SKILL.md 64/pkg/tool/linux_amd64/vet applyTo s.md (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha h ../../../.prettierignore copilot-agent-tips-and-tricks/SKILL.md x_amd64/vet applyTo onfig.md k/_temp/ghcca-no--noprofile x_amd64/vet -l w/js/**/*.json' --ignore-path ../../../.prettierignore mcp-server/SKILL.md 64/pkg/tool/linux_amd64/vet applyTo .md grep 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 3410694/b065/vet.cfg x_amd64/compile applyTo omment-temp-id.mrev-parse rep x_amd64/compile --no�� --noprofile grep ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ctor }} ${{ githgit ns.md cal/bin/grep ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 3410694/b040/vet.cfg 560031164b350edf3b76844bf3d24994-d applyTo on.md k/_temp/ghcca-no--show-toplevel ache/go/1.25.0/x64/pkg/tool/linuconfig estl�� '**/*.ts' '**/*.json' --ignore-premote.origin.url 3410694/b097/vet.cfg 64/bin/node user-invokable .github/aw/githurev-parse grep ache/go/1.25.0/x64/pkg/tool/linutest@example.com (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 3410694/b033/vet.cfg x_amd64/compile applyTo on.md (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 ./skills/error-messages/SKILL.md x_amd64/link applyTo late-delimiters.rev-parse ache/go/1.25.0/x--show-toplevel RaLwacw/wGEdI2cJYFPcAZ8K5V0_ 0/x6�� --noprofile grep 64/bin/sh applyTo output-redirectsrev-parse 0/x64/bin/grep RN/AERBTSiwFBTdGDiIa9qx/amxpLx1v-test.v=true (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 3410694/b052/vet.cfg x_amd64/compile applyTo omment-temp-id.mrev-parse /snap/bin/grep x_amd64/compile 0/x6�� se 3410694/b101/vet.cfg 0/x64/lib/node_modules/npm/node_-importcfg applyTo output-redirectsrev-parse rgo/bin/grep ache/go/1.25.0/x64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/pkg/envutil/envutil_test.go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 3410694/b058/vet.cfg x_amd64/link applyTo omment-temp-id.mrev-parse /home/REDACTED/wor--show-toplevel x_amd64/link 0/x6�� se 3410694/b095/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet applyTo ns.md ep i8/wl1tDiMkVqxwJLLHK96I/vmtrAJLFremote.origin.url (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 3410694/b107/vet.cfg tions/node_modules/.bin/node applyTo late-delimiters.rev-parse ndor/bin/grep ache/go/1.25.0/x64/pkg/tool/linurev-parse 0/x6�� se 3410694/b185/vet.cfg ache/go/1.25.0/x64/pkg/tool/linu-importcfg applyTo output-redirectsrev-parse 64/bin/grep ache/go/1.25.0/x64/pkg/tool/linu-test.v=true (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path applyTo T.md x_amd64/vet applyTo t-redaction-test-c ache/go/1.25.0/xnpx prettier --write '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path x_amd64/vet -l h ../../../.prettierignore ecovery-patterns/SKILL.md ache/go/1.25.0/x64/bin/grep applyTo ts.md p/bin/grep grep (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 -llm-gateway.md rgo/bin/grep x_amd64/compile --no�� --noprofile grep ache/go/1.25.0/x64/pkg/tool/linu-importcfg applyTo root-mode.md ndor/bin/grep ache/go/1.25.0/x64/pkg/tool/linu-pack (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion applyTo 6-3.md (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/vet applyTo t-redaction-test-c de/node/bin/grepnpx prettier --write '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path x_amd64/vet -l h ../../../.prettierignore t-session/SKILL.md tnet/tools/grep applyTo ts.md k/_temp/ghcca-node/node/bin/grepgithub.repository grep (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /prettier applyTo t-redaction-test-c /opt/pipx_bin/grnpx prettier --write '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path x_amd64/vet -l applyTo t-session/SKILL.md /opt/pipx_bin/grep applyTo b-queries-safe-i-V=full 0/x64/bin/grep grep (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state 0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh applyTo ude-code.md 64/bin/grep ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name applyTo ./.changeset/patch-add-unassign--ifaceassert x_amd64/vet applyTo g.md 64/bin/grep x_amd64/vet -l h ../../../.prettierignore ecovery-patterns/SKILL.md x_amd64/vet applyTo timization-strat--norc ache/go/1.25.0/x--noprofile x_amd64/vet (http block)
  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login $GOPATH/bin/golangci-lint" ]; then \ diff_output=$(PATH="$GOPATH/bin:$PATH" golangci-lint fmt --diff 2>&1); \ if [ -n "$diff_output" ]; then \ echo "Code is not formatted. .md modules/@npmcli/run-script/lib/node-gyp-bin/sh applyTo ent.md 64/bin/grep x_amd64/vet -l ath ../../../.pr**/*.json attern-safety/SK--ignore-path x_amd64/vet applyTo mojis.md ache/go/1.25.0/x--write x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login applyTo .md x_amd64/vet applyTo ent.md de/node/bin/grep--write x_amd64/vet -l ath ../../../.pr**/*.json attern-safety/SK--ignore-path x_amd64/vet applyTo mojis.md k/_temp/ghcca-no--write x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login applyTo .md x_amd64/vet applyTo ent.md rep x_amd64/vet -l ath ../../../.pr**/*.json attern-safety/SK--ignore-path x_amd64/vet applyTo mojis.md cal/bin/grep x_amd64/vet (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Add user-invokable field to the list of ignored front matter fields.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add user-invokable field to ignored front matter fields Add user-invokable to ignored frontmatter fields Feb 17, 2026
Copilot AI requested a review from pelikhan February 17, 2026 00:31
@pelikhan pelikhan marked this pull request as ready for review February 17, 2026 00:43
Copilot AI review requested due to automatic review settings February 17, 2026 00:43
Copy link
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

Adds support for the GitHub Copilot custom agent frontmatter key user-invokable by ignoring it during frontmatter schema validation, preventing otherwise-valid agent files from failing validation.

Changes:

  • Add "user-invokable" to constants.IgnoredFrontmatterFields so schema validation filters it out.
  • Extend schema utility tests to confirm the field is filtered and does not cause main-workflow validation failures.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pkg/constants/constants.go Adds user-invokable to the list of silently ignored frontmatter keys.
pkg/parser/schema_utilities_test.go Adds tests ensuring user-invokable is filtered and ignored by main frontmatter validation.

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

Comment on lines +172 to +176
name: "valid frontmatter with user-invokable field - should be ignored",
frontmatter: map[string]any{
"on": "push",
"user-invokable": true,
"engine": "claude",
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The new ignored field is covered for main-workflow validation, but there’s no test asserting that ValidateIncludedFileFrontmatterWithSchema also ignores user-invokable. Since filterIgnoredFields is used by both main and included file validators, please add a test case in TestValidateIncludedFileWithIgnoredFields where frontmatter includes user-invokable: true and ensure validation succeeds (and that other invalid fields still fail).

Copilot uses AI. Check for mistakes.
Comment on lines 865 to +867
// IgnoredFrontmatterFields are fields that should be silently ignored during frontmatter validation
// NOTE: This is now empty as description and applyTo are properly validated by the schema
var IgnoredFrontmatterFields = []string{}
// NOTE: user-invokable is a GitHub Copilot custom agent field that is not part of the gh-aw schema
var IgnoredFrontmatterFields = []string{"user-invokable"}
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

Now that IgnoredFrontmatterFields is non-empty again, the comment on filterIgnoredFields in pkg/parser/schema_utilities.go (“currently does nothing”) is no longer accurate. Please update that comment to reflect that it actively filters the configured ignored fields (currently user-invokable) so future changes don’t get misled.

See below for a potential fix:

// IgnoredFrontmatterFields are frontmatter fields that are actively filtered out during validation.
// Parser utilities (e.g., filterIgnoredFields) use this list to drop non-schema fields without errors.
// NOTE: user-invokable is a GitHub Copilot custom agent field that is not part of the gh-aw schema.

Copilot uses AI. Check for mistakes.
@pelikhan pelikhan merged commit cedf004 into main Feb 17, 2026
58 checks passed
@pelikhan pelikhan deleted the copilot/add-user-invokable-field branch February 17, 2026 00:50
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.

2 participants