Skip to content

Support max-patch-size / max-patch-files under safe-outputs.create-pull-request#33650

Merged
pelikhan merged 5 commits into
mainfrom
copilot/check-max-patch-size-support
May 21, 2026
Merged

Support max-patch-size / max-patch-files under safe-outputs.create-pull-request#33650
pelikhan merged 5 commits into
mainfrom
copilot/check-max-patch-size-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 20, 2026

create-pull-request docs show max-patch-size and max-patch-files in 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

    • Added safe-outputs.create-pull-request.max-patch-size (integer, KB) to the main workflow schema.
    • Added safe-outputs.create-pull-request.max-patch-files (integer, unique file count) to the same schema node.
  • Config model + precedence

    • Extended CreatePullRequestsConfig with:
      • max-patch-size
      • max-patch-files
    • Updated safe-output handler config generation so per-handler values override global safe-outputs defaults when both are set.
  • Parser/compiler coverage

    • Added regression coverage to ensure frontmatter with nested create-pull-request patch limits validates successfully.
    • Added coverage to ensure emitted handler config uses nested values over global values.
safe-outputs:
  max-patch-size: 1024
  max-patch-files: 100
  create-pull-request:
    max-patch-size: 2048
    max-patch-files: 300

With this shape, create_pull_request now receives max_patch_size=2048 and max_patch_files=300.

Copilot AI and others added 3 commits May 20, 2026 23:44
…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 max-patch-size / max-patch-files under safe-outputs.create-pull-request May 20, 2026
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot review push-pull-request-branch as well

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 21, 2026

@copilot review push-pull-request-branch as well

Addressed in d92b32a: added max-patch-size support under safe-outputs.push-to-pull-request-branch (schema + parsing + handler precedence override + regression tests), so this path now mirrors the create-pull-request behavior.

@pelikhan pelikhan marked this pull request as ready for review May 21, 2026 00:20
Copilot AI review requested due to automatic review settings May 21, 2026 00:20
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

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-size and safe-outputs.create-pull-request.max-patch-files (and added max-patch-size for push-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-outputs values.
  • 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
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main and recompile

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 21, 2026

@copilot merge main and recompile

Done in f0320da — merged latest main into this branch, resolved lockfile merge conflicts, and ran make recompile to regenerate compiled workflow artifacts.

@pelikhan pelikhan merged commit aaa7b6d into main May 21, 2026
@pelikhan pelikhan deleted the copilot/check-max-patch-size-support branch May 21, 2026 01:09
Copilot stopped work on behalf of pelikhan due to an error May 21, 2026 01:09
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.

3 participants