refactor: split 3 architecture BLOCKER files below 1,000-line threshold#26450
refactor: split 3 architecture BLOCKER files below 1,000-line threshold#26450
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b35df30c-6c59-44a3-ac98-fff2964cf0ad Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merger main and recompile |
…ions - Split maintenance_workflow.go (1,347→245 lines) into: - maintenance_cron.go: cron schedule helpers - maintenance_conditions.go: condition builder functions - side_repo_maintenance.go: SideRepoTarget and side-repo functions - maintenance_workflow_yaml.go: YAML content builder - Split compiler_orchestrator_workflow.go (1,125→440 lines) into: - workflow_builder.go: buildInitialWorkflowData + YAML extraction helpers - workflow_import_merge.go: step/service/job merge functions - workflow_github_app.go: GitHub App fallback functions - Split logs_orchestrator.go (1,077→598 lines) into: - logs_run_processor.go: concurrent artifact download + run filters All three BLOCKER files are now below the 1,000-line threshold. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b35df30c-6c59-44a3-ac98-fff2964cf0ad Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main and recompile |
…ure-violations-another-one Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in c9a2629 — merged 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Refactors several oversized workflow/compiler/CLI files into smaller, concern-focused units to satisfy the Architecture Guardian 1,000-line threshold and improve navigability.
Changes:
- Extracted import/service/job merge logic into
pkg/workflow/workflow_import_merge.go. - Extracted top-level GitHub App fallback resolution/application into
pkg/workflow/workflow_github_app.go. - Extracted maintenance cron + condition helpers into
pkg/workflow/maintenance_cron.goandpkg/workflow/maintenance_conditions.go. - Regenerated multiple workflow
*.lock.ymlfiles.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/workflow_import_merge.go | New helper module for merging imported services and jobs into compiled workflow data. |
| pkg/workflow/workflow_github_app.go | New helper module for resolving/applying top-level github-app fallback behavior. |
| pkg/workflow/maintenance_cron.go | New helper module for deterministic maintenance cron generation (including side-repo scattering). |
| pkg/workflow/maintenance_conditions.go | New helper module for maintenance job condition AST construction. |
| .github/workflows/workflow-normalizer.lock.yml | Lockfile regeneration; notable --allow-domains list change. |
| .github/workflows/weekly-issue-summary.lock.yml | Lockfile regeneration. |
| .github/workflows/stale-repo-identifier.lock.yml | Lockfile regeneration. |
| .github/workflows/smoke-test-tools.lock.yml | Lockfile regeneration. |
| .github/workflows/python-data-charts.lock.yml | Lockfile regeneration. |
| .github/workflows/prompt-clustering-analysis.lock.yml | Lockfile regeneration. |
| .github/workflows/portfolio-analyst.lock.yml | Lockfile regeneration. |
| .github/workflows/org-health-report.lock.yml | Lockfile regeneration. |
| .github/workflows/github-mcp-structural-analysis.lock.yml | Lockfile regeneration. |
| .github/workflows/deep-report.lock.yml | Lockfile regeneration. |
| .github/workflows/daily-repo-chronicle.lock.yml | Lockfile regeneration. |
| .github/workflows/daily-performance-summary.lock.yml | Lockfile regeneration. |
| .github/workflows/daily-news.lock.yml | Lockfile regeneration. |
| .github/workflows/daily-issues-report.lock.yml | Lockfile regeneration. |
| .github/workflows/daily-integrity-analysis.lock.yml | Lockfile regeneration. |
| .github/workflows/daily-firewall-report.lock.yml | Lockfile regeneration. |
| .github/workflows/daily-code-metrics.lock.yml | Lockfile regeneration. |
| .github/workflows/copilot-token-audit.lock.yml | Lockfile regeneration. |
| .github/workflows/copilot-session-insights.lock.yml | Lockfile regeneration. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Lockfile regeneration. |
| .github/workflows/audit-workflows.lock.yml | Lockfile regeneration. |
| .github/workflows/api-consumption-report.lock.yml | Lockfile regeneration. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 33/33 changed files
- Comments generated: 2
Done in bdb742e — merged latest 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
Architecture Guardian flagged three new BLOCKER violations (≥1,000 lines) introduced in #26382. All three files mixed multiple concerns — YAML generation, condition building, data construction, and concurrency logic — making them hard to navigate and test in isolation.
Changes
pkg/workflow/maintenance_workflow.go(1,347 → 245 lines)maintenance_cron.go—generateMaintenanceCron,generateSideRepoMaintenanceCron,sideRepoCronSeedmaintenance_conditions.go—buildNotForkCondition,buildDispatchOperationCondition,buildRunOperationCondition, and related helpersside_repo_maintenance.go—SideRepoTargettype,collectSideRepoTargets,generateAllSideRepoMaintenanceWorkflows,generateSideRepoMaintenanceWorkflowmaintenance_workflow_yaml.go—buildMaintenanceWorkflowYAMLextracted from the 639-lineGenerateMaintenanceWorkflow; also extractedscanWorkflowsForExpiresandhandleMaintenanceDisabledpkg/workflow/compiler_orchestrator_workflow.go(1,125 → 440 lines)workflow_builder.go—buildInitialWorkflowData,extractYAMLSections,extractConcurrencySection,extractDispatchItemNumber,processAndMergeSteps,processAndMergePreSteps,processAndMergePostStepsworkflow_import_merge.go—processAndMergeServices,mergeJobsFromYAMLImportsworkflow_github_app.go—extractTopLevelGitHubApp,resolveTopLevelGitHubApp,applyTopLevelGitHubAppFallbackspkg/cli/logs_orchestrator.go(1,077 → 598 lines)logs_run_processor.go—downloadRunArtifactsConcurrent(395 lines) +runContainsSafeOutputType+runHasDifcFilteredItemsNo behavioral changes — pure code organization. All public APIs and function signatures are unchanged.
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/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw --jq /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel sh /usr/bin/git git(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw node /usr/bin/bash git rev-�� --show-toplevel bash /usr/bin/git(http block)https://api.github.com/orgs/test-owner/actions/secrets/usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/link /usr/bin/git --show-toplevel git p/bin/bash git rev-�� --show-toplevel node /usr/bin/git 1/x64/bin/node git /opt/hostedtoolc-x git(http block)/usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -t security 64/bin/go OUTPUT -d 168.63.129.16 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)/usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ath ../../../.pr**/*.json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha "prettier" --write 'scripts/**/*.js' --ignore-path .prettierignore --log-level=e!../../../pkg/wogit 64/pkg/tool/linux_amd64/vet /usr/bin/sh /run/systemd/sysgit .cfg x_amd64/vet sh -c "prettier" --write '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path ../.git x_amd64/vet /usr/bin/git --noprofile(http block)/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha ules/.bin/sh git /opt/hostedtoolcache/node/24.14.1/x64/bin/node --show-toplevel bash /usr/bin/git node js/f�� 64/bin/go git /usr/bin/git --show-toplevel git /usr/bin/git git(http block)/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -test.paniconexit0 -test.timeout=10m0s /usr/sbin/bash -test.v=true git /usr/bin/git bash --no�� --noprofile git /usr/bin/git --show-toplevel git /usr/bin/git git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v3/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha *.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path ../../../.prettierignore x_amd64/asm bin/bash(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel /opt/hostedtoolcrev-parse /usr/bin/git git rev-�� --show-toplevel git ache/node/24.14.1/x64/bin/node --show-toplevel e/git-remote-httrev-parse /usr/bin/git git(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git 0a12cd1f --show-toplevel git /usr/bin/git git _inc�� --show-toplevel git ache/node/24.14.1/x64/bin/node --show-toplevel git /usr/bin/git git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v5/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha /var/log(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/link /usr/bin/git se 0115592/b040/vetrev-parse .cfg git rev-�� --show-toplevel ache/go/1.25.8/x**/*.cjs /usr/bin/git ath ../../../.prgit /sys/fs/cgroup ache/go/1.25.8/x--show-toplevel git(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/link /usr/bin/git ../pkg/workflow/git(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v8/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel ache/go/1.25.8/xformat:pkg-json /usr/bin/git se 0115592/b234/vetinit modules/@npmcli/run-script/lib/n--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git --noprofile(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel bash /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel gcc /usr/bin/git git(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel node /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel node /usr/bin/git git(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v9/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha 957103/b368/_pkg_.a x_amd64/compile 957103/b368=> ./../.prettieriggit b/gh-aw/pkg/workrev-parse 64/pkg/tool/linu--show-toplevel sh -c y-d8/sNXSpglMLgVGd5jzy-d8 64/pkg/tool/linux_amd64/vet /home/REDACTED/go/bin/sh origin .cfg 64/pkg/tool/linu--show-toplevel 957103/b368/importcfg(http block)Agenrev-parse 64/pkg/tool/linu--show-toplevel node` (http block)
Agenrev-parse 64/pkg/tool/linu--show-toplevel node` (http block)
Agenrev-parse a1affc2d3e1f0a68--show-toplevel node` (http block)
Agenrev-parse 64/pkg/tool/linu--show-toplevel sh` (http block)
Agenrev-parse 64/pkg/tool/linu--show-toplevel sh` (http block)