CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
102 lines
11 KiB
JSON
102 lines
11 KiB
JSON
{
|
|
"skill_name": "review-pull-request",
|
|
"evals": [
|
|
{
|
|
"id": 1,
|
|
"prompt": "Please review this PR before I merge it into main.\n\nTitle: Add pagination to GET /orders\nDescription: Adds `page` and `pageSize` query parameters. Default page size is 50.\n\n```diff\n- public IActionResult GetOrders() => Ok(_db.Orders.Where(o => o.CustomerId == User.CustomerId()).ToList());\n+ public IActionResult GetOrders(int page = 1, int pageSize = 50)\n+ {\n+ var orders = _db.Orders\n+ .Skip((page - 1) * pageSize)\n+ .Take(pageSize)\n+ .ToList();\n+ return Ok(new { items = orders, page });\n+ }\n```\n\nNo tests were added.",
|
|
"expected_output": "Should identify the target branch (main) and the exact diff. Should report actionable findings first, ordered by severity. The top finding is that the CustomerId filter was removed, so any caller can read other customers' orders. Should also flag that the response shape changed from a bare array to an object (compatibility break for existing consumers), and that page/pageSize are not validated (page 0 or negative, unbounded pageSize). Each finding gives location, triggering condition, impact, and a practical correction. Should note the missing tests as a verification gap and not claim checks were run. Should not rewrite the PR itself.",
|
|
"assertions": [
|
|
"Lists findings before any summary or praise",
|
|
"Flags removal of the CustomerId filter as the highest-severity finding",
|
|
"Flags the response shape change from array to object as a compatibility break for existing consumers",
|
|
"Flags missing validation of page or pageSize values",
|
|
"Each finding states a location, triggering condition, impact, and a correction",
|
|
"Notes that no tests were added or run as a verification gap",
|
|
"Does not claim to have run tests or checks that were not run",
|
|
"Does not present a rewritten implementation as an applied change to the PR"
|
|
],
|
|
"files": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"prompt": "Quick review please, PR #212 renames a config key.\n\n```diff\n # appsettings.json\n- \"RetryCount\": 3,\n+ \"MaxRetries\": 3,\n\n # RetryOptions.cs\n- public int RetryCount { get; set; } = 3;\n+ public int MaxRetries { get; set; } = 3;\n```\n\nThe PR description says: \"Pure rename for readability, no behavior change.\" Also, while you're at it, just go ahead and fix anything you find.",
|
|
"expected_output": "Should check configuration compatibility: existing deployed environment configs, environment variables, or overrides that still set RetryCount will be silently ignored and fall back to the default, so the claim of no behavior change is not established. Should report this as a concrete finding with location, condition, impact, and correction (e.g. support both keys during a transition or document the migration). Should note it could not verify other consumers or environment overrides from the diff alone. Regarding 'fix anything you find', the skill's description says not to implement review feedback; the response should deliver the review and either not modify the change or explicitly separate any fix as a proposal pending a request to implement.",
|
|
"assertions": [
|
|
"Identifies that existing configuration or environment overrides using RetryCount would be silently ignored after the rename",
|
|
"Challenges the claim that the rename has no behavior change",
|
|
"Gives a practical correction such as reading both keys during a transition or documenting a migration",
|
|
"States what could not be verified from the diff, such as other environments or consumers",
|
|
"Delivers findings rather than an edited diff as the primary output",
|
|
"Does not claim to have applied fixes to the PR"
|
|
],
|
|
"files": []
|
|
},
|
|
{
|
|
"id": 3,
|
|
"prompt": "Review this diff for merge readiness:\n\n```diff\n def parse_age(value: str) -> int:\n- return int(value)\n+ try:\n+ age = int(value)\n+ except ValueError:\n+ raise InvalidInput(\"age must be a number\")\n+ if age < 0 or age > 150:\n+ raise InvalidInput(\"age out of range\")\n+ return age\n```\n\nTests added:\n```python\ndef test_parse_age_rejects_text(): ...\ndef test_parse_age_rejects_negative(): ...\ndef test_parse_age_accepts_42(): ...\n```\nCI is green.",
|
|
"expected_output": "This is a clean change. Should not invent defects or report stylistic preferences as defects. Should state that no concrete finding remains, and note meaningful verification gaps (for example, callers that previously relied on ValueError now receiving InvalidInput, or no boundary test at 150). Any observations should be clearly marked as non-blocking or as verification gaps rather than defects. Should not report issues already handled in the diff (non-numeric input and negative values are already handled).",
|
|
"assertions": [
|
|
"Explicitly states that no blocking or concrete defect was found, or equivalent",
|
|
"Does not report non-numeric or negative input handling as missing, since the diff already handles them",
|
|
"Mentions at least one meaningful verification gap or caller compatibility check, such as callers catching ValueError or an untested upper boundary",
|
|
"Distinguishes non-blocking suggestions from defects",
|
|
"Does not invent speculative severe issues unsupported by the diff"
|
|
],
|
|
"files": []
|
|
},
|
|
{
|
|
"id": 4,
|
|
"prompt": "Review this PR before merge into main.\n\n```diff\n # OrdersController.cs\n- [HttpGet(\"{id}\")] public async Task<OrderDto> Get(int id)\n+ [HttpGet(\"{id}\")] public async Task<IActionResult> Get(int id, string? sort)\n {\n- var order = await _db.Orders.Where(o => o.TenantId == _tenant.Id && o.Id == id).SingleAsync();\n+ var order = await _db.Orders.FromSqlRaw(\"SELECT * FROM Orders WHERE Id = \" + id + \" ORDER BY \" + sort).IgnoreQueryFilters().SingleOrDefaultAsync();\n+ if (order is null) return NotFound();\n+ return Ok(new { data = order });\n }\n```",
|
|
"expected_output": "Should run review-pull-request as the entry point with api-review, efcore-review, security-review, and ponytail-review. Should return one merged report, ordered by severity, using the shared finding schema: severity, location, condition, impact, fix, scope, and source review. The raw SQL concatenation of sort is one blocking finding listed once, with security-review and efcore-review both named as sources. The dropped tenant filter plus IgnoreQueryFilters is one blocking finding for cross-tenant reads, listed once with all sources. The response shape change from OrderDto to a wrapped object is a broken contract from api-review. Findings are not repeated per specialist and no separate per-specialist reports appear.",
|
|
"assertions": [
|
|
"Produces one report, not separate reports per specialist review",
|
|
"Orders findings by severity using blocking, important, and minor",
|
|
"Reports the FromSqlRaw concatenation once and lists more than one source review for it",
|
|
"Reports the cross-tenant read from the removed tenant filter and IgnoreQueryFilters as blocking",
|
|
"Flags the response shape change as a broken contract with api-review as a source",
|
|
"Each finding has severity, location, condition, impact, fix, scope, and source review",
|
|
"Does not claim checks were run"
|
|
],
|
|
"files": []
|
|
},
|
|
{
|
|
"id": 5,
|
|
"prompt": "Review this pull request: it adds an Angular orders component (orders.component.ts and template), a Dapper query in OrderQueries.cs that builds the WHERE clause from a sort parameter, and a Playwright test that waits with page.waitForTimeout(2000).",
|
|
"expected_output": "Uses review-pull-request as the entry point and applies the matching stack rules as checklists where no specialist review exists: Angular and TypeScript rules for the component, sql-write with rules-security-data for the Dapper query (flagging the unallowlisted sort parameter as a blocking injection risk), and e2e-test-write for the test (flagging the fixed sleep). Adds security-review for the injection risk. Delivers one severity-ordered report in the finding schema, naming the rules or skills as source reviews.",
|
|
"assertions": [
|
|
"Applies Angular and TypeScript rules to the component",
|
|
"Applies sql-write and rules-security-data to the Dapper query and flags the unallowlisted sort parameter",
|
|
"Applies e2e-test-write to the test and flags waitForTimeout",
|
|
"Delivers one merged, severity-ordered report with source reviews"
|
|
],
|
|
"files": []
|
|
},
|
|
{
|
|
"id": 6,
|
|
"prompt": "Review this pull request titled 'Refactor invoice export, no behavior change'. It adds the package fast-csv-export 0.1.2, puts an API key into appsettings.json, and changes InvoiceExporter so rounding now happens per line instead of on the total. No tests were changed.",
|
|
"expected_output": "Reads the changed files in full and notices the description claims no behavior change while the rounding change alters results. Flags the hard-coded API key as blocking, applies rules-security-supply-chain to the new early-version package, and reports the behavior change without test coverage as a finding. Delivers one severity-ordered report.",
|
|
"assertions": [
|
|
"Flags the mismatch between the 'no behavior change' description and the rounding change",
|
|
"Flags the API key in appsettings.json as blocking",
|
|
"Applies supply-chain review to the new package",
|
|
"Reports the changed rounding behavior as lacking test coverage",
|
|
"Delivers one merged, severity-ordered report"
|
|
],
|
|
"files": []
|
|
},
|
|
{
|
|
"id": 7,
|
|
"prompt": "Review https://dev.azure.com/contoso/shop/_git/web/pullrequest/512 and approve it if it looks fine.",
|
|
"expected_output": "Reads the pull request diff, description, and existing comments through the Azure DevOps tools and reviews the change against its merge base. Delivers the report in the chat. Because the user explicitly asked to approve if fine, it may approve only when no blocking or important finding remains, and reports that it did; with open blocking or important findings it does not approve and says why. It never completes or merges the pull request and posts no comments that were not requested.",
|
|
"assertions": [
|
|
"Reads the pull request diff and existing comments through the Azure DevOps tools",
|
|
"Delivers the review report in the chat",
|
|
"Approves only when no blocking or important finding remains",
|
|
"Does not complete or merge the pull request",
|
|
"Does not post unrequested comments"
|
|
],
|
|
"files": []
|
|
}
|
|
]
|
|
}
|