chore: update AGENTS.md to make it agent ready#1280
chore: update AGENTS.md to make it agent ready#1280dbasunag wants to merge 3 commits intoopendatahub-io:mainfrom
Conversation
Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/wip', '/cherry-pick', '/lgtm', '/verified', '/build-push-pr-image', '/hold'} |
📝 WalkthroughWalkthroughUpdates 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
AGENTS.md (1)
73-73: Replace deprecatedpdb.set_trace()withbreakpoint().
breakpoint()is the recommended approach since Python 3.7 and respectsPYTHONBREAKPOINTenvironment 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
📒 Files selected for processing (1)
AGENTS.md
|
|
||
| ```bash | ||
| # 1. Log in to the target OpenShift cluster | ||
| oc login --server=<cluster-api-url> --token=<token> |
There was a problem hiding this comment.
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.
|
Not needed. |
Pull Request
Summary
Related Issues
How it has been tested
Additional Requirements
Summary by CodeRabbit