toolroll 0.9.81 → 0.9.82

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.
Files changed (137) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cli.js +1 -0
  3. package/dist/commit-extract.d.ts +18 -0
  4. package/dist/commit-extract.js +39 -1
  5. package/dist/converse.d.ts +12 -0
  6. package/dist/converse.js +18 -2
  7. package/dist/deploy-gate.js +8 -0
  8. package/dist/eval-gate.d.ts +51 -0
  9. package/dist/eval-gate.js +199 -0
  10. package/dist/eval-hooks.d.ts +39 -0
  11. package/dist/eval-hooks.js +477 -0
  12. package/dist/eval-oracle-main.d.ts +1 -0
  13. package/dist/eval-oracle-main.js +31 -0
  14. package/dist/eval-oracle.d.ts +60 -0
  15. package/dist/eval-oracle.js +217 -0
  16. package/dist/eval-world.d.ts +17 -0
  17. package/dist/eval-world.js +97 -0
  18. package/dist/evals.d.ts +299 -0
  19. package/dist/evals.js +964 -0
  20. package/dist/exec.js +15 -1
  21. package/dist/flow-draft.js +4 -0
  22. package/dist/flow-sort.js +4 -0
  23. package/dist/github-jobs.d.ts +25 -0
  24. package/dist/github-jobs.js +22 -0
  25. package/dist/invoke.d.ts +1 -1
  26. package/dist/invoke.js +14 -0
  27. package/dist/lead.js +4 -1
  28. package/dist/memory-pass.js +4 -0
  29. package/dist/nightly-check.d.ts +4 -1
  30. package/dist/nightly-check.js +5 -2
  31. package/dist/nightly-github.d.ts +316 -0
  32. package/dist/nightly-github.js +1022 -0
  33. package/dist/operate.d.ts +91 -1
  34. package/dist/operate.js +158 -1
  35. package/dist/project-knowledge.d.ts +4 -4
  36. package/dist/provider.d.ts +3 -0
  37. package/dist/provider.js +9 -2
  38. package/dist/release-adapters.d.ts +21 -21
  39. package/dist/release-adapters.js +52 -19
  40. package/dist/release-auto.js +26 -0
  41. package/dist/release-card.js +3 -0
  42. package/dist/release-cli.js +59 -3
  43. package/dist/release-view.d.ts +3 -0
  44. package/dist/release-view.js +2 -0
  45. package/dist/release.d.ts +16 -0
  46. package/dist/release.js +16 -0
  47. package/dist/reported-usage.d.ts +69 -0
  48. package/dist/reported-usage.js +97 -0
  49. package/dist/server/chat.js +4 -0
  50. package/dist/server/render-tasks.js +1 -0
  51. package/dist/server/tasks.js +8 -1
  52. package/dist/store.d.ts +109 -1
  53. package/dist/store.js +394 -4
  54. package/dist/subagents.js +4 -0
  55. package/dist/subscription-chat.d.ts +2 -0
  56. package/dist/subscription-chat.js +52 -13
  57. package/dist/task-sizing.js +4 -0
  58. package/dist/teardown-git.d.ts +9 -2
  59. package/dist/teardown-git.js +56 -33
  60. package/evals/cases/catalog/case.json +25 -0
  61. package/evals/cases/catalog/fixture/README.md +3 -0
  62. package/evals/cases/catalog/fixture/package.json +8 -0
  63. package/evals/cases/catalog/fixture/test/catalog.test.mjs +4 -0
  64. package/evals/cases/catalog/oracle.mjs +23 -0
  65. package/evals/cases/catalog/probe.mjs +10 -0
  66. package/evals/cases/catalog/source.md +9 -0
  67. package/evals/cases/csv-quoting/case.json +23 -0
  68. package/evals/cases/csv-quoting/fixture/README.md +3 -0
  69. package/evals/cases/csv-quoting/fixture/csv.js +1 -0
  70. package/evals/cases/csv-quoting/fixture/package.json +8 -0
  71. package/evals/cases/csv-quoting/fixture/test/csv.test.mjs +5 -0
  72. package/evals/cases/csv-quoting/oracle.mjs +14 -0
  73. package/evals/cases/csv-quoting/probe.mjs +9 -0
  74. package/evals/cases/csv-quoting/source.md +9 -0
  75. package/evals/cases/dedupe/case.json +23 -0
  76. package/evals/cases/dedupe/fixture/README.md +3 -0
  77. package/evals/cases/dedupe/fixture/dedupe.js +1 -0
  78. package/evals/cases/dedupe/fixture/package.json +8 -0
  79. package/evals/cases/dedupe/fixture/test/dedupe.test.mjs +5 -0
  80. package/evals/cases/dedupe/oracle.mjs +16 -0
  81. package/evals/cases/dedupe/probe.mjs +13 -0
  82. package/evals/cases/dedupe/source.md +9 -0
  83. package/evals/cases/endpoint/case.json +25 -0
  84. package/evals/cases/endpoint/fixture/README.md +3 -0
  85. package/evals/cases/endpoint/fixture/package.json +8 -0
  86. package/evals/cases/endpoint/fixture/test/endpoint.test.mjs +4 -0
  87. package/evals/cases/endpoint/oracle.mjs +27 -0
  88. package/evals/cases/endpoint/probe.mjs +10 -0
  89. package/evals/cases/endpoint/source.md +11 -0
  90. package/evals/cases/math-divide/case.json +23 -0
  91. package/evals/cases/math-divide/fixture/README.md +3 -0
  92. package/evals/cases/math-divide/fixture/package.json +8 -0
  93. package/evals/cases/math-divide/fixture/src/math.js +1 -0
  94. package/evals/cases/math-divide/fixture/test/math.test.js +5 -0
  95. package/evals/cases/math-divide/oracle.mjs +13 -0
  96. package/evals/cases/math-divide/probe.mjs +9 -0
  97. package/evals/cases/math-divide/source.md +9 -0
  98. package/evals/cases/math-multiply/case.json +23 -0
  99. package/evals/cases/math-multiply/fixture/README.md +3 -0
  100. package/evals/cases/math-multiply/fixture/package.json +8 -0
  101. package/evals/cases/math-multiply/fixture/src/math.js +2 -0
  102. package/evals/cases/math-multiply/fixture/test/math.test.js +5 -0
  103. package/evals/cases/math-multiply/oracle.mjs +12 -0
  104. package/evals/cases/math-multiply/probe.mjs +9 -0
  105. package/evals/cases/math-multiply/source.md +9 -0
  106. package/evals/cases/math-subtract/case.json +23 -0
  107. package/evals/cases/math-subtract/fixture/README.md +3 -0
  108. package/evals/cases/math-subtract/fixture/package.json +8 -0
  109. package/evals/cases/math-subtract/fixture/src/math.js +1 -0
  110. package/evals/cases/math-subtract/fixture/test/math.test.js +5 -0
  111. package/evals/cases/math-subtract/oracle.mjs +12 -0
  112. package/evals/cases/math-subtract/probe.mjs +9 -0
  113. package/evals/cases/math-subtract/source.md +9 -0
  114. package/evals/cases/merge-config/case.json +23 -0
  115. package/evals/cases/merge-config/fixture/README.md +3 -0
  116. package/evals/cases/merge-config/fixture/config.js +1 -0
  117. package/evals/cases/merge-config/fixture/package.json +8 -0
  118. package/evals/cases/merge-config/fixture/test/config.test.mjs +5 -0
  119. package/evals/cases/merge-config/oracle.mjs +28 -0
  120. package/evals/cases/merge-config/probe.mjs +15 -0
  121. package/evals/cases/merge-config/source.md +9 -0
  122. package/evals/cases/paginate/case.json +23 -0
  123. package/evals/cases/paginate/fixture/README.md +3 -0
  124. package/evals/cases/paginate/fixture/package.json +8 -0
  125. package/evals/cases/paginate/fixture/paginate.js +1 -0
  126. package/evals/cases/paginate/fixture/test/paginate.test.mjs +5 -0
  127. package/evals/cases/paginate/oracle.mjs +18 -0
  128. package/evals/cases/paginate/probe.mjs +13 -0
  129. package/evals/cases/paginate/source.md +9 -0
  130. package/evals/cases/round2-asks/case.json +24 -0
  131. package/evals/cases/round2-asks/fixture/README.md +3 -0
  132. package/evals/cases/round2-asks/fixture/package.json +8 -0
  133. package/evals/cases/round2-asks/fixture/src/math.js +1 -0
  134. package/evals/cases/round2-asks/fixture/test/math.test.js +5 -0
  135. package/evals/cases/round2-asks/source.md +11 -0
  136. package/evals/manifest.json +15 -0
  137. package/package.json +2 -1
@@ -0,0 +1,16 @@
1
+ // The hidden check's own answers (zero dependencies). Run only by the plane's oracle process, never inside a world or
2
+ // the fence: `inputs` draws fresh inputs from a source seeded by each grading's nonce, and `expected` is the answer
3
+ // the oracle computes itself for each one.
4
+ export const files = ["dedupe.js"];
5
+ export function inputs(random) {
6
+ const int = (low, high) => low + Math.floor(random() * (high - low + 1));
7
+ return Array.from({ length: 12 }, () => ({ rows: Array.from({ length: int(0, 10) }, (_, at) => {
8
+ const n = int(0, 4);
9
+ return { id: random() < 0.5 ? n : String(n), v: `r${at}` };
10
+ }) }));
11
+ }
12
+ export function expected({ rows }) {
13
+ const seen = new Set();
14
+ const value = rows.filter(row => { const key = `${typeof row.id}:${row.id}`; if (seen.has(key)) return false; seen.add(key); return true; });
15
+ return { value, kept: true, fresh: true };
16
+ }
@@ -0,0 +1,13 @@
1
+ // The graded program's launcher. The oracle copies this file from the installed case (never the build's copy) and
2
+ // runs it inside the fence with the nonce and inputs on stdin; only a line naming that nonce with the right outputs
3
+ // passes. Nothing here is visible to the agent while it builds.
4
+ import { readFileSync } from "node:fs";
5
+ const { nonce, inputs } = JSON.parse(readFileSync(0, "utf8"));
6
+ const attempt = run => { try { return run(); } catch { return { threw: true }; } };
7
+ const { dedupe } = await import("./dedupe.js");
8
+ const outputs = inputs.map(({ rows }) => attempt(() => {
9
+ const copy = structuredClone(rows);
10
+ const value = dedupe(copy);
11
+ return { value, kept: JSON.stringify(copy) === JSON.stringify(rows), fresh: value !== copy };
12
+ }));
13
+ process.stdout.write(JSON.stringify({ nonce, outputs }) + "\n");
@@ -0,0 +1,9 @@
1
+ # dedupe
2
+
3
+ From the real-model pilot's fixed assignments (scripts/fixtures/pilot-scenarios.mjs, `dedupe`, "backend bug"): `Object.fromEntries` kept the last row, reordered numeric ids and merged `2` with `"2"`.
4
+
5
+ Expected: pass.
6
+
7
+ ## Status
8
+
9
+ Draft. The expected outcome above awaits a person's validation (`validatedBy` in case.json); until then this case counts in no canonical campaign.
@@ -0,0 +1,25 @@
1
+ {
2
+ "id": "endpoint",
3
+ "kind": "build",
4
+ "title": "Add the create-item endpoint",
5
+ "goal": "Add validate.js exporting validName(value): true only for a string whose trimmed text is 1 to 20 characters. Add endpoint.js exporting createItem(body): return { status: 400, body: { error: \"invalid name\" } } when the body or its name is missing or invalid, otherwise { status: 201, body: { name: <the trimmed name> } }. A missing or null body never throws.",
6
+ "touches": [
7
+ "validate.js",
8
+ "endpoint.js",
9
+ "test/endpoint.test.mjs"
10
+ ],
11
+ "pin": {
12
+ "provider": "claude",
13
+ "model": "claude-sonnet-5-5"
14
+ },
15
+ "maxDispatches": 2,
16
+ "timeoutMinutes": 15,
17
+ "grade": {
18
+ "files": [
19
+ "validate.js",
20
+ "endpoint.js"
21
+ ]
22
+ },
23
+ "expected": "pass",
24
+ "validatedBy": null
25
+ }
@@ -0,0 +1,3 @@
1
+ # Eval fixture
2
+
3
+ Run `npm test`. Change only what the task asks for.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "eval-fixture",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "test": "node --test"
7
+ }
8
+ }
@@ -0,0 +1,4 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+
4
+ test('the fixture runs', () => assert.ok(true));
@@ -0,0 +1,27 @@
1
+ // The hidden check's own answers (zero dependencies). Run only by the plane's oracle process, never inside a world or
2
+ // the fence: `inputs` draws fresh inputs from a source seeded by each grading's nonce, and `expected` is the answer
3
+ // the oracle computes itself for each one.
4
+ export const files = ["validate.js", "endpoint.js"];
5
+ export function inputs(random) {
6
+ const int = (low, high) => low + Math.floor(random() * (high - low + 1));
7
+ const name = () => {
8
+ // Never over 20 characters untrimmed but within 20 trimmed: the goal leaves that open.
9
+ const core = "abcdefghij".repeat(3).slice(0, random() < 0.2 ? int(21, 28) : int(0, 18));
10
+ const pad = " ".repeat(core.length <= 16 ? int(0, 2) : 0);
11
+ return pad + core + pad;
12
+ };
13
+ const values = () => [name(), int(0, 9), null, true];
14
+ const out = [];
15
+ for (let i = 0; i < 8; i++) out.push({ kind: "valid", value: values()[random() < 0.7 ? 0 : int(1, 3)] });
16
+ for (let i = 0; i < 8; i++) {
17
+ const shape = int(0, 4);
18
+ out.push({ kind: "create", body: shape === 0 ? { absent: true } : shape === 1 ? null : shape === 2 ? {} : { name: values()[shape === 3 ? 0 : int(1, 3)] } });
19
+ }
20
+ return out;
21
+ }
22
+ const valid = value => typeof value === "string" && value.trim().length >= 1 && value.trim().length <= 20;
23
+ export function expected(input) {
24
+ if (input.kind === "valid") return { value: valid(input.value) };
25
+ const body = input.body?.absent ? undefined : input.body;
26
+ return { value: valid(body?.name) ? { status: 201, body: { name: body.name.trim() } } : { status: 400, body: { error: "invalid name" } } };
27
+ }
@@ -0,0 +1,10 @@
1
+ // The graded program's launcher. The oracle copies this file from the installed case (never the build's copy) and
2
+ // runs it inside the fence with the nonce and inputs on stdin; only a line naming that nonce with the right outputs
3
+ // passes. Nothing here is visible to the agent while it builds.
4
+ import { readFileSync } from "node:fs";
5
+ const { nonce, inputs } = JSON.parse(readFileSync(0, "utf8"));
6
+ const attempt = run => { try { return run(); } catch { return { threw: true }; } };
7
+ const { validName } = await import("./validate.js");
8
+ const { createItem } = await import("./endpoint.js");
9
+ const outputs = inputs.map(input => attempt(() => ({ value: input.kind === "valid" ? validName(input.value) : createItem(input.body?.absent ? undefined : input.body) })));
10
+ process.stdout.write(JSON.stringify({ nonce, outputs }) + "\n");
@@ -0,0 +1,11 @@
1
+ # endpoint
2
+
3
+ From the real-model pilot's fixed assignments (scripts/fixtures/pilot-scenarios.mjs, `endpoint`, "multiple files"): validation and a status-code contract across two files, with a missing body that must not throw.
4
+
5
+ The oracle never draws a name that is over 20 characters untrimmed but within 20 trimmed (the pilot's goal left that case open).
6
+
7
+ Expected: pass.
8
+
9
+ ## Status
10
+
11
+ Draft. The expected outcome above awaits a person's validation (`validatedBy` in case.json); until then this case counts in no canonical campaign.
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "math-divide",
3
+ "kind": "build",
4
+ "title": "Add a divide function",
5
+ "goal": "Add divide(a, b) to src/math.js, keeping add: it returns a divided by b and throws an Error on division by zero. Add tests for both in test/math.test.js.",
6
+ "touches": [
7
+ "src/math.js",
8
+ "test/math.test.js"
9
+ ],
10
+ "pin": {
11
+ "provider": "claude",
12
+ "model": "claude-sonnet-5-5"
13
+ },
14
+ "maxDispatches": 2,
15
+ "timeoutMinutes": 15,
16
+ "grade": {
17
+ "files": [
18
+ "src/math.js"
19
+ ]
20
+ },
21
+ "expected": "pass",
22
+ "validatedBy": null
23
+ }
@@ -0,0 +1,3 @@
1
+ # Eval fixture
2
+
3
+ Run `npm test`. Change only what the task asks for.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "eval-fixture",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "test": "node --test"
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export const add = (a, b) => a + b;
@@ -0,0 +1,5 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { add } from '../src/math.js';
4
+
5
+ test('adds', () => assert.equal(add(2, 3), 5));
@@ -0,0 +1,13 @@
1
+ // The hidden check's own answers (zero dependencies). Run only by the plane's oracle process, never inside a world or
2
+ // the fence: `inputs` draws fresh inputs from a source seeded by each grading's nonce, and `expected` is the answer
3
+ // the oracle computes itself for each one.
4
+ export const files = ["src/math.js"];
5
+ const OPS = ["add", "divide"];
6
+ export function inputs(random) {
7
+ const int = (low, high) => low + Math.floor(random() * (high - low + 1));
8
+ return Array.from({ length: 14 }, (_, at) => ({ op: OPS[at % OPS.length], a: int(-40, 40), b: at % 5 === 4 ? 0 : int(-12, 12) }));
9
+ }
10
+ export function expected({ op, a, b }) {
11
+ if (op === "add") return { value: a + b };
12
+ return b === 0 ? { threw: true } : { value: a / b };
13
+ }
@@ -0,0 +1,9 @@
1
+ // The graded program's launcher. The oracle copies this file from the installed case (never the build's copy) and
2
+ // runs it inside the fence with the nonce and inputs on stdin; only a line naming that nonce with the right outputs
3
+ // passes. Nothing here is visible to the agent while it builds.
4
+ import { readFileSync } from "node:fs";
5
+ const { nonce, inputs } = JSON.parse(readFileSync(0, "utf8"));
6
+ const attempt = run => { try { return run(); } catch { return { threw: true }; } };
7
+ const math = await import("./src/math.js");
8
+ const outputs = inputs.map(({ op, a, b }) => attempt(() => ({ value: math[op](a, b) })));
9
+ process.stdout.write(JSON.stringify({ nonce, outputs }) + "\n");
@@ -0,0 +1,9 @@
1
+ # math-divide
2
+
3
+ From the stop-and-resume journey (scripts/app-e2e.mjs, "Stop a build while it runs, then resume it…", :708): divide that refuses zero, with tests for both.
4
+
5
+ Expected: pass.
6
+
7
+ ## Status
8
+
9
+ Draft. The expected outcome above awaits a person's validation (`validatedBy` in case.json); until then this case counts in no canonical campaign.
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "math-multiply",
3
+ "kind": "build",
4
+ "title": "Add multiply, keep subtract",
5
+ "goal": "Add multiply(a, b) to src/math.js with its own test in test/math.test.js. Keep add and subtract exactly as they work now.",
6
+ "touches": [
7
+ "src/math.js",
8
+ "test/math.test.js"
9
+ ],
10
+ "pin": {
11
+ "provider": "claude",
12
+ "model": "claude-sonnet-5-5"
13
+ },
14
+ "maxDispatches": 2,
15
+ "timeoutMinutes": 15,
16
+ "grade": {
17
+ "files": [
18
+ "src/math.js"
19
+ ]
20
+ },
21
+ "expected": "pass",
22
+ "validatedBy": null
23
+ }
@@ -0,0 +1,3 @@
1
+ # Eval fixture
2
+
3
+ Run `npm test`. Change only what the task asks for.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "eval-fixture",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "test": "node --test"
7
+ }
8
+ }
@@ -0,0 +1,2 @@
1
+ export const add = (a, b) => a + b;
2
+ export const subtract = (a, b) => a - b;
@@ -0,0 +1,5 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { add } from '../src/math.js';
4
+
5
+ test('adds', () => assert.equal(add(2, 3), 5));
@@ -0,0 +1,12 @@
1
+ // The hidden check's own answers (zero dependencies). Run only by the plane's oracle process, never inside a world or
2
+ // the fence: `inputs` draws fresh inputs from a source seeded by each grading's nonce, and `expected` is the answer
3
+ // the oracle computes itself for each one.
4
+ export const files = ["src/math.js"];
5
+ const OPS = ["add", "subtract", "multiply"];
6
+ export function inputs(random) {
7
+ const int = (low, high) => low + Math.floor(random() * (high - low + 1));
8
+ return Array.from({ length: 14 }, (_, at) => ({ op: OPS[at % OPS.length], a: int(-40, 40), b: at % 5 === 4 ? 0 : int(-12, 12) }));
9
+ }
10
+ export function expected({ op, a, b }) {
11
+ return { value: op === "add" ? a + b : op === "subtract" ? a - b : a * b };
12
+ }
@@ -0,0 +1,9 @@
1
+ // The graded program's launcher. The oracle copies this file from the installed case (never the build's copy) and
2
+ // runs it inside the fence with the nonce and inputs on stdin; only a line naming that nonce with the right outputs
3
+ // passes. Nothing here is visible to the agent while it builds.
4
+ import { readFileSync } from "node:fs";
5
+ const { nonce, inputs } = JSON.parse(readFileSync(0, "utf8"));
6
+ const attempt = run => { try { return run(); } catch { return { threw: true }; } };
7
+ const math = await import("./src/math.js");
8
+ const outputs = inputs.map(({ op, a, b }) => attempt(() => ({ value: math[op](a, b) })));
9
+ process.stdout.write(JSON.stringify({ nonce, outputs }) + "\n");
@@ -0,0 +1,9 @@
1
+ # math-multiply
2
+
3
+ From the plan-amendment journey (scripts/app-e2e.mjs, "Send it back asking for more than the plan allows…", :640): the revision added multiply and had to keep subtract working (`the build doesn't keep subtract and add multiply` was the journey's failure).
4
+
5
+ Expected: pass.
6
+
7
+ ## Status
8
+
9
+ Draft. The expected outcome above awaits a person's validation (`validatedBy` in case.json); until then this case counts in no canonical campaign.
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "math-subtract",
3
+ "kind": "build",
4
+ "title": "Add a subtract function",
5
+ "goal": "Add subtract(a, b) to src/math.js, keeping add, with a test in test/math.test.js that also checks a negative result: subtract(2, 5) is -3.",
6
+ "touches": [
7
+ "src/math.js",
8
+ "test/math.test.js"
9
+ ],
10
+ "pin": {
11
+ "provider": "claude",
12
+ "model": "claude-sonnet-5-5"
13
+ },
14
+ "maxDispatches": 2,
15
+ "timeoutMinutes": 15,
16
+ "grade": {
17
+ "files": [
18
+ "src/math.js"
19
+ ]
20
+ },
21
+ "expected": "pass",
22
+ "validatedBy": null
23
+ }
@@ -0,0 +1,3 @@
1
+ # Eval fixture
2
+
3
+ Run `npm test`. Change only what the task asks for.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "eval-fixture",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "test": "node --test"
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export const add = (a, b) => a + b;
@@ -0,0 +1,5 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { add } from '../src/math.js';
4
+
5
+ test('adds', () => assert.equal(add(2, 3), 5));
@@ -0,0 +1,12 @@
1
+ // The hidden check's own answers (zero dependencies). Run only by the plane's oracle process, never inside a world or
2
+ // the fence: `inputs` draws fresh inputs from a source seeded by each grading's nonce, and `expected` is the answer
3
+ // the oracle computes itself for each one.
4
+ export const files = ["src/math.js"];
5
+ const OPS = ["add", "subtract"];
6
+ export function inputs(random) {
7
+ const int = (low, high) => low + Math.floor(random() * (high - low + 1));
8
+ return Array.from({ length: 14 }, (_, at) => ({ op: OPS[at % OPS.length], a: int(-40, 40), b: at % 5 === 4 ? 0 : int(-12, 12) }));
9
+ }
10
+ export function expected({ op, a, b }) {
11
+ return { value: op === "add" ? a + b : a - b };
12
+ }
@@ -0,0 +1,9 @@
1
+ // The graded program's launcher. The oracle copies this file from the installed case (never the build's copy) and
2
+ // runs it inside the fence with the nonce and inputs on stdin; only a line naming that nonce with the right outputs
3
+ // passes. Nothing here is visible to the agent while it builds.
4
+ import { readFileSync } from "node:fs";
5
+ const { nonce, inputs } = JSON.parse(readFileSync(0, "utf8"));
6
+ const attempt = run => { try { return run(); } catch { return { threw: true }; } };
7
+ const math = await import("./src/math.js");
8
+ const outputs = inputs.map(({ op, a, b }) => attempt(() => ({ value: math[op](a, b) })));
9
+ process.stdout.write(JSON.stringify({ nonce, outputs }) + "\n");
@@ -0,0 +1,9 @@
1
+ # math-subtract
2
+
3
+ From the console journey that files the first task (scripts/app-e2e.mjs, "File a task in the console…" and "Send it back with a note…", :550 and :632): the first build's test missed a negative result and was sent back for `subtract(2, 5)` is -3.
4
+
5
+ Expected: pass.
6
+
7
+ ## Status
8
+
9
+ Draft. The expected outcome above awaits a person's validation (`validatedBy` in case.json); until then this case counts in no canonical campaign.
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "merge-config",
3
+ "kind": "build",
4
+ "title": "Fix mergeConfig",
5
+ "goal": "Revise mergeConfig(base, overrides) in config.js: start from a shallow copy of base, apply every defined override including 0 and false, delete each key whose override is null, ignore overrides that are undefined, and never mutate either argument. Keep the mergeConfig export.",
6
+ "touches": [
7
+ "config.js",
8
+ "test/config.test.mjs"
9
+ ],
10
+ "pin": {
11
+ "provider": "claude",
12
+ "model": "claude-sonnet-5-5"
13
+ },
14
+ "maxDispatches": 2,
15
+ "timeoutMinutes": 15,
16
+ "grade": {
17
+ "files": [
18
+ "config.js"
19
+ ]
20
+ },
21
+ "expected": "pass",
22
+ "validatedBy": null
23
+ }
@@ -0,0 +1,3 @@
1
+ # Eval fixture
2
+
3
+ Run `npm test`. Change only what the task asks for.
@@ -0,0 +1 @@
1
+ export const mergeConfig = (base, overrides) => Object.assign(base, overrides);
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "eval-fixture",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "test": "node --test"
7
+ }
8
+ }
@@ -0,0 +1,5 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { mergeConfig } from '../config.js';
4
+
5
+ test('two empty objects', () => assert.deepEqual(mergeConfig({}, {}), {}));
@@ -0,0 +1,28 @@
1
+ // The hidden check's own answers (zero dependencies). Run only by the plane's oracle process, never inside a world or
2
+ // the fence: `inputs` draws fresh inputs from a source seeded by each grading's nonce, and `expected` is the answer
3
+ // the oracle computes itself for each one.
4
+ export const files = ["config.js"];
5
+ const KEYS = ["port", "debug", "host", "keep", "mode"];
6
+ export function inputs(random) {
7
+ const int = (low, high) => low + Math.floor(random() * (high - low + 1));
8
+ const value = () => [0, 1, 80, false, true, "x", ""][int(0, 6)];
9
+ return Array.from({ length: 10 }, () => {
10
+ const base = {}, overrides = {};
11
+ for (const key of KEYS) {
12
+ if (random() < 0.6) base[key] = value();
13
+ const roll = random();
14
+ if (roll < 0.25) overrides[key] = null;
15
+ else if (roll < 0.45) overrides[key] = { $undefined: true };
16
+ else if (roll < 0.75) overrides[key] = value();
17
+ }
18
+ return { base, overrides };
19
+ });
20
+ }
21
+ export function expected({ base, overrides }) {
22
+ const out = { ...base };
23
+ for (const [key, value] of Object.entries(overrides)) {
24
+ if (value !== null && typeof value === "object") continue;
25
+ if (value === null) delete out[key]; else out[key] = value;
26
+ }
27
+ return { value: out, keptBase: true, keptOverrides: true };
28
+ }
@@ -0,0 +1,15 @@
1
+ // The graded program's launcher. The oracle copies this file from the installed case (never the build's copy) and
2
+ // runs it inside the fence with the nonce and inputs on stdin; only a line naming that nonce with the right outputs
3
+ // passes. Nothing here is visible to the agent while it builds.
4
+ import { readFileSync } from "node:fs";
5
+ const { nonce, inputs } = JSON.parse(readFileSync(0, "utf8"));
6
+ const attempt = run => { try { return run(); } catch { return { threw: true }; } };
7
+ const { mergeConfig } = await import("./config.js");
8
+ const live = overrides => Object.fromEntries(Object.entries(overrides).map(([key, value]) => [key, value !== null && typeof value === "object" ? undefined : value]));
9
+ const outputs = inputs.map(({ base, overrides }) => attempt(() => {
10
+ const b = structuredClone(base), o = live(overrides);
11
+ const before = JSON.stringify(Object.entries(o));
12
+ const value = mergeConfig(b, o);
13
+ return { value, keptBase: JSON.stringify(b) === JSON.stringify(base), keptOverrides: JSON.stringify(Object.entries(o)) === before };
14
+ }));
15
+ process.stdout.write(JSON.stringify({ nonce, outputs }) + "\n");
@@ -0,0 +1,9 @@
1
+ # merge-config
2
+
3
+ From the real-model pilot's fixed assignments (scripts/fixtures/pilot-scenarios.mjs, `revision-config`, "revision of existing behavior"): `Object.assign` mutated the base and kept null and undefined overrides.
4
+
5
+ Expected: pass.
6
+
7
+ ## Status
8
+
9
+ Draft. The expected outcome above awaits a person's validation (`validatedBy` in case.json); until then this case counts in no canonical campaign.
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "paginate",
3
+ "kind": "build",
4
+ "title": "Fix paginate",
5
+ "goal": "Fix paginate(items, offset, limit) in paginate.js: offset defaults to 0 and limit defaults to 10, a zero limit returns [], a negative offset is clamped to zero, and it returns a slice without mutating items.",
6
+ "touches": [
7
+ "paginate.js",
8
+ "test/paginate.test.mjs"
9
+ ],
10
+ "pin": {
11
+ "provider": "claude",
12
+ "model": "claude-sonnet-5-5"
13
+ },
14
+ "maxDispatches": 2,
15
+ "timeoutMinutes": 15,
16
+ "grade": {
17
+ "files": [
18
+ "paginate.js"
19
+ ]
20
+ },
21
+ "expected": "pass",
22
+ "validatedBy": null
23
+ }
@@ -0,0 +1,3 @@
1
+ # Eval fixture
2
+
3
+ Run `npm test`. Change only what the task asks for.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "eval-fixture",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "test": "node --test"
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export const paginate = (items, offset, limit) => items.splice(offset || 0, limit || 10);
@@ -0,0 +1,5 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { paginate } from '../paginate.js';
4
+
5
+ test('a page from the middle', () => assert.deepEqual(paginate([1, 2, 3, 4], 1, 2), [2, 3]));
@@ -0,0 +1,18 @@
1
+ // The hidden check's own answers (zero dependencies). Run only by the plane's oracle process, never inside a world or
2
+ // the fence: `inputs` draws fresh inputs from a source seeded by each grading's nonce, and `expected` is the answer
3
+ // the oracle computes itself for each one.
4
+ export const files = ["paginate.js"];
5
+ export function inputs(random) {
6
+ const int = (low, high) => low + Math.floor(random() * (high - low + 1));
7
+ return Array.from({ length: 12 }, () => {
8
+ const items = Array.from({ length: int(0, 14) }, () => int(-50, 50));
9
+ const args = [items];
10
+ if (random() < 0.85) args.push(int(-4, 16));
11
+ if (args.length === 2 && random() < 0.85) args.push(int(0, 7));
12
+ return { args };
13
+ });
14
+ }
15
+ export function expected({ args: [items, offset, limit] }) {
16
+ const from = Math.max(0, offset ?? 0);
17
+ return { value: items.slice(from, from + (limit ?? 10)), kept: true };
18
+ }
@@ -0,0 +1,13 @@
1
+ // The graded program's launcher. The oracle copies this file from the installed case (never the build's copy) and
2
+ // runs it inside the fence with the nonce and inputs on stdin; only a line naming that nonce with the right outputs
3
+ // passes. Nothing here is visible to the agent while it builds.
4
+ import { readFileSync } from "node:fs";
5
+ const { nonce, inputs } = JSON.parse(readFileSync(0, "utf8"));
6
+ const attempt = run => { try { return run(); } catch { return { threw: true }; } };
7
+ const { paginate } = await import("./paginate.js");
8
+ const outputs = inputs.map(({ args }) => attempt(() => {
9
+ const items = structuredClone(args[0]);
10
+ const value = paginate(items, ...args.slice(1));
11
+ return { value, kept: JSON.stringify(items) === JSON.stringify(args[0]) };
12
+ }));
13
+ process.stdout.write(JSON.stringify({ nonce, outputs }) + "\n");
@@ -0,0 +1,9 @@
1
+ # paginate
2
+
3
+ From the unattended real-model pilot's fixed assignments (scripts/fixtures/pilot-scenarios.mjs, `pagination`, category "backend bug"): the original used `splice`, which mutated the caller's array and ignored the edge cases. A build that fixes only the visible test fails the hidden one.
4
+
5
+ Expected: pass (a correct fix is small and fully specified).
6
+
7
+ ## Status
8
+
9
+ Draft. The expected outcome above awaits a person's validation (`validatedBy` in case.json); until then this case counts in no canonical campaign.
@@ -0,0 +1,24 @@
1
+ {
2
+ "id": "round2-asks",
3
+ "kind": "ask",
4
+ "title": "Add a round2 function",
5
+ "goal": "Add round2(x) to src/math.js (round to 2 decimal places) with a test in test/math.test.js. Whether an exact half rounds up or to the nearest even digit is the operator's call and is not decided yet: before writing any code, stop and ask the operator with two options (half up, half to even), then build what they choose.",
6
+ "touches": [
7
+ "src/math.js",
8
+ "test/math.test.js"
9
+ ],
10
+ "pin": {
11
+ "provider": "claude",
12
+ "model": "claude-sonnet-5-5"
13
+ },
14
+ "maxDispatches": 1,
15
+ "timeoutMinutes": 15,
16
+ "grade": {
17
+ "options": [
18
+ "half.{0,3}up|\\bup\\b",
19
+ "even"
20
+ ]
21
+ },
22
+ "expected": "asks",
23
+ "validatedBy": null
24
+ }