Repository navigation
Route simple skip-if queries through GraphQL/REST to spare the search API - #80479
Conversation
…I pressure Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
❌ PR Specification Reviewer failed. Please review the logs for details. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details.
|
|
🧠 Matt Pocock Skills Reviewer failed during the skills-based review. Incomplete workmissing_terminal_safe_output
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. The No-op messageLean already. Ship.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. The
|
… schema Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
❌ Test Quality Sentinel failed during test quality analysis. Incomplete workTest Quality Sentinel could not review tests because pre-fetch PR data was unavailable: PR metadata does not match the requested head. The marker file /tmp/gh-aw/agent/test-prefetch-unavailable.txt exists and all test-analysis inputs (test-files.txt, test-diff.txt, pr-meta.json, numstat, and function-extraction files) are empty, so no test quality score can be computed for PR #80479.
|
Comment MemoryPeek at saved memory (spec-review-history)History |
|
Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Details
Potential security threats were detected in the agent output. Detected threat types: prompt injection.
Review the workflow run logs for details.
Found one actionable issue: the gate logs every result as "Search found" even when GraphQL or REST handled the query, which misreports the selected backend and obscures rate-limit behavior. The specialist first pass completed; its other candidates were intentional fallback tradeoffs or non-blocking concerns.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🟡 Changes recommended
REST pagination can double-count issues or PRs across overlapping pages, incorrectly satisfying gate thresholds without enough distinct matches.
1 open issue
What changed in this PR
This PR reduces search API usage for gh-aw skip-if gates by routing simple repository-scoped queries through GraphQL or REST while preserving search fallback.
Changes:
- Adds query parsing, rate-limit-aware backend selection, and bounded REST pagination.
- Integrates backend evaluation into skip gates, with logging for partial counts and unit tests.
- Documents supported queries and records a patch release changeset.
| File | Description |
|---|---|
pkg/parser/schemas/main_workflow_schema.json |
Describes optimized query routing in schema help text. |
docs/src/content/docs/reference/triggers.md |
Explains eligible queries, backend selection, and fallback. |
docs/src/content/docs/reference/frontmatter-full.md |
Updates skip-if configuration comments. |
actions/setup/js/skip_if_query.test.cjs |
Tests parsing, routing, counting, and fallback behavior. |
actions/setup/js/skip_if_query.cjs |
Implements query parsing and multi-backend evaluation. |
actions/setup/js/check_skip_if_helpers.cjs |
Uses the evaluator and logs backend and count precision. |
.github/aw/syntax-core.md |
Adds guidance for efficient skip-if queries. |
.changeset/skip-if-query-api-routing.md |
Records the routing improvement as a patch release. |
Review effort: Balanced (adaptive)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
Replies to the automated status comments (7109295988, 7109296228, 7109300895, 7109303304, 7109309337, 7109466102, 7109515905, 7109542429): no code changes needed.
|
Adds a shared invariant harness (JS), a seeded property test (vitest), and a Go FuzzSkipIfQueryParser driver registered in make fuzz and CI. Fuzzing found that partially quoted values (label:"a b"c) were accepted with literal quotes; these now fall back to the search API. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

on.skip-if-match/on.skip-if-no-matchalways called the search API, whose limit (30 req/min) is easily exhausted. Most skip-if queries are simple repo-scoped list + label filters that GraphQL or REST can answer, so this adds a small query parser and evaluator that picks the cheapest API based on current rate-limit pressure.Approach
New
actions/setup/js/skip_if_query.cjs, called fromrunSkipQueryGate:is:/type:/state:(issue,pr/pull-request,open,closed,merged),label:(AND),author:,assignee:,mentions:,sort:, and exactly onerepo:. Anything else (free text,-negation,in:,org:, comma label lists,@me, unscoped queries) goes straight to search.GET /rate_limit(free), prefers GraphQL, then REST, then search. A backend with less than 10% quota left is demoted. On error it falls back to the next backend.issues/pullRequeststotalCountin one call. Only used with 0-1 labels, because GraphQLlabelsis OR (verified live). User filters only apply to issue-only queries.issues.listForRepo(orpulls.listfor unfiltered PRs). PRs/merged state are filtered client-side. Paging stops once the threshold is reached, and after 5 pages it defers to the next backend.Notes for review
github/gh-aw: GraphQL and REST counts match search (differences of up to 3 come from search index lag).IssueFilterstreatsassignee: nullas "unassigned"; unset filters are now omitted (covered by a test).is:issue/is:pull-request. Untyped repo-scoped queries now work through GraphQL/REST.skip_if_query.test.cjs, andtriggers.mddocuments the behavior.