Skip to content

daily-ambient-context-optimizer: add gh-aw CLI preflight and noop fallback path#36792

Closed
Copilot wants to merge 4 commits into
mainfrom
copilot/daily-ambient-context-optimizer-again
Closed

daily-ambient-context-optimizer: add gh-aw CLI preflight and noop fallback path#36792
Copilot wants to merge 4 commits into
mainfrom
copilot/daily-ambient-context-optimizer-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 4, 2026

The daily ambient-context optimizer could produce empty output when MCP CLI commands were unavailable. This change makes CLI readiness explicit and adds a deterministic fallback path so runs fail clearly instead of silently yielding empty reports.

  • Workflow runtime readiness

    • Adds an explicit setup step to install/upgrade github/gh-aw as a gh extension before analysis begins.
    • Verifies CLI availability with gh aw --version during setup.
  • Prompt-level preflight contract

    • Adds an MCP CLI Preflight section requiring:
      • gh --version
      • gh aw --version
      • gh aw logs --help
    • Instructs the agent to stop early and emit noop with the failed command when preflight fails.
  • Safe-output wiring for failure handling

    • Extends safe-outputs.noop config with explicit limits/behavior to support the preflight failure path (max, report-as-issue).
safe-outputs:
  noop:
    max: 1
    report-as-issue: true

steps:
  - name: Install gh-aw CLI
    env:
      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    run: |
      if gh extension list | grep -q "github/gh-aw"; then
        gh extension upgrade gh-aw || true
      else
        gh extension install github/gh-aw
      fi
      gh aw --version

Copilot AI and others added 3 commits June 4, 2026 02:55
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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] Optimize daily ambient context daily-ambient-context-optimizer: add gh-aw CLI preflight and noop fallback path Jun 4, 2026
Copilot AI requested a review from pelikhan June 4, 2026 03:03
Copy link
Copy Markdown
Collaborator

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot update to use cli-proxy, gh-proxy and the agenticworkflows cli

Comment on lines +42 to +51
- name: Install gh-aw CLI
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if gh extension list | grep -q "github/gh-aw"; then
gh extension upgrade gh-aw || true
else
gh extension install github/gh-aw
fi
gh aw --version
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot it is installed. This is not the problem.

@pelikhan pelikhan closed this Jun 4, 2026
Copilot stopped work on behalf of pelikhan due to an error June 4, 2026 03:09
Copilot AI requested a review from pelikhan June 4, 2026 03:09
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.

[ambient-context] Daily Ambient Context Optimizer - 2026-06-04

2 participants