xiduzo/wtf / skills/wtf.pr-review
wtf.pr-review
VerifiedThis skill should be used when a developer or tech lead wants to review a pull request for correctness, spec adherence, and code quality — for example "review PR
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.3 KB |
| evals/evals.json | config | 3.7 KB |
| evals/fixtures/missing-test-coverage.json | config | 6.4 KB |
| evals/fixtures/schema-drift.json | config | 4.6 KB |
| evals/fixtures/scope-creep.json | config | 6.6 KB |
evals/fixtures/missing-test-coverage.json
View on GitHub{
"_note": "Fixture for eval 1 — diff implements both claimed settlement timeout scenarios but the test file only covers scenario 1 (timeout warning). Scenario 2 (automatic cancellation after grace period) has no test. The Trace carries the Scenario Claim; the canonical scenario text lives in the Feature body.",
"trace": {
"number": 15,
"title": "☄️ Trace: Handle settlement timeout",
"labels": [{ "name": "trace" }, { "name": "designed" }],
"body": "## Story\n\n- As a **Merchant**, I want **stalled settlements to be flagged and cancelled** so that **my funds are not stuck in limbo**\n\n## Scenario Claim\n\n- Scenario: Merchant sees a timeout warning when settlement exceeds the processing window\n- Scenario: Settlement is automatically cancelled after the timeout grace period expires\n\n<details>\n<summary>Claimed scenarios — synced from Feature #12 — edit there, not here</summary>\n\n```gherkin\nScenario: Merchant sees a timeout warning when settlement exceeds the processing window\n Given a settlement has been in processing for longer than the processing window\n When the settlement status is checked\n Then the merchant receives a timeout warning notification\n And the settlement status is updated to 'warning'\n\nScenario: Settlement is automatically cancelled after the timeout grace period expires\n Given a settlement has been in 'warning' status for longer than the grace period\n When the timeout grace period check runs\n Then the settlement status is updated to 'cancelled'\n And a cancellation event is emitted\n```\n\n</details>\n\n## Spine Position\n\n- Position: Deepening\n- Builds on: Trace #11 (Skeleton — settlement processing happy path)\n\n## Contracts & Interfaces\n\n```typescript\ninterface SettlementTimeoutResult {\n settlementId: string;\n status: 'warning' | 'cancelled';\n triggeredAt: string; // ISO 8601\n}\n```\n\n## Definition of Done\n\n- [ ] All claimed scenarios covered by tests\n- [ ] Cancellation event is emitted on auto-cancel\n- [ ] Observability: log entries on each state transition\n- [ ] System releasable after merge"
},
"feature": {
"number": 12,
"title": "🚀 Feature: Settlement processing lifecycle",
"body": "## User Stories\n\n### As a Merchant, I want stalled settlements to be flagged and cancelled so that my funds are not stuck in limbo\n\n```gherkin\nScenario: Merchant sees a timeout warning when settlement exceeds the processing window\n Given a settlement has been in processing for longer than the processing window\n When the settlement status is checked\n Then the merchant receives a timeout warning notification\n And the settlement status is updated to 'warning'\n\nScenario: Settlement is automatically cancelled after the timeout grace period expires\n Given a settlement has been in 'warning' status for longer than the grace period\n When the timeout grace period check runs\n Then the settlement status is updated to 'cancelled'\n And a cancellation event is emitted\n```\n\n## Trace Plan\n\n1. [x] ☄️ Skeleton — settlement processing happy path (claims: \"Settlement is processed within the processing window\") — Trace #11\n2. [ ] ☄️ Deepening — settlement timeout failure modes (claims: \"Merchant sees a timeout warning when settlement exceeds the processing window\", \"Settlement is automatically cancelled after the timeout grace period expires\") — Trace #15\n"
},
"diff_stat": "2 files changed, 58 insertions(+), 2 deletions(-)",
"diff": "diff --git a/src/services/settlement.ts b/src/services/settlement.ts\nindex a1b2c3d..e4f5a6b 100644\n--- a/src/services/settlement.ts\n+++ b/src/services/settlement.ts\n@@ -1,5 +1,7 @@\n import { Settlement } from '../models/settlement';\n import { EventBus } from '../events/bus';\n+import { logger } from '../utils/logger';\n \n const PROCESSING_WINDOW_MS = 30 * 60 * 1000; // 30 minutes\n+const GRACE_PERIOD_MS = 15 * 60 * 1000; // 15 minutes\n \n@@ -18,3 +20,35 @@ export class SettlementService {\n return this.repo.findById(id);\n }\n+\n+ async checkTimeout(settlement: Settlement): Promise<SettlementTimeoutResult | null> {\n+ const now = Date.now();\n+ const age = now - new Date(settlement.createdAt).getTime();\n+\n+ if (settlement.status === 'warning') {\n+ const warnedAt = new Date(settlement.warnedAt!).getTime();\n+ if (now - warnedAt > GRACE_PERIOD_MS) {\n+ await this.repo.update(settlement.id, { status: 'cancelled' });\n+ this.eventBus.emit('settlement.cancelled', { settlementId: settlement.id });\n+ logger.info('settlement auto-cancelled after grace period', { settlementId: settlement.id });\n+ return {\n+ settlementId: settlement.id,\n+ status: 'cancelled',\n+ triggeredAt: new Date().toISOString(),\n+ };\n+ }\n+ }\n+\n+ if (age > PROCESSING_WINDOW_MS && settlement.status === 'processing') {\n+ await this.repo.update(settlement.id, { status: 'warning' });\n+ logger.info('settlement timeout warning issued', { settlementId: settlement.id });\n+ return {\n+ settlementId: settlement.id,\n+ status: 'warning',\n+ triggeredAt: new Date().toISOString(),\n+ };\n+ }\n+\n+ return null;\n+ }\n }\ndiff --git a/src/services/settlement.test.ts b/src/services/settlement.test.ts\nindex b2c3d4e..f6a7b8c 100644\n--- a/src/services/settlement.test.ts\n+++ b/src/services/settlement.test.ts\n@@ -1,5 +1,30 @@\n import { SettlementService } from './settlement';\n+import { createMockSettlement, createMockRepo, createMockEventBus } from '../test-utils';\n \n describe('SettlementService', () => {\n+ let service: SettlementService;\n+ let mockRepo: ReturnType<typeof createMockRepo>;\n+ let mockEventBus: ReturnType<typeof createMockEventBus>;\n+\n+ beforeEach(() => {\n+ mockRepo = createMockRepo();\n+ mockEventBus = createMockEventBus();\n+ service = new SettlementService(mockRepo, mockEventBus);\n+ });\n+\n+ describe('checkTimeout', () => {\n+ it('shows timeout warning when settlement exceeds processing window', async () => {\n+ const settlement = createMockSettlement({\n+ status: 'processing',\n+ createdAt: new Date(Date.now() - 31 * 60 * 1000).toISOString(), // 31 min ago\n+ });\n+\n+ const result = await service.checkTimeout(settlement);\n+\n+ expect(result).not.toBeNull();\n+ expect(result!.status).toBe('warning');\n+ expect(mockRepo.update).toHaveBeenCalledWith(settlement.id, { status: 'warning' });\n+ });\n+ });\n });\n"
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |