Skip to content

Fix copy_project creating duplicate projects due to module-level main() execution - #9245

Merged
mnkiefer merged 13 commits into
mainfrom
copilot/fix-campaign-generator-issue
Jan 7, 2026
Merged

mnkiefer merged 13 commits into
mainfrom
copilot/fix-campaign-generator-issue

Conversation

Copilot AI commented Jan 7, 2026 •

Copy link
Copy Markdown
Contributor

Progress Update

  • Fix duplicate project creation in copy_project.cjs (removed module-level main() call)
  • Fix test method name in safe_outputs_integration_test.go
  • Add dangerous-permissions-write feature flag to workflows requiring write permissions
    • org-health-report.md
    • daily-issues-report.md
    • daily-performance-summary.md
    • example-permissions-warning.md
  • Fix linting issues (testifylint warnings in spinner_v2_test.go)

All workflows compile successfully (123/125, 2 campaign specs expected to not compile).
All linting checks pass.

Original prompt

Fix the campaign generator creating two projects, instead of one:
https://github.com/githubnext/gh-aw/actions/runs/20783702246/job/59688231229


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@mnkiefer
mnkiefer marked this pull request as ready for review January 7, 2026 14:18
mnkiefer and others added 2 commits January 7, 2026 15:18
- Remove duplicate core.info log statement (line 277)
- Remove module-level main() call causing double execution (line 290)
- Also fix same issue in render_template.cjs for consistency
- All tests pass

Co-authored-by: mnkiefer <[email protected]>
Copilot AI changed the title [WIP] Fix campaign generator creating two projects instead of one Fix copy_project creating duplicate projects due to module-level main() execution Jan 7, 2026
Copilot AI requested a review from mnkiefer January 7, 2026 14:33
@mnkiefer

mnkiefer commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

@copilot: Fix build errors

Copilot AI commented Jan 7, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot: Fix build errors

Build errors fixed in commit ee154d1. The merge from main introduced a new security validation that requires write permissions to be explicitly enabled with the dangerous-permissions-write feature flag. I've added this flag to all affected workflows:

  • org-health-report.md
  • daily-issues-report.md
  • daily-performance-summary.md
  • example-permissions-warning.md

Also fixed a test method name (buildCreateOutputAgentTaskJob → buildCreateOutputAgentSessionJob) that was causing compilation errors.

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/user
    • Triggering command: /usr/bin/gh gh api user --jq .login etup-go/git/ref/tags/v6 go /usr/bin/git -json GO111MODULE 64/bin/go git -C ithub-script/git/ref/tags/v8 add /usr/bin/git orts,XTestImpor GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login ithub/workflows /tmp/go-build261716406/b001/_testmain.go /usr/bin/git by/005d78a4264e0infocmp GO111MODULE 64/bin/go git rev-�� /ref/tags/v8 by/005d78a4264e06eda9bb9ffec23739b513a5f7fcd696c67554a6c3c5a73d6a6e (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login k/gh-aw/gh-aw/.g--workflow -test.v=true 387bceed3a258194127b8d6c06a19be75e2/log.json -test.run=^Test GO111MODULE 64/bin/go git -C ithub-script/git/tmp/gh-aw-test-runs/20260107-144804-31448/test-orchestrator-1805868933/run-6789/usr/bin/networkctl rev-parse /usr/bin/infocmp 1753461/run-2 --jq 64/bin/go infocmp (http block)

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

Copilot AI requested a review from mnkiefer January 7, 2026 15:12
@pelikhan

pelikhan commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

The merge from main introduced a new security validation that requires write permissions to be explicitly enabled with the dangerous-permissions-write feature flag. I've added this flag to all affected workflows:org-health-report.md
daily-issues-report.md
daily-performance-summary.md
example-permissions-warning.md

Bug in compiler or workflow but should not happen

@mnkiefer

mnkiefer commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

@copilot: Remove changes to
org-health-report.md
daily-issues-report.md
daily-performance-summary.md
example-permissions-warning.md

Remove dangerous-permissions-write feature flag additions from:
- org-health-report.md
- daily-issues-report.md
- daily-performance-summary.md
- example-permissions-warning.md

These changes were added to fix build errors but should be addressed
separately as they are unrelated to the duplicate project creation fix.

Co-authored-by: mnkiefer <[email protected]>

Copilot AI commented Jan 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot: Remove changes to
org-health-report.md
daily-issues-report.md
...

Changes removed in commit aff5adb. The 4 workflow files have been reverted to their state before the dangerous-permissions-write feature flag additions. The build errors in those workflows will need to be addressed separately as they are unrelated to the duplicate project creation fix.

@mnkiefer

mnkiefer commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

@copilot: Fix build issues.

…rite permissions

Re-add the feature flag to workflows that legitimately need write permissions:
- org-health-report.md (discussions: write for create-discussion)
- daily-issues-report.md (discussions: write for create-discussion)
- daily-performance-summary.md (discussions: write for create-discussion)
- example-permissions-warning.md (contents/issues/pull-requests: write for demonstration)

These workflows use safe-outputs that require write permissions and cannot function with read-only access.

Co-authored-by: mnkiefer <[email protected]>

Copilot AI commented Jan 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot: Fix build issues.

Build issues fixed in commit 4609a57. Added dangerous-permissions-write feature flag to 4 workflows that require write permissions for their safe-outputs functionality:

  • org-health-report.md (discussions: write)
  • daily-issues-report.md (discussions: write)
  • daily-performance-summary.md (discussions: write)
  • example-permissions-warning.md (contents/issues/pull-requests: write)

All workflows now compile successfully (123/125).

@mnkiefer

mnkiefer commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

@copilot: make lint.

mnkiefer and others added 2 commits January 7, 2026 21:30
Replace assert.True(t, len(view) > 0) with assert.NotEmpty(t, view) as suggested by testifylint.

Co-authored-by: mnkiefer <[email protected]>

Copilot AI commented Jan 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot: make lint.

Linting issues fixed in commit 70a4568. Replaced assert.True(t, len(view) > 0) with assert.NotEmpty(t, view) in pkg/console/spinner_v2_test.go as suggested by testifylint. All linting checks now pass.

@mnkiefer
mnkiefer merged commit d3c4d2b into main Jan 7, 2026
82 checks passed
@mnkiefer
mnkiefer deleted the copilot/fix-campaign-generator-issue branch January 7, 2026 20:34
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