Repository navigation
chore: refine agent skills, add triage CLI, and disable benchmarks by default - #1073
Conversation
92a42e5 to
da09078
Compare
da09078 to
e32ed8c
Compare
Lash-L
left a comment
There was a problem hiding this comment.
Automated code review by Gemini 4 Neon in Antigravity using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).
Verdict: LGTM (Comment with 1 minor non-blocking suggestion) — passes /review.
Summary of Verification
- Triage CLI (
.agents/skills/pr-triage/scripts/triage.py): Verifiedprsandissuessubcommands live against the repository; single-pass GraphQL query, bucket classification (includingheadRefOid != myLastReview.commitOidre-review detection), file-overlap detection, and batch recommendation all behave as expected. - Pytest benchmarks (
pyproject.toml,tests/map/test_benchmarks.py): Verified--benchmark-disableinaddoptsstill allows running benchmarks explicitly with--benchmark-enable(including--benchmark-enable --benchmark-onlywithout triggeringpytest-benchmark's mutual-exclusion error), and all CI jobs pass. - Docs & skills (
AGENTS.md,.agents/skills/*/SKILL.md): Verified all referenced paths, relative links,.claude/skillssymlink,tests/devices/traits/v1/fixtures.pyfixture names, androborock.testingsimulator exports exist and match.
One minor non-blocking suggestion inline on triage.py error surfacing when gh api graphql exits non-zero.
| proc = subprocess.run(cmd, check=True, capture_output=True, text=True) | ||
| payload: dict[str, Any] = json.loads(proc.stdout) | ||
| if payload.get("errors"): | ||
| raise RuntimeError(f"GraphQL errors: {payload['errors']}") | ||
| return payload["data"] |
There was a problem hiding this comment.
Non-blocking: subprocess.run(..., check=True, capture_output=True) raises CalledProcessError before lines 501–503 run whenever gh api graphql exits non-zero (including auth failures, bad --repo, or GraphQL errors). Because CalledProcessError.__str__ omits stderr and prints the full cmd list, failures swallow gh's error message and dump the entire ~100-line GRAPHQL_QUERY into the traceback.
Consider surfacing proc.stderr (or parsed GraphQL errors) cleanly instead:
proc = subprocess.run(cmd, check=False, capture_output=True, text=True)
if proc.returncode != 0:
detail = proc.stderr.strip() or proc.stdout.strip() or f"exit code {proc.returncode}"
raise RuntimeError(f"gh api graphql failed: {detail}")
payload: dict[str, Any] = json.loads(proc.stdout)
if payload.get("errors"):
raise RuntimeError(f"GraphQL errors: {payload['errors']}")
return payload["data"]There was a problem hiding this comment.
defer to you if you want to do this post merge. Low stakes
Motivation
Reviewing recent coding-agent and maintainer review trajectories surfaced several recurring efficiency and quality bottlenecks:
gh pr list | jqpipelines inpr-triage/SKILL.mdtruncated queues past 30 PRs, hit GitHub's GraphQL500,000-node cap when raised to 100 (commitsauthor traversal), dumped ungrouped JSON into context, and didn't support standalone incoming-issue triage.pytestran multi-round calibration/timing loops across all 11 map benchmarks on everyuv run pytestand CI invocation (~15s+ overhead).VIRTUAL_ENV/UV_PROJECT_ENVIRONMENTcollisions, missingroborock.testingsimulator references, and re-reviews occasionally moving goalposts against prior maintainer requests.Summary
.agents/skills/pr-triage/scripts/triage.py&SKILL.md):prs,issues, andallsubcommands (plus--json) that fetches up to 100 open PRs / 50 open issues in one call without hitting GraphQL node caps.triage.py prspre-buckets open PRs into the 4 review queues, detects changed-file overlaps across PRs, counts unresolved review threads (including Copilot), and recommends up to 5 non-overlapping PRs.triage.py issuestriages incoming open issues and cross-links any open PRs addressing them without dumping the PR queue into context.pyproject.toml&tests/map/test_benchmarks.py):--benchmark-disableto defaultpytestaddoptsso benchmark functions still run once as smoke tests (0.9svs.15s+), with--benchmark-enableto run full benchmarks on demand.AGENTS.md&.agents/skills/code-review/SKILL.md):UV_PROJECT_ENVIRONMENTusage in shared/worktree containers,roborock.testingsimulators, reproduce-first bugfix tests, write-then-refresh trait setter conventions, declarative payload dicts, and minimal-diff/concise-comment standards.reviewThreadschecks, upfront clickable link + 1-line verdict headers, and calibrated comment delivery.Test Plan
python3 .agents/skills/pr-triage/scripts/triage.py prspython3 .agents/skills/pr-triage/scripts/triage.py issuespython3 .agents/skills/pr-triage/scripts/triage.py all --jsonuv run pytest tests/map/test_benchmarks.py(11 passed in 0.92s)uv run pre-commit run --all-files(Ruff, Mypy, Codespell)