docs(agents): add typed-test checklist to the ESLint suppressions guidance - #1420
Conversation
…dance Closes Zoo-Code-Org#1419. Agents kept adding blanket no-explicit-any suppression entries for large new test files (137 in the parallelMode spec of Zoo-Code-Org#977). Give the ESLint Suppressions section a concrete typed-test workflow so the existing "counts must never increase" rule is applied consistently at test-file scale: typed structural doubles, bracket notation for private members, single documented construction-site double assertions, the required check-types + vitest + eslint --prune-suppressions validation, and a maintainer-approved exception path. Documentation-only change.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughAGENTS.md adds a “Typed test files” subsection under “ESLint Suppressions.” It defines typing practices, validation commands, and maintainer approval requirements for unavoidable exceptions. ChangesTyped test guidance
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This documentation-only change adds guidance for typed test doubles and validation without altering product or runtime behavior; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation The PR satisfies issue Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) Full details: Description checkExplanation The description links issue ✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Review processThanks for contributing. This comment tracks the review sequence and the next action.
Current step: Required CI passed. Wait for CodeRabbit to approve the latest commit. |
|
@coderabbitai can you check all my pr and see can pass the review gate foreach pr |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="Zoo-Code-Org/Zoo-Code"
author="easonLiangWorldedtech"
echo "=== Open pull requests authored by ${author} ==="
gh pr list --repo "$repo" --author "$author" --state open --limit 100 \
--json number,title,url,isDraft,mergeStateStatus,reviewDecision,statusCheckRollup \
--jq '.[] | {
number,
title,
url,
isDraft,
mergeStateStatus,
reviewDecision,
checks: [
.statusCheckRollup[]? | {
name: (.name // .context),
status,
conclusion
}
]
}'
echo
echo "=== Review threads and reviews ==="
for pr in $(gh pr list --repo "$repo" --author "$author" --state open --limit 100 --json number --jq '.[].number'); do
echo "--- PR #${pr} ---"
gh api graphql \
-F owner="${repo%%/*}" \
-F name="${repo#*/}" \
-F number="$pr" \
-f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes { isResolved isOutdated comments(first: 1) { nodes { author { login } body } } }
}
reviews(first: 100) {
nodes { author { login } state submittedAt }
}
}
}
}' \
--jq '{
unresolvedThreads: [
.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved == false)
| {
outdated: .isOutdated,
author: .comments.nodes[0].author.login,
body: .comments.nodes[0].body
}
],
reviews: [
.data.repository.pullRequest.reviews.nodes[]
| {author: .author.login, state, submittedAt}
]
}'
doneLength of output: 2092 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="Zoo-Code-Org/Zoo-Code"
author="easonLiangWorldedtech"
prs="$(gh api --paginate "repos/${repo}/pulls?state=open&per_page=100" \
--jq ".[] | select(.user.login == \"${author}\") | .number")"
if [ -z "$prs" ]; then
echo "No open pull requests authored by ${author} were found in ${repo}."
exit 0
fi
for pr in $prs; do
echo "=== PR #${pr} ==="
gh api "repos/${repo}/pulls/${pr}" --jq '{
number,
title,
html_url,
draft,
state,
mergeable,
mergeable_state,
requested_reviewers: [.requested_reviewers[].login],
requested_teams: [.requested_teams[].slug]
}'
echo "-- Reviews --"
gh api --paginate "repos/${repo}/pulls/${pr}/reviews?per_page=100" \
--jq '[.[] | {user: .user.login, state, submitted_at}]'
echo "-- Check runs --"
head_sha="$(gh api "repos/${repo}/pulls/${pr}" --jq '.head.sha')"
gh api --paginate "repos/${repo}/commits/${head_sha}/check-runs?per_page=100" \
-H 'Accept: application/vnd.github+json' \
--jq '[.check_runs[] | {name, status, conclusion, details_url}]'
echo "-- Unresolved review threads --"
gh api graphql \
-F owner="${repo%%/*}" \
-F name="${repo#*/}" \
-F number="$pr" \
-f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
comments(first: 1) {
nodes { author { login } body path }
}
}
}
}
}
}' \
--jq '[.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved == false)
| {
outdated: .isOutdated,
author: .comments.nodes[0].author.login,
path: .comments.nodes[0].path,
body: .comments.nodes[0].body
}]'
doneLength of output: 202134 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="Zoo-Code-Org/Zoo-Code"
author="easonLiangWorldedtech"
echo "=== Base branch protection requirements ==="
branches="$(gh api --paginate "repos/${repo}/pulls?state=open&per_page=100" \
--jq ".[] | select(.user.login == \"${author}\") | .base.ref" | sort -u)"
for branch in $branches; do
printf '%s\t' "$branch"
gh api "repos/${repo}/branches/${branch}/protection" 2>/dev/null \
--jq '{
required_approvals: (.required_pull_request_reviews.required_approving_review_count // 0),
dismiss_stale_reviews: (.required_pull_request_reviews.dismiss_stale_reviews // false),
required_checks: [(.required_status_checks.contexts // [])[]],
strict_checks: (.required_status_checks.strict // false)
}' \
|| echo '{"protection":"unavailable"}'
done
echo
echo "=== Open pull request gate summary ==="
printf 'PR\tDraft\tMergeable\tMerge-state\tFailed/cancelled checks\tUnresolved threads\tLatest blocking reviews\tURL\n'
gh api --paginate "repos/${repo}/pulls?state=open&per_page=100" \
--jq ".[] | select(.user.login == \"${author}\") | .number" |
while read -r pr; do
pr_data="$(gh api "repos/${repo}/pulls/${pr}")"
draft="$(jq -r '.draft' <<<"$pr_data")"
mergeable="$(jq -r '.mergeable' <<<"$pr_data")"
merge_state="$(jq -r '.mergeable_state' <<<"$pr_data")"
url="$(jq -r '.html_url' <<<"$pr_data")"
sha="$(jq -r '.head.sha' <<<"$pr_data")"
bad_checks="$(gh api --paginate "repos/${repo}/commits/${sha}/check-runs?per_page=100" \
-H 'Accept: application/vnd.github+json' \
--jq '[.check_runs[] | select(.conclusion == "failure" or .conclusion == "cancelled" or .conclusion == "timed_out" or .conclusion == "action_required") | .name] | unique | join(",")')"
unresolved="$(gh api graphql \
-F owner="${repo%%/*}" -F name="${repo#*/}" -F number="$pr" \
-f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved}}}}}' \
--jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)] | length')"
blocking_reviews="$(gh api --paginate "repos/${repo}/pulls/${pr}/reviews?per_page=100" \
--jq '[.[] | select(.state == "CHANGES_REQUESTED") | .user.login] | unique | join(",")')"
printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n' \
"$pr" "$draft" "$mergeable" "$merge_state" "$bad_checks" "$unresolved" "$blocking_reviews" "$url"
done | sort -nLength of output: 7903
No pull request can currently pass the merge gate. Every pull request is either:
GitHub did not allow access to the PR
|
|
@coderabbitai How to clean the awaiting-coderabbit and coderabbit-review-active labels? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🤖 web_search executed:
Length of output: 16198
Do not remove To stop reviews for one pull request, post this top-level PR comment: After the review is no longer active, remove stale labels from the GitHub PR Labels menu. This only changes the GitHub label state. It does not disable CodeRabbit. A later push, To resume reviews later, post: If you want to remove these labels from many pull requests, do it in small groups and only after confirming that no review is active. I cannot perform a bulk label-removal action without maintainer confirmation. You are interacting with an AI system. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai resume |
✅ Action performedReviews resumed. |
|
@coderabbitai do I need to ask you to approve to pass the |
|
Tip For best results, initiate chat on the files or code changes.
Use it after CodeRabbit finishes the review and all review findings are resolved. This command only provides the CodeRabbit approval. It cannot satisfy other GitHub merge requirements, such as:
For PR You are interacting with an AI system. |
|
Tip For best results, initiate chat on the files or code changes.
Run this command after CodeRabbit completes its review and you resolve its findings. This approval does not satisfy other GitHub merge requirements. The pull request can still require a human approval, successful required checks, or an up-to-date branch. You are interacting with an AI system. |
|
@coderabbitai approve |
✅ Action performedComments resolved. Approval is disabled; enable |
|
@coderabbitai why the CI still stuck? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="Zoo-Code-Org/Zoo-Code"
pr="1420"
echo "=== Pull request state ==="
pr_json="$(gh api "repos/${repo}/pulls/${pr}")"
jq '{
number,
state,
draft,
html_url,
head: {ref: .head.ref, sha: .head.sha},
base: {ref: .base.ref},
mergeable,
mergeable_state,
rebaseable,
merge_commit_sha,
labels: [.labels[].name],
requested_reviewers: [.requested_reviewers[].login],
requested_teams: [.requested_teams[].slug]
}' <<<"$pr_json"
sha="$(jq -r '.head.sha' <<<"$pr_json")"
base="$(jq -r '.base.ref' <<<"$pr_json")"
echo
echo "=== Check runs for the current head commit ==="
gh api --paginate "repos/${repo}/commits/${sha}/check-runs?per_page=100" \
-H 'Accept: application/vnd.github+json' \
--jq '[.check_runs[] | {
name,
status,
conclusion,
started_at,
completed_at,
details_url
}]'
echo
echo "=== Legacy commit statuses for the current head commit ==="
gh api "repos/${repo}/commits/${sha}/status" \
--jq '{state, statuses: [.statuses[] | {context, state, description, target_url}]}'
echo
echo "=== Submitted reviews ==="
gh api --paginate "repos/${repo}/pulls/${pr}/reviews?per_page=100" \
--jq '[.[] | {user: .user.login, state, submitted_at, commit_id}]'
echo
echo "=== Unresolved review-thread count ==="
gh api graphql \
-F owner="${repo%%/*}" \
-F name="${repo#*/}" \
-F number="$pr" \
-f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes { isResolved isOutdated }
}
}
}
}' \
--jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)] | length'
echo
echo "=== Accessible branch protection ==="
gh api "repos/${repo}/branches/${base}/protection" \
--jq '{
required_status_checks,
required_pull_request_reviews,
required_linear_history,
required_signatures,
enforce_admins,
required_conversation_resolution,
required_deployments
}' \
|| true
echo
echo "=== Accessible repository rulesets ==="
gh api --paginate "repos/${repo}/rulesets?includes_parents=true&per_page=100" \
--jq '[.[] | {id, name, target, enforcement, conditions, rules}]' \
|| trueLength of output: 7819
The pending check is
Your earlier command did not create an approval. CodeRabbit returned:
The repository configuration disables explicit CodeRabbit approvals. A repository maintainer must enable: reviews:
request_changes_workflow: trueAfter that change, wait until CodeRabbit completes its review, then post this top-level PR comment again: PR The 🐇⏳ You are interacting with an AI system. |
|
|
|
✅ Action performedComments resolved. Approval is disabled; enable |
Closes #1419.
Adds a concise typed-test checklist to the ESLint Suppressions section of AGENTS.md so agents do not add blanket
no-explicit-anysuppression entries for new or substantially changed test files:unknownfor storage values and mock callback parameters.as anycasts.eslint --prune-suppressionswith no new entry and no raised count.Documentation-only change, grounded in the typing pass that retired the 137-count parallelMode suppression entry in #977 (f91e19c).
Summary by CodeRabbit