Support max-patch-size / max-patch-files under safe-outputs.create-pull-request#33650
Merged
Conversation
…uest Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Add parser support for create-pull-request patch size/file limits
Support May 20, 2026
max-patch-size / max-patch-files under safe-outputs.create-pull-request
Collaborator
|
@copilot review push-pull-request-branch as well |
Copilot created this pull request from a session on behalf of
pelikhan
May 20, 2026 23:54
View session
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates workflow schema + safe-outputs compilation so max-patch-size / max-patch-files are accepted under safe-outputs.create-pull-request as documented, and ensures handler-specific limits take precedence over global safe-outputs defaults.
Changes:
- Extended the main workflow JSON schema to allow
safe-outputs.create-pull-request.max-patch-sizeandsafe-outputs.create-pull-request.max-patch-files(and addedmax-patch-sizeforpush-to-pull-request-branch). - Added config model fields for create-pull-request patch limits and updated handler config emission so per-handler values override global
safe-outputsvalues. - Added/updated tests covering schema validation acceptance and handler-config precedence; regenerated multiple workflow lockfiles.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/push_to_pull_request_branch.go | Parse max-patch-size override for push-to-pull-request-branch config. |
| pkg/workflow/create_pull_request.go | Add per-handler patch limit fields to CreatePullRequestsConfig. |
| pkg/workflow/config_parsing_helpers_test.go | Add unit test for parsing push-to-pull-request-branch max-patch-size. |
| pkg/workflow/compiler_safe_outputs_handlers.go | Apply per-handler patch-limit precedence when building handler manager config. |
| pkg/workflow/compiler_safe_outputs_config_test.go | Add regression tests for per-handler patch-limit overrides vs globals. |
| pkg/parser/schemas/main_workflow_schema.json | Add schema properties for nested patch limits under safe-outputs handlers. |
| pkg/parser/schema_test.go | Add schema tests asserting new properties exist in schema. |
| pkg/parser/schema_location_test.go | Add schema-location validation tests for nested patch-limit acceptance. |
| .github/workflows/workflow-skill-extractor.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/weekly-issue-summary.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/uk-ai-operational-resilience.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/typist.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/terminal-stylist.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/stale-repo-identifier.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/smoke-copilot.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/smoke-copilot-arm.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/sergo.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/schema-consistency-checker.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/safe-output-health.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/research.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/repository-quality-improver.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/repo-tree-map.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/repo-audit-analyzer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/python-data-charts.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/prompt-clustering-analysis.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/poem-bot.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/pdf-summary.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/org-health-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/mcp-inspector.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/lockfile-stats.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/lint-monster.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/issue-arborist.lock.yml | Regenerated lockfile (validation JSON + embedded config heredoc IDs updated). |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/github-mcp-tools-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/github-mcp-structural-analysis.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/firewall-escape.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/example-workflow-analyzer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/docs-noob-tester.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/developer-docs-consolidator.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/delight.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/deep-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-token-consumption-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-team-status.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-team-evolution-insights.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-syntax-error-quality.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-sentrux-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-security-red-team.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-security-observability.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-secrets-analysis.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-safe-outputs-conformance.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-safe-output-optimizer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-safe-output-integrator.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-repo-chronicle.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-rendering-scripts-verifier.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-regulatory.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-performance-summary.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-otel-instrumentation-advisor.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-observability-report.lock.yml | Regenerated lockfile (validation JSON + embedded config heredoc IDs updated). |
| .github/workflows/daily-news.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-multi-device-docs-tester.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-mcp-concurrency-analysis.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-malicious-code-scan.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-issues-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-hippo-learn.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-grafana-otel-instrumentation-advisor.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-geo-optimizer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-function-namer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-firewall-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-experiment-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-doc-healer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-compiler-threat-spec-optimizer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-compiler-quality.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-code-metrics.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-cli-tools-tester.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-cli-performance.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-cache-strategy-analyzer.lock.yml | Regenerated lockfile (validation JSON + embedded config heredoc IDs updated). |
| .github/workflows/daily-architecture-diagram.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/daily-agentrx-trace-optimizer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/copilot-session-insights.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/copilot-pr-merged-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/copilot-cli-deep-research.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/copilot-agent-analysis.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/constraint-solving-potd.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/commit-changes-analyzer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/claude-code-user-docs-review.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/blog-auditor.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/auto-triage-issues.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/audit-workflows.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/artifacts-summary.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/api-consumption-report.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/agent-persona-explorer.lock.yml | Regenerated lockfile (validation JSON updated). |
| .github/workflows/agent-performance-analyzer.lock.yml | Regenerated lockfile (validation JSON updated). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 95/95 changed files
- Comments generated: 2
Comment on lines
+179
to
+183
| // Parse max-patch-size override (optional, must be > 0) | ||
| if maxPatchSize, exists := configMap["max-patch-size"]; exists { | ||
| if maxPatchSizeInt, ok := typeutil.ParseIntValue(maxPatchSize); ok && maxPatchSizeInt > 0 { | ||
| pushToBranchConfig.MaxPatchSize = maxPatchSizeInt | ||
| } |
Comment on lines
+7871
to
+7875
| "max-patch-size": { | ||
| "type": "integer", | ||
| "description": "Maximum allowed size for git patches in kilobytes (KB) for push-to-pull-request-branch only. Overrides safe-outputs max-patch-size for this output type. Defaults to 1024 KB (1 MB) when unset.", | ||
| "minimum": 1, | ||
| "maximum": 10240 |
Collaborator
|
@copilot merge main and recompile |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
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.
create-pull-requestdocs showmax-patch-sizeandmax-patch-filesin handler config, but parser validation rejected that placement as unknown properties. This change aligns schema + config parsing so these fields are accepted where documented and applied with correct precedence.Schema alignment
safe-outputs.create-pull-request.max-patch-size(integer, KB) to the main workflow schema.safe-outputs.create-pull-request.max-patch-files(integer, unique file count) to the same schema node.Config model + precedence
CreatePullRequestsConfigwith:max-patch-sizemax-patch-filessafe-outputsdefaults when both are set.Parser/compiler coverage
create-pull-requestpatch limits validates successfully.With this shape,
create_pull_requestnow receivesmax_patch_size=2048andmax_patch_files=300.