Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 31, 2025

Campaign orchestrators were writing metrics files without required fields (campaign_id, tasks_total, tasks_completed), causing validateCampaignMetricsSnapshot() to reject them during repo-memory push.

Changes

  • Template data: Added CampaignID field to CampaignPromptData struct and populate it in BuildOrchestrator()
  • Orchestrator instructions: Added complete JSON schema specification with validation rules to orchestrator_instructions.md
  • Template injection: Use {{ .CampaignID }} to inject actual campaign ID into example schema

Result

Orchestrators now receive explicit schema showing required structure:

{
  "campaign_id": "go-file-size-reduction-project64",
  "date": "YYYY-MM-DD",
  "tasks_total": 0,
  "tasks_completed": 0,
  "tasks_in_progress": 0,
  "tasks_blocked": 0,
  "velocity_per_day": 0.0,
  "estimated_completion": "YYYY-MM-DD",
  "kpi_trends": [...]
}

Required fields are explicitly documented with validation constraints (non-negative integers, YYYY-MM-DD format, exact campaign ID match). Optional fields are marked as such.

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 -json GO111MODULE ux-amd64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE rg/toolchain@v0.GOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login b/workflows -trimpath pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.linux-amd64/pkg/tool/linux_amd64/vet -p main mpile pkg/mod/golang.org/toolchain@v0.rev-parse (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login k/gh-aw/gh-aw/.github/workflows -trimpath (http block)

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

Original prompt

Fix campaigns by changing the workflow/agent that writes memory/campaigns/go-file-size-reduction-project64/metrics/<DATE>.json so it always outputs a metrics JSON that includes the fields the repo-memory push action validates:

  • add "campaign_id": for example "go-file-size-reduction-project64"
  • add "tasks_total":
  • add "tasks_completed":
    This prevents future failures because every new snapshot under that metrics path will satisfy validateCampaignMetricsSnapshot() in actions/setup/js/push_repo_memory.cjs and won’t error on missing campaign_id again.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Add CampaignID field to CampaignPromptData struct
- Update orchestrator to pass campaign ID to template
- Update orchestrator_instructions.md with complete JSON schema
- Specify required fields: campaign_id, date, tasks_total, tasks_completed
- Document optional fields with validation rules
- Recompile go-file-size-reduction-project64 workflow

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer mnkiefer marked this pull request as ready for review December 31, 2025 19:18
@mnkiefer
Copy link
Contributor

@copilot: Here is a complete example json

{
  "date": "2025-12-31",
  "campaign_id": "go-file-size-reduction-project64",

  "tasks_total": 0,
  "tasks_completed": 0,

  "largest_file_path": "pkg/cli/compile_orchestrator.go",
  "largest_file_loc": 1200,
  "files_over_threshold": 17,
  "issue_created": true
}

Copilot AI and others added 2 commits December 31, 2025 19:24
Copilot AI changed the title [WIP] Fix metrics JSON output for campaigns workflow Add required fields to campaign metrics JSON schema in orchestrator instructions Dec 31, 2025
Copilot AI requested a review from mnkiefer December 31, 2025 19:29
@mnkiefer mnkiefer merged commit 6a3f3c3 into main Dec 31, 2025
90 of 91 checks passed
@mnkiefer mnkiefer deleted the copilot/fix-metrics-json-output branch December 31, 2025 19:32
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