Skip to content

feat(naoru-ai): add naoru AI failure diagnosis to core build/deploy workflows#397

Open
clouddrove-ci wants to merge 1 commit into
masterfrom
feat/naoru-failure-diagnosis
Open

feat(naoru-ai): add naoru AI failure diagnosis to core build/deploy workflows#397
clouddrove-ci wants to merge 1 commit into
masterfrom
feat/naoru-failure-diagnosis

Conversation

@clouddrove-ci

Copy link
Copy Markdown
Member

What

Adds an opt-in naoru job to 5 core reusable workflows: tf-workflow, docker-build-push, helm-deploy, cf-deploy, ci.

On a failed run, naoru reads the failed job's logs (+ PR diff when present), asks an LLM for the root cause + a concrete fix, and posts it:

  • a sticky PR comment when the run has a PR, or
  • the job Step Summary on workflow_dispatch/schedule runs (no PR).

naoru: https://github.com/clouddrove/naoru — comment-only, never fails the build.

How it's wired

Each workflow gets a final job:

  naoru:
    needs: [<main job>]
    if: ${{ failure() }}
    ...
    steps:
      - env: { NAORU_KEY: ${{ secrets.NAORU_API_KEY }} }
        if: ${{ env.NAORU_KEY != '' }}
        uses: clouddrove/naoru@v0

Backward compatibility

  • No NAORU_API_KEY set → the step is skipped (gated on the secret), job is a green no-op. Existing callers are unaffected.
  • naoru is fail-safe: a bad/empty key produces a warning and exits 0; it never fails a build.
  • Reusable workflows declare NAORU_API_KEY as an optional secret; ci.yml (not a reusable workflow) uses the repo secret directly.

To enable (per consuming repo/org)

  1. Set an NAORU_API_KEY secret (OpenRouter key by default; provider/model overridable).
  2. For reusable-workflow callers, pass it through (secrets: inherit or explicit NAORU_API_KEY:).

Scope

Core build/deploy set first. Scanners (prowler/tfsec/checkov), tf-drift (drift = expected), and PR-automation workflows intentionally excluded. Easy to extend later — same 1 job per workflow.

Adds an opt-in naoru job (if: failure()) to tf-workflow, docker-build-push,
helm-deploy, cf-deploy, and ci. On a failed run it reads the failed job's logs
and posts a root-cause + fix (PR comment, or Step Summary on dispatch/schedule).

Backward compatible: the step is gated on NAORU_API_KEY being set, so callers
that don't provide the secret get a no-op (skipped) step. naoru itself is
fail-safe and never fails the build.
@clouddrove-ci clouddrove-ci requested review from a team and anmolnagpal as code owners June 12, 2026 21:52
@clouddrove-ci clouddrove-ci requested a review from dverma-cd June 12, 2026 21:52
@clouddrove-ci clouddrove-ci changed the title feat: AI failure diagnosis (naoru) for core build/deploy workflows feat(workflows): add naoru AI failure diagnosis to core build/deploy workflows Jun 12, 2026
@clouddrove-ci clouddrove-ci added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Jun 12, 2026
@clouddrove-ci

Copy link
Copy Markdown
Member Author

Retitled with scope and added labels to satisfy PR validation.

@hahirwar-cd hahirwar-cd changed the title feat(workflows): add naoru AI failure diagnosis to core build/deploy workflows feat(c-deploy): add naoru AI failure diagnosis to core build/deploy workflows Jun 15, 2026
@hahirwar-cd hahirwar-cd changed the title feat(c-deploy): add naoru AI failure diagnosis to core build/deploy workflows feat(cf-deploy): add naoru AI failure diagnosis to core build/deploy workflows Jun 15, 2026
@hahirwar-cd hahirwar-cd changed the title feat(cf-deploy): add naoru AI failure diagnosis to core build/deploy workflows feat(naoru-ai): add naoru AI failure diagnosis to core build/deploy workflows Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants