Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

Campaign spec validation was failing because validateCampaigns() used a global workflowDir parameter to locate referenced workflows, rather than using each campaign spec's own directory.

Changes

  • pkg/cli/compile_campaign.go: Modified validateCampaigns() to derive workflow directory from each spec's ConfigPath instead of using the global parameter
  • pkg/cli/compile_campaign_validation_test.go: Added test verifying campaigns validate using their own directory

Example

Before:

// All specs validated against same global directory
workflowProblems := campaign.ValidateWorkflowsExist(&spec, absWorkflowDir)

After:

// Each spec uses its own directory to find workflows
campaignDir := filepath.Dir(spec.ConfigPath)
if !filepath.IsAbs(campaignDir) {
    campaignDir = filepath.Join(gitRoot, campaignDir)
}
workflowProblems := campaign.ValidateWorkflowsExist(&spec, campaignDir)

This fixes compilation of both existing campaign files:

  • docs-quality-maintenance-project67.campaign.md
  • file-size-reduction-project71.campaign.md

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 workflows gh /usr/bin/git /ref/tags/v8 --jq 0/x64/bin/node git -C ithub/workflows config /usr/bin/git by/5ec84845b6c75gh infocmp /usr/bin/infocmpdownload git (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login /ref/tags/v8 gh by/5ec84845b6c75cc625d7ed6e0f1469b68a45df01371bce84d38a421cdfdb030a/log.json /repos/actions/ginfocmp --jq /usr/bin/gh gh auth�� purge-campaign-lock-3346377628/.github/workflows gh by/5ec84845b6c75cc625d7ed6e0f1469b68a45df01371bce84d38a421cdfdb030a/init.pid d38a421cdfdb030ainfocmp --jq /usr/bin/gh git (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login b/workflows rev-parse f4b8f2a4f7de7872e6a526e341004efccf2/log.json xterm-color e/git-remote-httrun /usr/bin/infocmpdownload infocmp -1 k/gh-aw/gh-aw/.g/tmp/gh-aw-test-runs/20260107-192640-41436/test-orchestrator-1704465491/run-1234/usr/bin/networkctl infocmp /usr/bin/git 1624471/run-3 infocmp (http block)

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

Original prompt

Fix the compilation of campaigns in the current build


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

Copilot AI and others added 2 commits January 7, 2026 19:17
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Campaign validation now uses each campaign spec's directory to find
referenced workflows, rather than using a global workflow directory
parameter. This fixes the issue where campaigns failed validation
when compiled individually from the command line.

Changes:
- Modified validateCampaigns() in pkg/cli/compile_campaign.go to use
  filepath.Dir(spec.ConfigPath) instead of absWorkflowDir
- Added test to verify campaigns validate with correct directory
- All campaign compilation tests pass

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix compilation of campaigns in current build Fix campaign validation to use spec directory instead of global workflow directory Jan 7, 2026
Copilot AI requested a review from pelikhan January 7, 2026 19:38
@pelikhan pelikhan marked this pull request as ready for review January 7, 2026 19:39
@pelikhan pelikhan merged commit d61a645 into main Jan 7, 2026
47 of 48 checks passed
@pelikhan pelikhan deleted the copilot/fix-compilation-campaigns branch January 7, 2026 19:40
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.

2 participants