Skip to content

chore: update AGENTS.md to make it agent ready#1280

Closed
dbasunag wants to merge 3 commits intoopendatahub-io:mainfrom
dbasunag:update_agents
Closed

chore: update AGENTS.md to make it agent ready#1280
dbasunag wants to merge 3 commits intoopendatahub-io:mainfrom
dbasunag:update_agents

Conversation

@dbasunag
Copy link
Copy Markdown
Collaborator

@dbasunag dbasunag commented Mar 23, 2026

Pull Request

Summary

Related Issues

  • Fixes:
  • JIRA:

How it has been tested

  • Locally
  • Jenkins

Additional Requirements

  • If this PR introduces a new test image, did you create a PR to mirror it in disconnected environment?
  • If this PR introduces new marker(s)/adds a new component, was relevant ticket created to update relevant Jenkins job?

Summary by CodeRabbit

  • Documentation
    • Updated setup prerequisites and configuration documentation
    • Added debugging and execution tooling guidance
    • Enhanced documentation requirements for fixtures and utilities
    • Introduced key rules and style summary sections

Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
@dbasunag dbasunag requested a review from a team as a code owner March 23, 2026 21:43
@github-actions
Copy link
Copy Markdown

The following are automatically added/executed:

  • PR size label.
  • Run pre-commit
  • Run tox
  • Add PR author as the PR assignee
  • Build image based on the PR

Available user actions:

  • To mark a PR as WIP, add /wip in a comment. To remove it from the PR comment /wip cancel to the PR.
  • To block merging of a PR, add /hold in a comment. To un-block merging of PR comment /hold cancel.
  • To mark a PR as approved, add /lgtm in a comment. To remove, add /lgtm cancel.
    lgtm label removed on each new commit push.
  • To mark PR as verified comment /verified to the PR, to un-verify comment /verified cancel to the PR.
    verified label removed on each new commit push.
  • To Cherry-pick a merged PR /cherry-pick <target_branch_name> to the PR. If <target_branch_name> is valid,
    and the current PR is merged, a cherry-picked PR would be created and linked to the current PR.
  • To build and push image to quay, add /build-push-pr-image in a comment. This would create an image with tag
    pr-<pr_number> to quay repository. This image tag, however would be deleted on PR merge or close action.
Supported labels

{'/wip', '/cherry-pick', '/lgtm', '/verified', '/build-push-pr-image', '/hold'}

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 23, 2026

📝 Walkthrough

Walkthrough

Updates AGENTS.md documentation with setup prerequisites (Python 3.14+, uv, OpenShift), required and optional environment variables, debugging commands, and execution tooling guidance. Strengthens fixture and utility function documentation requirements with enforced docstring formats and introduces explicit style and rule sections.

Changes

Cohort / File(s) Summary
Documentation & Setup Guidance
AGENTS.md
Adds setup prerequisites, configuration (environment variables, runtime overrides), debugging commands (--pdb, verbose tracebacks), and execution tooling sections. Strengthens fixture/utility documentation requirements (one-line docstrings for fixtures, full Google-format docstrings for utilities). Introduces "Key Rules" (simplicity, consistency, security, conftest discipline, fixture ordering) and "Style Summary" (Google Python style, naming, docstrings, type annotations via mypy) sections.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is entirely empty scaffolding with no substantive content—Summary, Related Issues, and testing details are all placeholder comments with no actual information filled in. Fill in the Summary section with details about what was updated in AGENTS.md and why; link any relevant GitHub issues or JIRA tickets; indicate which testing was performed.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: updating AGENTS.md documentation to prepare it for AI agent usage.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown
Contributor

@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: 1

🧹 Nitpick comments (1)
AGENTS.md (1)

73-73: Replace deprecated pdb.set_trace() with breakpoint().

breakpoint() is the recommended approach since Python 3.7 and respects PYTHONBREAKPOINT environment variable for debugging flexibility.

♻️ Proposed modernization
 # Drop into pdb at a specific point (add to code)
-import pdb; pdb.set_trace()
+breakpoint()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` at line 73, Replace the deprecated pdb.set_trace() usage with the
modern breakpoint() call: remove or stop using the import pdb; pdb.set_trace()
statement and invoke breakpoint() instead so the debugger honors
PYTHONBREAKPOINT and other runtime hooks; also remove the now-unnecessary import
of pdb if no other references to pdb remain in the codebase.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Line 20: Add a security warning around the "oc login
--server=<cluster-api-url> --token=<token>" example (and the related content at
lines 33-36) explaining that tokens are sensitive and must not be exposed in
shell history, commit history, CI logs, or .env files; instruct readers to use
CI/secret managers for credentials, populate tokens from environment variables
or secure vaults (not inline), redact or avoid printing tokens in logs, add
.gitignore guidance for local env files, and recommend short-lived/rotated
tokens and immediate revocation if exposed.

---

Nitpick comments:
In `@AGENTS.md`:
- Line 73: Replace the deprecated pdb.set_trace() usage with the modern
breakpoint() call: remove or stop using the import pdb; pdb.set_trace()
statement and invoke breakpoint() instead so the debugger honors
PYTHONBREAKPOINT and other runtime hooks; also remove the now-unnecessary import
of pdb if no other references to pdb remain in the codebase.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 568cc60c-b8a6-41cc-bbc0-5849c66240e1

📥 Commits

Reviewing files that changed from the base of the PR and between 5957e10 and 2a2c119.

📒 Files selected for processing (1)
  • AGENTS.md


```bash
# 1. Log in to the target OpenShift cluster
oc login --server=<cluster-api-url> --token=<token>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add security guidance for sensitive credentials.

Lines 20 and 33-36 reference tokens and credentials without warning about secure handling. Exploit scenario: Developers may expose tokens in shell history, CI logs, or committed .env files. Remediation: Add explicit security warnings.

🔒 Proposed security guidance additions
 # 1. Log in to the target OpenShift cluster
+# WARNING: Avoid exposing tokens in shell history or CI logs. Use secure credential storage.
 oc login --server=<cluster-api-url> --token=<token>
 - **Jira connectivity** (for xfail/skip of known bugs): `PYTEST_JIRA_URL`, `PYTEST_JIRA_USERNAME`, `PYTEST_JIRA_TOKEN`
 - **S3 credentials** (model serving tests): `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `CI_S3_BUCKET_NAME`, `CI_S3_BUCKET_REGION`, `CI_S3_BUCKET_ENDPOINT`
 - **Model storage** (model serving tests): `MODELS_S3_BUCKET_NAME`, `MODELS_S3_BUCKET_REGION`, `MODELS_S3_BUCKET_ENDPOINT`
+
+⚠️ **Security**: Store credentials in secure vaults (e.g., 1Password, Vault). Never commit tokens or keys to version control. Use `.env` files with `.gitignore` or environment-specific secret management.

Also applies to: 33-36

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

In `@AGENTS.md` at line 20, Add a security warning around the "oc login
--server=<cluster-api-url> --token=<token>" example (and the related content at
lines 33-36) explaining that tokens are sensitive and must not be exposed in
shell history, commit history, CI logs, or .env files; instruct readers to use
CI/secret managers for credentials, populate tokens from environment variables
or secure vaults (not inline), redact or avoid printing tokens in logs, add
.gitignore guidance for local env files, and recommend short-lived/rotated
tokens and immediate revocation if exposed.

@dbasunag
Copy link
Copy Markdown
Collaborator Author

Not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants