[docs] Harmonized AGENTS.md with @openwisp guidelines - #165
Conversation
Aligned this repository's AGENTS.md with @openwisp contributing guidelines and its technology-family conventions. Removed redundant generic instructions while preserving repository-specific requirements, commands, and safety guidance.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Previous Review Summaries (3 snapshots, latest commit b0e2563)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit b0e2563)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Previous review (commit 51c2534)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous review (commit 8801ad0)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by laguna-s-2.1:free · Input: 238.2K · Output: 14.8K · Cached: 117.4K |
|
Warning Review limit reached
Next review available in: 44 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe contributor guidance now includes specific rules for compatibility, imports, naming, comments, documentation, testing, troubleshooting, focused changes, clarification, branching, commits, and review fixes. The QA test requirements now install Estimated code review effort: 1 (Trivial) | ~5 minutes Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (7 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Line 34: Update the regression-test guidance in AGENTS.md so bug fixes require
a deterministic test that reproduces the bug and fails before the fix is
applied. Align the related exception guidance so tests may be skipped only for
explicitly defined cases, such as one-line changes or impractical GitHub Actions
fixes, and remove or revise any weaker duplicate rule to reference this
requirement.
In `@requirements-test.txt`:
- Line 3: Update the openwisp-utils dependency reference in
requirements-test.txt to use a tagged pre-release or immutable commit SHA
instead of the floating master archive, selecting a version that includes the
required QA tooling; if neither is available, confirm the temporary exception
with maintainers.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d3c3ec1a-c730-49f6-b5ce-80c63ccf6a03
📒 Files selected for processing (2)
AGENTS.mdrequirements-test.txt
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*
📄 CodeRabbit inference engine (Custom checks)
**/*: If a pull request is flagged as invalid, immediately stop reviewing it.
For bug fixes, verify that the patch fixes the root cause rather than hiding or bypassing the problem.
For bug fixes, require a deterministic regression test that reproduces the bug, fails without the patch, and is included unless the fix is a valid exception such as a one-line change or impractical GitHub Actions workflow fix.
For user-interface bug fixes, include a Selenium browser regression test or raise a warning when it is missing.
Reject or flag tests that are flaky or nondeterministic, including tests dependent on timing, sleeps, system time, randomness without a fixed seed, race conditions, network access, external services, filesystem state, environment configuration, execution order, shared global state, hardcoded ports, or improperly awaited asynchronous operations.
For change requests, update documentation when documented behavior changes, include screenshots or recordings for UI changes, update tests for non-trivial behavior changes, and flag breaking behavior or public API changes without a migration path.
For feature requests, require an accepted issue validated by an organization member, documentation of the feature, tests with no significant coverage decrease, Selenium tests when UI behavior is affected, and screenshots or recordings for UI changes.
Flag potential security vulnerabilities.
Flag obvious performance regressions such as heavy loops, repeated I/O, or unoptimized queries.
Add concise explanatory comments for cryptic or non-obvious code such as regexes, complex shell commands, or hard-to-read logic; avoid comments or docstrings when the code is already clear.
Keep code formatting compact and readable, without excessive blank lines, especially inside functions or methods.
Flag unused or redundant code.
Flag outdated or incorrect documentation, comments, or docstrings.
Use descriptive and consistent names for variables, functions, classes, and files.
Ensure tes...
Files:
requirements-test.txtAGENTS.md
**/AGENTS.md
📄 CodeRabbit inference engine (Custom checks)
When AGENTS.md is present, verify that the code follows the rules defined in it.
Files:
AGENTS.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Use README.rst for setup, package usage, and baseline test commands; use .github/workflows/ci.yml for CI-tested dependencies, QA and test commands, environment variables, and supported Python versions. If instructions conflict, repository configuration and CI workflows take precedence, followed by documentation and this file.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Follow DRY and do not duplicate information or code across files.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Before adding a comment or docstring, determine whether it conveys information a reader cannot infer from clear code, names, and surrounding scope.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Run openwisp-qa-format after editing when available.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: If documentation and CI commands differ, use CI for verification and report the exact documentation and workflow paths and differing commands; do not change documentation without explicit user choice.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Before editing, inspect the relevant implementation, tests, documentation, and configuration; follow existing repository patterns and do not invent behavior or requirements.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Keep each contribution focused and change only lines necessary for its goal; avoid unrelated refactors, formatting churn, and generated or dependency-file changes unless explicitly required.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Add or update focused tests for every behavior change; when no dedicated automated test suite exists, use the documented build and QA workflow for verification.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Run relevant targeted tests, builds, and documented QA checks, including ./run-qa-checks when provided; do not claim completion when verification fails, and report failures or blockers.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: When requirements, intended behavior, or an unexpected failure are unclear, stop and seek clarification instead of making speculative changes.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: When starting work on a new issue, create a new branch from master; use issues/<issue-number>-<short-title> for issue work, otherwise use a short descriptive branch name.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Commit messages must be descriptive and use past tense; issue commits must use an allowed prefix, a capitalized past-tense subject ending with #<issue-number>, and repeat the issue reference in the body using an appropriate relation.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Add an explanatory commit body only for substantial changes, new features, or non-obvious bug fixes; write releasable commit subjects in clear, user-friendly language.
Learnt from: CR
Repo: openwisp/netdiff
Timestamp: 2026-08-04T14:59:01.726Z
Learning: Send new commits in response to review feedback instead of amending existing commits.
🔇 Additional comments (1)
AGENTS.md (1)
28-30: LGTM!Also applies to: 35-40, 43-48, 50-53, 55-60
- Listed "Contributing Guidelines" rules early on, some rules have been adapted to this repository to avoid ambiguity. - Ensured following rules do not repeat nor contradict the rules listed in "Contributing Guideliens".
b0e2563 to
5f8244e
Compare
|
@coderabbitai do you see any issue? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '=== Changed files and diff ==='
git diff --unified=80 "$(git merge-base HEAD origin/HEAD)" HEAD -- AGENTS.md requirements-test.txt || true
echo '=== Current changed-file contents ==='
for file in AGENTS.md requirements-test.txt; do
if [ -f "$file" ]; then
echo "--- $file ---"
cat -n "$file"
fi
done
echo '=== PR review threads authored by CodeRabbit ==='
gh api graphql \
-F owner='openwisp' \
-F name='netdiff' \
-F number=165 \
-f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 20) {
nodes { author { login } body path line originalLine }
}
}
}
}
}
}' \
--jq '.data.repository.pullRequest.reviewThreads.nodes[]
| select(any(.comments.nodes[]; .author.login == "coderabbitai"))
| {id, isResolved, comments: [.comments.nodes[] | select(.author.login == "coderabbitai")]}'Length of output: 20840 🏁 Script executed: #!/bin/bash
set -euo pipefail
for thread_id in \
PRRT_kwDOAZLrJc6WX1an \
PRRT_kwDOAZLrJc6WX1ar
do
gh api graphql \
-F threadId="$thread_id" \
-f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread { id isResolved }
}
}' \
--jq '.data.resolveReviewThread.thread'
doneLength of output: 572
I resolved both CodeRabbit threads:
[resolve] You are interacting with an AI system. |
|
@coderabbitai do you see any issue? |
|
Tip For best results, initiate chat on the files or code changes. #!/bin/bash
set -euo pipefail
echo '=== Changed files ==='
git diff --name-status "$(git merge-base HEAD origin/HEAD)" HEAD
echo '=== Diff ==='
git diff --check "$(git merge-base HEAD origin/HEAD)" HEAD
git diff --unified=60 "$(git merge-base HEAD origin/HEAD)" HEAD -- AGENTS.md requirements-test.txt
echo '=== Current changed-file contents ==='
for file in AGENTS.md requirements-test.txt; do
if [ -f "$file" ]; then
echo "--- $file ---"
cat -n "$file"
fi
done
echo '=== Unresolved CodeRabbit review threads ==='
gh api graphql \
-F owner='openwisp' \
-F name='netdiff' \
-F number=165 \
-f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 20) {
nodes { author { login } body path line originalLine }
}
}
}
}
}
}' \
--jq '.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved == false)
| select(any(.comments.nodes[]; .author.login == "coderabbitai"))
| {id, comments: [.comments.nodes[] | select(.author.login == "coderabbitai")]}'You are interacting with an AI system. |
|
@coderabbitai resolve |
✅ Action performedComments resolved and changes approved. |
Description of Changes
AGENTS.mdwith the shared OpenWISP contributor guidance while retaining repository-specific instructions.N/A: Organization-wide maintenance change; no application code or user interface changed.