Skip to content

Add regression coverage for Copilot Centralization Optimizer task fetch fallback#40739

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/aw-debug-copilot-centralization-optimizer-failure
Draft

Add regression coverage for Copilot Centralization Optimizer task fetch fallback#40739
Copilot wants to merge 3 commits into
mainfrom
copilot/aw-debug-copilot-centralization-optimizer-failure

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The Copilot Centralization Optimizer had a failure mode around agent task collection: if the task API fetch failed, downstream analysis could lose the expected dataset shape. This change adds regression coverage around the fallback path so the workflow keeps producing a valid empty dataset.

  • Problem locked in

    • Adds workflow-level regression coverage for the task collection fallback in copilot-centralization-optimizer.
    • Protects the contract that downstream steps receive task-summaries.json, even when gh api fails.
  • Source + compiled workflow coverage

    • Verifies the markdown workflow still contains the guarded task-fetch path.
    • Verifies the compiled .lock.yml still materializes the same fallback behavior.
  • Behavioral regression test

    • Extracts the Collect agent task data shell snippet from workflow frontmatter.
    • Runs it with a failing gh stub and asserts the workflow still writes an empty JSON array for downstream consumption.
cmd := exec.CommandContext(ctx, "bash", "-c", script)
// fake `gh` exits non-zero
output, err := cmd.CombinedOutput()

taskSummariesJSON, _ := os.ReadFile(filepath.Join(dataDir, "task-summaries.json"))
// expected fallback artifact for downstream analysis
string(taskSummariesJSON) == "[]"

Copilot AI and others added 2 commits June 22, 2026 06:40
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 [WIP] Debug Copilot Centralization Optimizer workflow failure Add regression coverage for Copilot Centralization Optimizer task fetch fallback Jun 22, 2026
Copilot AI requested a review from pelikhan June 22, 2026 06:43
@github-actions github-actions Bot mentioned this pull request Jun 22, 2026
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