Repository navigation
Reject label names longer than 50 characters at compile time and in MCP - #76941
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
❌ PR Specification Reviewer was cancelled. Please review the logs for details.
|
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
🔬 Test Quality Sentinel is analyzing test quality on this pull request... |
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request... |
|
✂️ Ponytail Reviewer has started processing this pull request |
Include the validator and markdown-unfencing modules in the safe-output deployment bundle. Keep the compiler-embedded tool schemas aligned with runtime label length limits. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Validation can reject valid tool calls by combining length limits across alternative schema branches and reject supported label-expression arrays by applying static-name limits to expression items.
2 open issues
What changed in this PR
This PR adds early label-name length validation to gh-aw’s compiler and safe-outputs MCP boundary, aiming to catch invalid names before GitHub operations run.
Changes:
- Adds 50-character limits to workflow and tool schemas, with recursive runtime validation.
- Shares legacy issue-label normalization and packages its runtime dependencies.
- Documents the limit and adds compiler, Unicode-boundary, HTTP, and stdio coverage.
| File | Description |
|---|---|
pkg/workflow/labels_validation_test.go |
Tests compilation rejection without generating a lock file. |
pkg/workflow/js/safe_outputs_tools.json |
Adds label limits to embedded tool schemas. |
pkg/parser/schemas/main_workflow_schema.json |
Limits configured workflow and safe-output labels. |
pkg/parser/schema_labels_test.go |
Tests boundaries, Unicode, and exempt values. |
docs/src/content/docs/reference/safe-outputs.md |
Documents MCP label validation. |
docs/src/content/docs/reference/frontmatter.md |
Documents compile-time label limits. |
actions/setup/setup.sh |
Packages newly required runtime modules. |
actions/setup/js/schema-validation.test.cjs |
Tests nested string-length constraints. |
actions/setup/js/schema-validation.cjs |
Recursively checks explicit length limits. |
actions/setup/js/safe_outputs_tools.json |
Adds label limits to runtime tool schemas. |
actions/setup/js/safe_outputs_mcp_wrapped_arguments.test.cjs |
Checks rejected labels produce no output. |
actions/setup/js/safe_outputs_mcp_schema_validation.test.cjs |
Covers label limits over HTTP and stdio. |
actions/setup/js/safe_outputs_mcp_arguments.cjs |
Normalizes legacy issue-label strings before validation. |
actions/setup/js/safe_output_type_validator.cjs |
Extracts reusable issue-label normalization. |
actions/setup/js/add_labels_schema.cjs |
Preserves length constraints and checks example values. |
Review effort: Balanced (auto)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@copilot run pr-finisher skill |
|
Reviewed the cancellation notice: the run was cancelled during MCP Gateway readiness, before producing review findings. No code change or rerun is warranted by this notice alone; the cancellation cause remains unconfirmed. |
|
Reviewed the code-quality review notice: the run failed during MCP Gateway startup before producing code feedback. No code change is needed for this status notice. |
|
Reviewed the test-quality analysis notice: the run failed during MCP Gateway startup before producing test feedback. No code change is needed for this status notice. |
|
Reviewed the skills-review notice: the run failed during MCP Gateway startup before producing review findings. No code change is needed for this status notice. |
|
Reviewed the design-decision check notice: the run failed during MCP Gateway startup before producing findings. This status notice does not establish a missing design record, so no code or documentation change is needed. |
|
Reviewed the Ponytail review notice: the run failed during MCP Gateway startup before producing review findings. No code change is needed for this status notice. |
|
🎉 This pull request is included in a new release. Release: |

GitHub rejects label names longer than 50 characters. Catch configured names during compilation and agent-supplied names at the safe-outputs MCP boundary instead of failing when labels are applied.
Adds schema limits for workflow labels and static safe-output labels, including fallback and reporting issue labels. The MCP server enforces the same limit for string labels, structured label names, and both replacement-label fields before invoking a handler or recording an output. Legacy comma-separated and JSON-array issue labels are normalized before validation.
Counts Unicode characters rather than bytes, accepts exactly 50 characters, and leaves compile-time expressions, glob patterns, and runner labels unchanged. Updates documentation and adds compiler and MCP boundary coverage for both HTTP and stdio.
Validation
./pkg/parserand./pkg/workflow.npm run typecheck --prefix actions/setup/js --silentpassed.make agent-report-progressbuild, custom linters, schema freshness, and impacted tests passed. Its shared Go linter lock was resolved by rerunninggolangci-lint run --allow-serial-runners ./pkg/parser ./pkg/workflowwith zero issues.make agent-report-progress-no-testpassed, including JavaScript lint, build, and Go compile/vet. One existing JavaScript lint warning remains in unchanged code.