opencode-agent-skill 7.7.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -3
- package/README.md +396 -281
- package/bin/ocskill.mjs +382 -156
- package/docs/DETERMINISTIC-TOOLS.md +25 -8
- package/docs/ENGINEERING-DESIGN.md +31 -13
- package/docs/EVALS.md +34 -12
- package/docs/NPM-PUBLISH.md +6 -6
- package/docs/OPENCODE-COMPAT.md +11 -8
- package/docs/TRACE-SCHEMA.md +15 -2
- package/docs/V8-INTELLIGENCE-RELIABILITY.md +206 -0
- package/docs/V9-SPEED-INTELLIGENCE.md +102 -0
- package/evals/live/tasks.json +6 -6
- package/evals/polyglot/fixtures/polyglot-bench/api/generated/client.ts +2 -0
- package/evals/polyglot/fixtures/polyglot-bench/api/openapi.json +25 -0
- package/evals/polyglot/fixtures/polyglot-bench/db/migrations/20260920_add_order_key.sql +1 -0
- package/evals/polyglot/fixtures/polyglot-bench/dotnet/OrderService.cs +8 -0
- package/evals/polyglot/fixtures/polyglot-bench/java/PriceService.java +5 -0
- package/evals/polyglot/fixtures/polyglot-bench/monorepo/package.json +6 -0
- package/evals/polyglot/fixtures/polyglot-bench/monorepo/packages/api/package.json +4 -0
- package/evals/polyglot/fixtures/polyglot-bench/monorepo/packages/web/package.json +7 -0
- package/evals/polyglot/fixtures/polyglot-bench/monorepo/pnpm-lock.yaml +5 -0
- package/evals/polyglot/fixtures/polyglot-bench/next/app/api/products/route.ts +7 -0
- package/evals/polyglot/fixtures/polyglot-bench/python/tenant_auth.py +4 -0
- package/evals/polyglot/fixtures/polyglot-bench/react-native/keyboard.ts +3 -0
- package/evals/polyglot/graders/polyglot-bench.mjs +101 -0
- package/evals/polyglot/tasks.json +54 -0
- package/global-config/AGENTS.md +78 -160
- package/global-config/agents/integration-verifier.md +1 -1
- package/global-config/agents/plan-checker.md +1 -1
- package/global-config/commands/run.md +9 -5
- package/global-config/plugins/ues-router/capabilities.js +4 -0
- package/global-config/plugins/ues-router/index.js +784 -37
- package/global-config/plugins/ues-router/router.js +175 -23
- package/global-config/plugins/ues-router/runtime-guard.js +265 -0
- package/global-config/skills/engineering-orchestrator/references/long-horizon.md +6 -4
- package/lib/aci.mjs +128 -0
- package/lib/benchmark-confidence.mjs +173 -0
- package/lib/cli-utils.mjs +41 -0
- package/lib/container-sandbox.mjs +102 -0
- package/lib/context-manifest.mjs +300 -22
- package/lib/control-center.mjs +36 -3
- package/lib/eval-ablation.mjs +104 -0
- package/lib/eval-order.mjs +9 -0
- package/lib/eval-report.mjs +11 -0
- package/lib/eval-telemetry.mjs +8 -2
- package/lib/gate-receipt.mjs +52 -0
- package/lib/installer.mjs +39 -25
- package/lib/learning-engine.mjs +236 -38
- package/lib/model-policy.mjs +6 -0
- package/lib/opencode-compat.mjs +25 -10
- package/lib/orchestrator-policy.mjs +195 -21
- package/lib/process-runner.mjs +30 -9
- package/lib/runtime-events.mjs +31 -0
- package/lib/semantic-index.mjs +318 -0
- package/lib/task-engine.mjs +557 -28
- package/lib/trajectory.mjs +89 -0
- package/lib/windows-shim.mjs +227 -0
- package/lib/worktree-sandbox.mjs +85 -3
- package/package.json +11 -4
- package/scripts/check-release-tag.mjs +22 -0
- package/scripts/control-center.mjs +25 -0
- package/scripts/eval-ablation.mjs +44 -0
- package/scripts/eval-live.mjs +39 -58
- package/scripts/eval-matrix.mjs +166 -0
- package/scripts/smoke-packed-install.mjs +138 -4
- package/scripts/smoke-plain-install.mjs +91 -0
- package/scripts/validate-live-suite.mjs +3 -3
- package/scripts/validate.mjs +27 -5
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# UES 9.0 Speed & Intelligence
|
|
2
|
+
|
|
3
|
+
UES 9.0 builds on the V8 evidence and reliability gates. The goal is not to make the underlying model generate tokens faster; it is to reduce time-to-correct-result by finding the right code sooner, shrinking unnecessary context, avoiding unsafe retries and requiring evidence before completion.
|
|
4
|
+
|
|
5
|
+
## Execution profiles
|
|
6
|
+
|
|
7
|
+
UES classifies work into three execution profiles:
|
|
8
|
+
|
|
9
|
+
- **FAST**: small/low-risk work, up to 2 skills, 12k context budget, targeted verification, no durable worktree/critic overhead by default.
|
|
10
|
+
- **STANDARD**: medium work, up to 4 skills, 24k context budget, semantic+Git context and targeted/affected verification.
|
|
11
|
+
- **DEEP**: long-horizon or high-risk work, up to 5 skills, 48k context budget, durable state, worktree isolation, critic/integration verification and full CI.
|
|
12
|
+
|
|
13
|
+
Risk still overrides speed. Authentication, security, payment, schema/migration, production/deploy and public-contract work remains fail-closed.
|
|
14
|
+
|
|
15
|
+
## Incremental evidence index
|
|
16
|
+
|
|
17
|
+
The V9 index caches bounded source metadata under `.ues-cache/semantic-index-v1.json`. Unchanged files reuse cached evidence while changed files are reparsed. It records:
|
|
18
|
+
|
|
19
|
+
- concrete source paths;
|
|
20
|
+
- bounded symbol definitions with line numbers;
|
|
21
|
+
- lexical identifier counts;
|
|
22
|
+
- cache reuse/reparse statistics.
|
|
23
|
+
|
|
24
|
+
This is intentionally labelled **syntax-aware lexical evidence**. It must not be presented as proof of program semantics or as a full AST/LSP call graph.
|
|
25
|
+
|
|
26
|
+
Commands:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ocskill index status .
|
|
30
|
+
ocskill index build .
|
|
31
|
+
ocskill index rebuild .
|
|
32
|
+
ocskill aci search "checkout total" .
|
|
33
|
+
ocskill aci refs calculateTotal .
|
|
34
|
+
ocskill aci view src/checkout.ts . --line 120 --lines 80
|
|
35
|
+
ocskill aci text "exact marker" .
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Weak-model ACI
|
|
39
|
+
|
|
40
|
+
The ACI keeps search/view output bounded and evidence-first. Path traversal outside the repository is rejected. Large/binary files are refused by the bounded viewer. Reference results distinguish lexical references from concrete definition lines so an agent cannot honestly claim deeper semantic certainty than the tool measured.
|
|
41
|
+
|
|
42
|
+
## Runtime traces
|
|
43
|
+
|
|
44
|
+
Operational trace events are appended under `.ues-traces/*.jsonl`. Common credentials/tokens are redacted before persistence, oversized payloads are hashed/truncated, and traces explicitly exclude hidden chain-of-thought.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
ocskill trace show <trace-id> .
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Verification sandbox
|
|
51
|
+
|
|
52
|
+
When Docker or Podman is available, deterministic verification commands can run with:
|
|
53
|
+
|
|
54
|
+
- network disabled by default;
|
|
55
|
+
- Linux capabilities dropped;
|
|
56
|
+
- no-new-privileges;
|
|
57
|
+
- read-only container root;
|
|
58
|
+
- bounded PIDs/memory/CPU;
|
|
59
|
+
- only the requested workspace bind-mounted;
|
|
60
|
+
- no host secrets forwarded by default.
|
|
61
|
+
|
|
62
|
+
This protects verification commands; it does **not** claim to sandbox the OpenCode model process itself.
|
|
63
|
+
|
|
64
|
+
## Benchmark confidence gate
|
|
65
|
+
|
|
66
|
+
The matrix now embeds paired baseline/UES evidence and computes:
|
|
67
|
+
|
|
68
|
+
- paired wins/losses/ties;
|
|
69
|
+
- pass-rate delta;
|
|
70
|
+
- exact two-sided sign-test p-value;
|
|
71
|
+
- per-suite regression checks;
|
|
72
|
+
- mean duration ratio;
|
|
73
|
+
- optional cost ratio.
|
|
74
|
+
|
|
75
|
+
Normal reporting:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm run evals:matrix -- --model provider/model --trials 3
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Fail-closed release gate:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm run evals:matrix:gate -- --model provider/model --trials 3
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The gate requires enough paired samples, positive uplift, more UES wins than losses, statistical support, no suite regression and acceptable speed. This is evidence for the measured benchmark only; it is not evidence that UES turns a weaker model into a different model.
|
|
88
|
+
|
|
89
|
+
## Lock and Windows hardening
|
|
90
|
+
|
|
91
|
+
State locking now uses owner tokens and heartbeats. Stale takeover renames the old lock before removal, and release only removes a lock whose token still belongs to the caller. Windows CLI/router invocation resolves Node-backed shims and refuses unrecognized batch shims rather than falling back to shell execution.
|
|
92
|
+
|
|
93
|
+
## Release validation
|
|
94
|
+
|
|
95
|
+
Before publishing 9.0.0:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npm run ci
|
|
99
|
+
npm run evals:matrix:gate -- --model provider/model --trials 3
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If GitHub-hosted Actions still fails before the first workflow step, treat that as an infrastructure/repository-action issue rather than test evidence; local CI and the paired benchmark remain required release gates.
|
package/evals/live/tasks.json
CHANGED
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
{
|
|
12
12
|
"id": "auth-resource-ownership",
|
|
13
13
|
"fixture": "fixtures/engineering-bench",
|
|
14
|
-
"prompt": "Fix canEditResource(user, resource) in src/authz.mjs. Missing inputs deny.
|
|
14
|
+
"prompt": "Fix canEditResource(user, resource) in src/authz.mjs. Missing inputs deny. Treat user.role === 'admin' as admin. Treat user.suspended === true as suspended; suspended users always deny, including admins. Admin users may edit any non-missing resource. Non-admin users may edit only when user.id equals resource.ownerId AND user.tenantId equals resource.tenantId. Return a boolean and do not mutate inputs.",
|
|
15
15
|
"grader": "graders/engineering-bench.mjs"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"id": "api-pagination-contract",
|
|
19
19
|
"fixture": "fixtures/engineering-bench",
|
|
20
|
-
"prompt": "Fix paginate(items, options) in src/pagination.mjs.
|
|
20
|
+
"prompt": "Fix paginate(items, options) in src/pagination.mjs. Pages are 1-indexed; defaults are page=1 and pageSize=10. items must be an array. page/pageSize must be finite integers: non-number, non-finite, or non-integer values throw TypeError; integer values <= 0 throw RangeError. Return {items,total,page,pageSize,totalPages}; out-of-range pages return an empty items array.",
|
|
21
21
|
"grader": "graders/engineering-bench.mjs"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
{
|
|
30
30
|
"id": "payment-idempotency",
|
|
31
31
|
"fixture": "fixtures/engineering-bench",
|
|
32
|
-
"prompt": "Fix applyPaymentEvent(order, event) in src/payment.mjs. Do not mutate order. Duplicate event.id values already in order.processedEvents must be idempotent. A new event must
|
|
32
|
+
"prompt": "Fix applyPaymentEvent(order, event) in src/payment.mjs. Do not mutate order. Duplicate event.id values already in order.processedEvents must be idempotent. A new event.id must be a non-empty string; malformed, missing, or empty ids throw TypeError. For status='succeeded', amountCents and currency must exactly match order.totalCents/order.currency or throw RangeError, then mark status paid. Failed events must not mark paid. Record each new event id exactly once.",
|
|
33
33
|
"grader": "graders/engineering-bench.mjs"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"id": "webhook-ordering",
|
|
37
37
|
"fixture": "fixtures/engineering-bench",
|
|
38
|
-
"prompt": "Fix advancePaymentState(state, event) in src/webhook.mjs. Ignore duplicate/stale events whose integer sequence <= state.lastSequence. Newer events must follow legal transitions pending->authorized|failed, authorized->paid|failed, paid->refunded; same-status newer events are allowed. Illegal transitions throw RangeError.
|
|
38
|
+
"prompt": "Fix advancePaymentState(state, event) in src/webhook.mjs. Ignore duplicate/stale events whose integer sequence <= state.lastSequence by returning the original state object unchanged (the exact same reference). Newer events must follow legal transitions pending->authorized|failed, authorized->paid|failed, paid->refunded; same-status newer events are allowed. Illegal transitions throw RangeError. For accepted newer events, return a new state object and never mutate inputs.",
|
|
39
39
|
"grader": "graders/engineering-bench.mjs"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
{
|
|
78
78
|
"id": "money-integer-invariants",
|
|
79
79
|
"fixture": "fixtures/engineering-bench",
|
|
80
|
-
"prompt": "Fix orderTotal(lines) in src/money.mjs. Each line uses integer unitPriceCents>=0, integer quantity>0, optional integer discountCents>=0.
|
|
80
|
+
"prompt": "Fix orderTotal(lines) in src/money.mjs. Each line uses integer unitPriceCents>=0, integer quantity>0, optional integer discountCents>=0. Non-number, non-finite, or non-integer numeric fields throw TypeError. Range violations throw RangeError. discountCents may not exceed unitPriceCents*quantity; treat that as a RangeError rather than clamping. Return the sum as an integer cent total.",
|
|
81
81
|
"grader": "graders/engineering-bench.mjs"
|
|
82
82
|
},
|
|
83
83
|
{
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
{
|
|
114
114
|
"id": "cache-invalidation-tags",
|
|
115
115
|
"fixture": "fixtures/engineering-bench",
|
|
116
|
-
"prompt": "Fix tagsForProductMutation(product) in src/cache-tags.mjs. product must contain a non-empty id. Return unique tags in this order: 'products', 'product:<id>', then optional 'category:<categoryId>' and 'seller:<sellerId>' when those values are non-null/non-empty. Do not emit undefined/empty tags and do not mutate product.",
|
|
116
|
+
"prompt": "Fix tagsForProductMutation(product) in src/cache-tags.mjs. product must contain a non-empty string id; malformed product/id or an empty id throws TypeError. Return unique tags in this order: 'products', 'product:<id>', then optional 'category:<categoryId>' and 'seller:<sellerId>' when those values are non-null/non-empty. Do not emit undefined/empty tags and do not mutate product.",
|
|
117
117
|
"grader": "graders/engineering-bench.mjs"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Demo",
|
|
5
|
+
"version": "1.0.0"
|
|
6
|
+
},
|
|
7
|
+
"components": {
|
|
8
|
+
"schemas": {
|
|
9
|
+
"User": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": [
|
|
12
|
+
"id"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"name": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE orders ADD COLUMN order_key TEXT NOT NULL;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import assert from "node:assert/strict"
|
|
2
|
+
import { createHash } from "node:crypto"
|
|
3
|
+
import { readFile } from "node:fs/promises"
|
|
4
|
+
import path from "node:path"
|
|
5
|
+
|
|
6
|
+
const root = process.env.UES_EVAL_WORKSPACE || process.cwd()
|
|
7
|
+
const task = process.env.UES_EVAL_TASK
|
|
8
|
+
|
|
9
|
+
const text = async (file) => readFile(path.join(root, file), "utf8")
|
|
10
|
+
const sha = (value) => createHash("sha256").update(value).digest("hex")
|
|
11
|
+
const noDangerousSql = (value) => assert.doesNotMatch(value, /\b(?:DROP|TRUNCATE|DELETE\s+FROM)\b/i)
|
|
12
|
+
|
|
13
|
+
switch (task) {
|
|
14
|
+
case "polyglot-python-tenant-auth": {
|
|
15
|
+
const source = await text("python/tenant_auth.py")
|
|
16
|
+
assert.match(source, /def\s+can_edit\s*\(/)
|
|
17
|
+
assert.match(source, /suspended/i)
|
|
18
|
+
assert.match(source, /tenant/i)
|
|
19
|
+
assert.match(source, /owner_id/)
|
|
20
|
+
assert.match(source, /user(?:\.|\[).*id|user\.id|user\.get\(["']id["']\)/)
|
|
21
|
+
assert.match(source, /admin/i)
|
|
22
|
+
assert.doesNotMatch(source, /return\s+True\s*$/m)
|
|
23
|
+
break
|
|
24
|
+
}
|
|
25
|
+
case "polyglot-java-money-validation": {
|
|
26
|
+
const source = await text("java/PriceService.java")
|
|
27
|
+
assert.match(source, /long\s+totalCents\s*\(/)
|
|
28
|
+
assert.match(source, /IllegalArgumentException/)
|
|
29
|
+
assert.match(source, /unitPriceCents\s*\*\s*quantity/)
|
|
30
|
+
assert.match(source, /discountCents/)
|
|
31
|
+
assert.match(source, /discountCents\s*>\s*(?:gross|unitPriceCents\s*\*\s*quantity)/)
|
|
32
|
+
assert.doesNotMatch(source, /\b(?:double|float)\b/)
|
|
33
|
+
break
|
|
34
|
+
}
|
|
35
|
+
case "polyglot-dotnet-order-authorization": {
|
|
36
|
+
const source = await text("dotnet/OrderService.cs")
|
|
37
|
+
assert.match(source, /bool\s+CanUpdate\s*\(/)
|
|
38
|
+
assert.match(source, /Suspended/)
|
|
39
|
+
assert.match(source, /TenantId/)
|
|
40
|
+
assert.match(source, /Admin/)
|
|
41
|
+
assert.match(source, /OwnerId\s*==\s*user\.Id|order\.OwnerId\s*==\s*user\.Id/)
|
|
42
|
+
assert.doesNotMatch(source, /return\s+true\s*;/i)
|
|
43
|
+
break
|
|
44
|
+
}
|
|
45
|
+
case "polyglot-nextjs-api-errors": {
|
|
46
|
+
const source = await text("next/app/api/products/route.ts")
|
|
47
|
+
assert.match(source, /export\s+async\s+function\s+GET/)
|
|
48
|
+
assert.match(source, /NOT_FOUND/)
|
|
49
|
+
assert.match(source, /status\s*:\s*404/)
|
|
50
|
+
assert.match(source, /INTERNAL/)
|
|
51
|
+
assert.match(source, /status\s*:\s*500/)
|
|
52
|
+
assert.doesNotMatch(source, /error\.stack|stack\s*:/)
|
|
53
|
+
break
|
|
54
|
+
}
|
|
55
|
+
case "polyglot-react-native-keyboard": {
|
|
56
|
+
const source = await text("react-native/keyboard.ts")
|
|
57
|
+
assert.match(source, /platform\s*===\s*["']ios["']/)
|
|
58
|
+
assert.match(source, /safeAreaTop\s*\+\s*headerHeight/)
|
|
59
|
+
assert.match(source, /return\s+headerHeight/)
|
|
60
|
+
assert.match(source, /Number\.isFinite/)
|
|
61
|
+
assert.match(source, /android/)
|
|
62
|
+
break
|
|
63
|
+
}
|
|
64
|
+
case "polyglot-safe-sql-migration": {
|
|
65
|
+
const source = await text("db/migrations/20260920_add_order_key.sql")
|
|
66
|
+
noDangerousSql(source)
|
|
67
|
+
const add = source.search(/ADD\s+COLUMN\s+order_key/i)
|
|
68
|
+
const backfill = source.search(/UPDATE\s+orders[\s\S]*order_key/i)
|
|
69
|
+
const notNull = source.search(/order_key[\s\S]*SET\s+NOT\s+NULL/i)
|
|
70
|
+
const unique = source.search(/CREATE\s+UNIQUE\s+INDEX/i)
|
|
71
|
+
assert.ok(add >= 0 && backfill > add && notNull > backfill && unique > notNull)
|
|
72
|
+
assert.match(source, /order_key\s*=\s*[^;]*\bid\b/i)
|
|
73
|
+
break
|
|
74
|
+
}
|
|
75
|
+
case "polyglot-monorepo-workspace-boundary": {
|
|
76
|
+
const rootPkg = JSON.parse(await text("monorepo/package.json"))
|
|
77
|
+
const webPkg = JSON.parse(await text("monorepo/packages/web/package.json"))
|
|
78
|
+
assert.ok(Array.isArray(rootPkg.workspaces))
|
|
79
|
+
assert.ok(rootPkg.workspaces.includes("packages/*"))
|
|
80
|
+
assert.equal(webPkg.dependencies?.["@demo/api"], "workspace:*")
|
|
81
|
+
const lock = await text("monorepo/pnpm-lock.yaml")
|
|
82
|
+
assert.equal(sha(lock), "130256c4e0c0b4db7ec66736ba9afbadb60e908556b993e92fd5c70244bba8d8")
|
|
83
|
+
break
|
|
84
|
+
}
|
|
85
|
+
case "polyglot-generated-contract-discipline": {
|
|
86
|
+
const api = JSON.parse(await text("api/openapi.json"))
|
|
87
|
+
const user = api.components?.schemas?.User
|
|
88
|
+
assert.ok(user?.properties?.id)
|
|
89
|
+
assert.ok(user?.properties?.name)
|
|
90
|
+
assert.ok(user?.properties?.displayName)
|
|
91
|
+
assert.ok(user.required?.includes("id"))
|
|
92
|
+
assert.ok(user.required?.includes("displayName"))
|
|
93
|
+
const generated = await text("api/generated/client.ts")
|
|
94
|
+
assert.equal(sha(generated), "3b4a1e4902a2d678c751f9673a74a5efd352e434142195747268516a30b0ce88")
|
|
95
|
+
break
|
|
96
|
+
}
|
|
97
|
+
default:
|
|
98
|
+
throw new Error("Unknown polyglot task: " + task)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
console.log("polyglot grader PASS: " + task)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"description": "Polyglot engineering-surface benchmark covering Python, Java/Spring, .NET, Next.js, React Native, SQL migration, monorepo dependency boundaries and generated-code discipline.",
|
|
4
|
+
"tasks": [
|
|
5
|
+
{
|
|
6
|
+
"id": "polyglot-python-tenant-auth",
|
|
7
|
+
"fixture": "fixtures/polyglot-bench",
|
|
8
|
+
"prompt": "Repair python/tenant_auth.py. can_edit(user, resource) must deny missing inputs and suspended users, allow admins only inside the same tenant, and allow members only when both tenant IDs match and resource.owner_id equals user.id. Keep the function pure and return a boolean.",
|
|
9
|
+
"grader": "graders/polyglot-bench.mjs"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "polyglot-java-money-validation",
|
|
13
|
+
"fixture": "fixtures/polyglot-bench",
|
|
14
|
+
"prompt": "Repair java/PriceService.java. totalCents(unitPriceCents, quantity, discountCents) must reject negative unit price/discount and non-positive quantity with IllegalArgumentException, calculate integer-cent total exactly, and reject discounts larger than the gross line total. Do not switch to floating point.",
|
|
15
|
+
"grader": "graders/polyglot-bench.mjs"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "polyglot-dotnet-order-authorization",
|
|
19
|
+
"fixture": "fixtures/polyglot-bench",
|
|
20
|
+
"prompt": "Repair dotnet/OrderService.cs. CanUpdate(User user, Order order) must deny null inputs and suspended users, require matching TenantId for every role, allow Admin within the same tenant, and otherwise require order.OwnerId == user.Id. Return bool without mutating inputs.",
|
|
21
|
+
"grader": "graders/polyglot-bench.mjs"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "polyglot-nextjs-api-errors",
|
|
25
|
+
"fixture": "fixtures/polyglot-bench",
|
|
26
|
+
"prompt": "Repair next/app/api/products/route.ts. GET must return JSON with status 200 on success, map a NOT_FOUND error to a sanitized 404 body {error:{code:'NOT_FOUND',message:'Not found'}}, and map unknown errors to 500 INTERNAL without exposing stack/message details. Preserve the route export.",
|
|
27
|
+
"grader": "graders/polyglot-bench.mjs"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "polyglot-react-native-keyboard",
|
|
31
|
+
"fixture": "fixtures/polyglot-bench",
|
|
32
|
+
"prompt": "Repair react-native/keyboard.ts. keyboardOffset(platform, safeAreaTop, headerHeight) must validate non-negative finite offsets, accept only ios/android, return safeAreaTop+headerHeight for iOS and headerHeight for Android, and throw on invalid input.",
|
|
33
|
+
"grader": "graders/polyglot-bench.mjs"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "polyglot-safe-sql-migration",
|
|
37
|
+
"fixture": "fixtures/polyglot-bench",
|
|
38
|
+
"prompt": "Repair db/migrations/20260920_add_order_key.sql as a forward-compatible migration: add order_key as nullable first, backfill existing rows deterministically from id, then make it NOT NULL and add a UNIQUE index. Do not drop/truncate tables or delete data.",
|
|
39
|
+
"grader": "graders/polyglot-bench.mjs"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "polyglot-monorepo-workspace-boundary",
|
|
43
|
+
"fixture": "fixtures/polyglot-bench",
|
|
44
|
+
"prompt": "Repair the monorepo dependency boundary in monorepo/package.json and monorepo/packages/web/package.json. Root workspaces must include packages/* and web must depend on @demo/api using workspace:*. Do not edit the generated monorepo/pnpm-lock.yaml.",
|
|
45
|
+
"grader": "graders/polyglot-bench.mjs"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "polyglot-generated-contract-discipline",
|
|
49
|
+
"fixture": "fixtures/polyglot-bench",
|
|
50
|
+
"prompt": "Repair api/openapi.json so the User schema preserves the legacy name field and also exposes displayName, with id and displayName required. Do not edit api/generated/client.ts because it is generated output; only the source contract should change.",
|
|
51
|
+
"grader": "graders/polyglot-bench.mjs"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|