Skip to content

chore: improve AI bug automation readiness#53

Merged
davidebianchi merged 1 commit intoopendatahub-io:mainfrom
ugiordan:feat/ai-readiness-improvements
Mar 23, 2026
Merged

chore: improve AI bug automation readiness#53
davidebianchi merged 1 commit intoopendatahub-io:mainfrom
ugiordan:feat/ai-readiness-improvements

Conversation

@ugiordan
Copy link
Copy Markdown
Member

@ugiordan ugiordan commented Mar 20, 2026

Summary

Improve AI bug automation readiness score for the odh-cli repository:

  • Add structured bug report template (.github/ISSUE_TEMPLATE/bug_report.yml) with PII warning and duplicate-check checkbox
  • Add pull request template (.github/pull_request_template.md)
  • Add pre-commit configuration (.pre-commit-config.yaml) with golangci-lint and local go hooks
  • Enhance CLAUDE.md with inline architecture, build, test, and debug content
  • Add OWNERS file
  • Add ADR for CLI architecture (docs/adr/0001-cli-architecture.md)
  • Add test coverage profile output (-coverprofile=coverage.out)

Test plan

  • Pre-commit hooks pass
  • Verify bug report template renders correctly on GitHub
  • Verify PR template appears when creating new PRs

Summary by CodeRabbit

  • Documentation

    • Added comprehensive development guidelines covering CLI architecture, command lifecycle, testing conventions, and build/lint workflows.
    • Added reference to architecture decision records repository.
  • Chores

    • Established automated pre-commit hooks for code quality (trailing whitespace, YAML validation, merge conflict detection).
    • Added pull request template for consistent contribution submissions.
    • Enhanced test coverage reporting generation.
    • Defined code review governance structure.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces developer infrastructure and governance for the ODH CLI project. It adds a GitHub pull request template with structured sections for description, testing confirmation, and review checklist. A .pre-commit-config.yaml defines automated hooks for whitespace cleanup, YAML validation, merge conflict detection, and Go-specific tasks (formatting, vetting, testing). An OWNERS file establishes review governance. The Makefile's test target is modified to generate coverage profiles. Documentation updates include a new comprehensive AGENTS.md file detailing CLI architecture, command patterns, required workflows, testing conventions, and development standards, while the corresponding section in CLAUDE.md is removed. An ADR documentation placeholder is added linking to an external architecture-decision-records repository.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: improve AI bug automation readiness' is vague and overly broad, failing to clearly convey the specific changes made (templates, pre-commit hooks, documentation, coverage, OWNERS file). Replace with a more specific title that describes the primary changes, such as 'chore: add PR template, pre-commit config, and OWNERS file' or 'chore: add repository automation and documentation artifacts'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
OWNERS (1)

1-4: Single reviewer/approver creates review bottleneck.

Same individual in both lists means no independent review enforcement. Consider adding at least one additional approver for bus-factor resilience when the team grows.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@OWNERS` around lines 1 - 4, The OWNERS file currently lists the same person
under both "reviewers" and "approvers" which creates a single-person bottleneck;
update the YAML by adding at least one additional independent entry to
"approvers" (and optionally "reviewers") so that "ugiordan" is not the sole
approver—modify the "approvers:" list to include another team member's GitHub
handle (or a team alias) alongside "ugiordan" to enforce independent approval.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.pre-commit-config.yaml:
- Around line 13-17: The pre-commit hook using the "go-fmt" entry currently
calls "gofmt -w" directly (id: go-fmt, entry: gofmt -w), which conflicts with
CLAUDE.md guidance to "NEVER use gci/gofmt directly"; change the hook to invoke
the repository formatter target instead (call "make fmt") or otherwise
document/justify this exception: replace the entry value "gofmt -w" with "make
fmt" (or an equivalent wrapper target) so formatting runs via the canonical
Makefile target, ensuring consistency with CLAUDE.md.

In `@CLAUDE.md`:
- Line 30: The README claims the make target "check" runs "all quality gates
(lint + test)" but the Makefile's check target only depends on lint; either
update the docs or change the Makefile. Fix option: modify the Makefile so the
check target depends on both lint and test by changing the check rule to include
the test dependency (ensure targets named "check", "lint", and "test" are used
exactly as in the repo). Alternative: update CLAUDE.md to accurately describe
that "make check" only runs lint. Implement one of these two consistent changes
so docs and the Makefile match.

In `@Makefile`:
- Line 91: Add the generated coverage profile filename to .gitignore: update the
repository's .gitignore to include "coverage.out" so the file produced by the
Makefile test rule (the line running "go test -coverprofile=coverage.out ./...")
is ignored and not accidentally committed.

---

Nitpick comments:
In `@OWNERS`:
- Around line 1-4: The OWNERS file currently lists the same person under both
"reviewers" and "approvers" which creates a single-person bottleneck; update the
YAML by adding at least one additional independent entry to "approvers" (and
optionally "reviewers") so that "ugiordan" is not the sole approver—modify the
"approvers:" list to include another team member's GitHub handle (or a team
alias) alongside "ugiordan" to enforce independent approval.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 7feb173b-5419-4055-89a4-eb7c8d15a639

📥 Commits

Reviewing files that changed from the base of the PR and between 74f26e9 and 84c9a8a.

📒 Files selected for processing (7)
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/pull_request_template.md
  • .pre-commit-config.yaml
  • CLAUDE.md
  • Makefile
  • OWNERS
  • docs/adr/0001-cli-architecture.md

Comment thread .pre-commit-config.yaml
Comment thread CLAUDE.md Outdated
Comment thread Makefile
.PHONY: test
test:
go test ./...
go test -coverprofile=coverage.out ./...
Copy link
Copy Markdown

@coderabbitai coderabbitai bot Mar 20, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if coverage.out is in .gitignore
rg -l "coverage.out" .gitignore || echo "coverage.out not found in .gitignore"

Repository: opendatahub-io/odh-cli

Length of output: 102


Add coverage.out to .gitignore.

Generated coverage profiles should not be committed to the repository. coverage.out is not currently in .gitignore and will be created by the test target; add it to prevent accidental commits of generated artifacts.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` at line 91, Add the generated coverage profile filename to
.gitignore: update the repository's .gitignore to include "coverage.out" so the
file produced by the Makefile test rule (the line running "go test
-coverprofile=coverage.out ./...") is ignored and not accidentally committed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Already covered — the existing .gitignore has *.out and coverage.* patterns which match coverage.out. No change needed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the .gitignore patterns mentioned by the user
cat .gitignore

Length of output: 740


@ugiordan, you're correct — confirmed. The .gitignore already contains both *.out and coverage.* patterns, either of which independently covers coverage.out. My original comment was a false positive; no change is needed.

@ugiordan ugiordan force-pushed the feat/ai-readiness-improvements branch from 84c9a8a to 0441744 Compare March 20, 2026 17:22
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Around line 11-16: The fenced code block in CLAUDE.md currently lacks a
language identifier (triggering MD040); update the opening triple-backtick to
include a language tag (e.g., "text") for the block that lists cmd/, pkg/,
internal/, docs/ so the linter recognizes the code fence and silences MD040—edit
the fenced block surrounding those lines in CLAUDE.md to add the language
identifier.
- Around line 35-50: The document contains a contradictory policy: the
"CRITICAL: Always use `make` commands. Never invoke tools directly." rule
conflicts with the test guidance "For test failures: `go test -v ./pkg/<package>
-run TestName`"; pick one consistent policy and update both places
accordingly—either (A) enforce make-only by replacing the `go test` instruction
with a `make` equivalent (e.g., "Use make test for package tests, e.g., make
test PKG=./pkg/<package> RUN=TestName") and add an explicit exception format for
local debugging, or (B) remove/soften the CRITICAL prohibition and allow direct
`go test` by changing the CRITICAL line to permit direct tool invocation for
tests with a recommended `make` wrapper; apply the chosen change to the
"CRITICAL..." header and the "For test failures..." line so both reflect the
same policy.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: e21d56e1-389b-4d80-beaa-27d00d1e96c3

📥 Commits

Reviewing files that changed from the base of the PR and between 84c9a8a and 0441744.

📒 Files selected for processing (7)
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/pull_request_template.md
  • .pre-commit-config.yaml
  • CLAUDE.md
  • Makefile
  • OWNERS
  • docs/adr/0001-cli-architecture.md
✅ Files skipped from review due to trivial changes (5)
  • OWNERS
  • .github/pull_request_template.md
  • .pre-commit-config.yaml
  • docs/adr/0001-cli-architecture.md
  • .github/ISSUE_TEMPLATE/bug_report.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • Makefile

Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
@ugiordan ugiordan force-pushed the feat/ai-readiness-improvements branch from 0441744 to 8d644bc Compare March 20, 2026 17:28
Comment thread OWNERS Outdated
Comment thread docs/adr/0001-cli-architecture.md Outdated
Comment thread .github/ISSUE_TEMPLATE/bug_report.yml Outdated
@ugiordan ugiordan force-pushed the feat/ai-readiness-improvements branch 2 times, most recently from cd5b917 to 98d2c00 Compare March 23, 2026 10:27
@ugiordan
Copy link
Copy Markdown
Member Author

ugiordan commented Mar 23, 2026

Removed the bug report template. The issues should be reported through Jira since nobody is triaging GitHub issues. Thanks for the feedback @zdtsw.

@ugiordan ugiordan force-pushed the feat/ai-readiness-improvements branch from 6c98dcd to 51055d5 Compare March 23, 2026 13:14
@davidebianchi davidebianchi merged commit 567c8c6 into opendatahub-io:main Mar 23, 2026
5 checks passed
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.

3 participants