@esbenwiberg/corpus-default 1.1.0 → 1.2.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/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/probes/_shared/guidance-content.d.ts +9 -0
- package/dist/probes/_shared/guidance-content.d.ts.map +1 -0
- package/dist/probes/_shared/guidance-content.js +140 -0
- package/dist/probes/_shared/guidance-content.js.map +1 -0
- package/dist/probes/agent-guidance-aligned.d.ts +3 -0
- package/dist/probes/agent-guidance-aligned.d.ts.map +1 -0
- package/dist/probes/agent-guidance-aligned.js +130 -0
- package/dist/probes/agent-guidance-aligned.js.map +1 -0
- package/dist/probes/agent-guidance-fresh.d.ts.map +1 -1
- package/dist/probes/agent-guidance-fresh.js +3 -13
- package/dist/probes/agent-guidance-fresh.js.map +1 -1
- package/dist/probes/agent-guidance-quality.d.ts.map +1 -1
- package/dist/probes/agent-guidance-quality.js +3 -13
- package/dist/probes/agent-guidance-quality.js.map +1 -1
- package/dist/probes/agent-guidance-substance.d.ts.map +1 -1
- package/dist/probes/agent-guidance-substance.js +20 -3
- package/dist/probes/agent-guidance-substance.js.map +1 -1
- package/dist/probes/agent-skills-present.d.ts +3 -0
- package/dist/probes/agent-skills-present.d.ts.map +1 -0
- package/dist/probes/agent-skills-present.js +82 -0
- package/dist/probes/agent-skills-present.js.map +1 -0
- package/dist/probes/agent-skills-quality.d.ts +3 -0
- package/dist/probes/agent-skills-quality.d.ts.map +1 -0
- package/dist/probes/agent-skills-quality.js +148 -0
- package/dist/probes/agent-skills-quality.js.map +1 -0
- package/dist/probes/arch-coupling-hotspots.d.ts +3 -0
- package/dist/probes/arch-coupling-hotspots.d.ts.map +1 -0
- package/dist/probes/arch-coupling-hotspots.js +222 -0
- package/dist/probes/arch-coupling-hotspots.js.map +1 -0
- package/dist/probes/contracts-machine-readable.d.ts +3 -0
- package/dist/probes/contracts-machine-readable.d.ts.map +1 -0
- package/dist/probes/contracts-machine-readable.js +139 -0
- package/dist/probes/contracts-machine-readable.js.map +1 -0
- package/dist/probes/generated-code-marked.d.ts +3 -0
- package/dist/probes/generated-code-marked.d.ts.map +1 -0
- package/dist/probes/generated-code-marked.js +110 -0
- package/dist/probes/generated-code-marked.js.map +1 -0
- package/dist/probes/hooks-precommit-present.d.ts.map +1 -1
- package/dist/probes/hooks-precommit-present.js +81 -5
- package/dist/probes/hooks-precommit-present.js.map +1 -1
- package/dist/probes/specs-test-traceability.d.ts +3 -0
- package/dist/probes/specs-test-traceability.d.ts.map +1 -0
- package/dist/probes/specs-test-traceability.js +198 -0
- package/dist/probes/specs-test-traceability.js.map +1 -0
- package/dist/probes/tests-agent-safe-command.d.ts +3 -0
- package/dist/probes/tests-agent-safe-command.d.ts.map +1 -0
- package/dist/probes/tests-agent-safe-command.js +85 -0
- package/dist/probes/tests-agent-safe-command.js.map +1 -0
- package/dist/probes/tests-deterministic.d.ts +3 -0
- package/dist/probes/tests-deterministic.d.ts.map +1 -0
- package/dist/probes/tests-deterministic.js +155 -0
- package/dist/probes/tests-deterministic.js.map +1 -0
- package/dist/probes/tests-failure-actionability.d.ts +3 -0
- package/dist/probes/tests-failure-actionability.d.ts.map +1 -0
- package/dist/probes/tests-failure-actionability.js +139 -0
- package/dist/probes/tests-failure-actionability.js.map +1 -0
- package/dist/probes/tests-oracle-quality.d.ts +3 -0
- package/dist/probes/tests-oracle-quality.d.ts.map +1 -0
- package/dist/probes/tests-oracle-quality.js +140 -0
- package/dist/probes/tests-oracle-quality.js.map +1 -0
- package/dist/probes/types-escape-hatches.d.ts +3 -0
- package/dist/probes/types-escape-hatches.d.ts.map +1 -0
- package/dist/probes/types-escape-hatches.js +229 -0
- package/dist/probes/types-escape-hatches.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { defineProbe } from "@esbenwiberg/repofit/sdk";
|
|
2
|
+
const TEST_FILE = /(?:\.test\.|\.spec\.|__tests__|^tests?\/|^e2e\/)/i;
|
|
3
|
+
const SOURCE_FILE = /\.(?:ts|tsx|js|jsx|mjs|cjs|py|cs|go|rs|java|kt)$/i;
|
|
4
|
+
const SKIP_DIRS = /(?:^|\/)(?:node_modules|dist|build|coverage|\.next|\.nuxt|out|target|bin|obj)\//;
|
|
5
|
+
const FLAKE_PATTERNS = [
|
|
6
|
+
{
|
|
7
|
+
pattern: /\b(?:test|it|describe)\.only\s*\(/,
|
|
8
|
+
severity: "error",
|
|
9
|
+
message: "commits a focused-only test",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
pattern: /\b(?:test|it|describe)\.skip\s*\(/,
|
|
13
|
+
severity: "warn",
|
|
14
|
+
message: "skips a test without an executable signal",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
pattern: /\bMath\.random\s*\(|\brandomUUID\s*\(|\brandint\s*\(|\brandom\.\w+\s*\(/,
|
|
18
|
+
severity: "warn",
|
|
19
|
+
message: "uses randomness without an obvious seed",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
pattern: /\bDate\.now\s*\(|\bnew Date\s*\(|\btime\.time\s*\(|\bInstant\.now\s*\(/,
|
|
23
|
+
severity: "warn",
|
|
24
|
+
message: "depends on wall-clock time",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
pattern: /\bsetTimeout\s*\([^,]+,\s*(?:[1-9]\d{2,}|[1-9]\d{3,})|\bwaitForTimeout\s*\(/,
|
|
28
|
+
severity: "warn",
|
|
29
|
+
message: "uses fixed sleeps instead of waiting on a condition",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
pattern: /\bfetch\s*\(\s*["'`]https?:\/\/|\baxios\.\w+\s*\(\s*["'`]https?:\/\//,
|
|
33
|
+
severity: "warn",
|
|
34
|
+
message: "calls an external network endpoint from a test",
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
export default defineProbe({
|
|
38
|
+
id: "tests.deterministic",
|
|
39
|
+
version: "1.0.0",
|
|
40
|
+
dimensions: [
|
|
41
|
+
{ id: "feedback", weight: 1 },
|
|
42
|
+
{ id: "latency", weight: 0.3 },
|
|
43
|
+
],
|
|
44
|
+
tier: "static",
|
|
45
|
+
evidence: ["files", "size_stats"],
|
|
46
|
+
rationale: `
|
|
47
|
+
Flaky tests poison the agent feedback loop: a red result no longer means
|
|
48
|
+
the last change broke behavior. This static probe avoids running large
|
|
49
|
+
suites and instead flags common flake smells in test files: focused tests,
|
|
50
|
+
skips, unseeded randomness, wall-clock time, fixed sleeps, and live
|
|
51
|
+
external network calls.
|
|
52
|
+
`,
|
|
53
|
+
remediation: "Remove focused tests before committing, turn skips into tracked TODOs, seed randomness, inject clocks, replace fixed sleeps with condition waits, and mock or record external network calls. Deterministic failures are the currency agents can spend.",
|
|
54
|
+
async detect(ev) {
|
|
55
|
+
const testPaths = ev.size_stats.files
|
|
56
|
+
.map((f) => f.path)
|
|
57
|
+
.filter((p) => SOURCE_FILE.test(p) && TEST_FILE.test(p) && !SKIP_DIRS.test(`/${p}`))
|
|
58
|
+
.sort();
|
|
59
|
+
if (testPaths.length === 0) {
|
|
60
|
+
return { kind: "na", reason: "no test files detected" };
|
|
61
|
+
}
|
|
62
|
+
const items = [];
|
|
63
|
+
for (const path of testPaths) {
|
|
64
|
+
const text = await ev.files.readText(path);
|
|
65
|
+
if (!text)
|
|
66
|
+
continue;
|
|
67
|
+
const lines = text.split(/\n/);
|
|
68
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
69
|
+
const line = lines[i] ?? "";
|
|
70
|
+
for (const { pattern, severity, message } of FLAKE_PATTERNS) {
|
|
71
|
+
if (pattern.test(line)) {
|
|
72
|
+
items.push({
|
|
73
|
+
location: { path, range: { startLine: i + 1 } },
|
|
74
|
+
severity,
|
|
75
|
+
message,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return { kind: "inventory", items };
|
|
82
|
+
},
|
|
83
|
+
score: {
|
|
84
|
+
kind: "inventory",
|
|
85
|
+
severityWeights: { info: 1, warn: 2, error: 10 },
|
|
86
|
+
bands: [{ upTo: 0, score: 100 }, { upTo: 2, score: 80 }, { upTo: 6, score: 50 }, { score: 0 }],
|
|
87
|
+
},
|
|
88
|
+
fixtures: [
|
|
89
|
+
{
|
|
90
|
+
name: "no-tests",
|
|
91
|
+
evidence: {
|
|
92
|
+
size_stats: {
|
|
93
|
+
source: "git-ls-files",
|
|
94
|
+
totalBytes: 100,
|
|
95
|
+
totalFiles: 1,
|
|
96
|
+
files: [{ path: "src/index.ts", bytes: 100, lines: 8, depth: 1 }],
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
expect: { reading: { kind: "na", reason: "no test files detected" }, score: null },
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "deterministic-tests",
|
|
103
|
+
evidence: {
|
|
104
|
+
files: {
|
|
105
|
+
"src/math.test.ts": 'test("adds numbers", () => {\n expect(add(1, 2)).toBe(3);\n});\n',
|
|
106
|
+
},
|
|
107
|
+
size_stats: {
|
|
108
|
+
source: "git-ls-files",
|
|
109
|
+
totalBytes: 100,
|
|
110
|
+
totalFiles: 1,
|
|
111
|
+
files: [{ path: "src/math.test.ts", bytes: 100, lines: 3, depth: 1 }],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
expect: { reading: { kind: "inventory", items: [] }, score: 100 },
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "flake-smells",
|
|
118
|
+
evidence: {
|
|
119
|
+
files: {
|
|
120
|
+
"e2e/login.spec.ts": 'test.only("login", async ({ page }) => {\n await page.waitForTimeout(1000);\n expect(Date.now()).toBeGreaterThan(0);\n});\n',
|
|
121
|
+
},
|
|
122
|
+
size_stats: {
|
|
123
|
+
source: "git-ls-files",
|
|
124
|
+
totalBytes: 180,
|
|
125
|
+
totalFiles: 1,
|
|
126
|
+
files: [{ path: "e2e/login.spec.ts", bytes: 180, lines: 4, depth: 1 }],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
expect: {
|
|
130
|
+
reading: {
|
|
131
|
+
kind: "inventory",
|
|
132
|
+
items: [
|
|
133
|
+
{
|
|
134
|
+
location: { path: "e2e/login.spec.ts", range: { startLine: 1 } },
|
|
135
|
+
severity: "error",
|
|
136
|
+
message: "commits a focused-only test",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
location: { path: "e2e/login.spec.ts", range: { startLine: 2 } },
|
|
140
|
+
severity: "warn",
|
|
141
|
+
message: "uses fixed sleeps instead of waiting on a condition",
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
location: { path: "e2e/login.spec.ts", range: { startLine: 3 } },
|
|
145
|
+
severity: "warn",
|
|
146
|
+
message: "depends on wall-clock time",
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
score: 0,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
});
|
|
155
|
+
//# sourceMappingURL=tests-deterministic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests-deterministic.js","sourceRoot":"","sources":["../../src/probes/tests-deterministic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,SAAS,GAAG,mDAAmD,CAAC;AACtE,MAAM,WAAW,GAAG,mDAAmD,CAAC;AACxE,MAAM,SAAS,GAAG,iFAAiF,CAAC;AAEpG,MAAM,cAAc,GAA+D;IACjF;QACE,OAAO,EAAE,mCAAmC;QAC5C,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,6BAA6B;KACvC;IACD;QACE,OAAO,EAAE,mCAAmC;QAC5C,QAAQ,EAAE,MAAM;QAChB,OAAO,EAAE,2CAA2C;KACrD;IACD;QACE,OAAO,EAAE,yEAAyE;QAClF,QAAQ,EAAE,MAAM;QA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MAAM,EAAE;gBACN,OAAO,EAAE;oBACP,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE;wBACL;4BACE,QAAQ,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE;4BAChE,QAAQ,EAAE,OAAO;4BACjB,OAAO,EAAE,6BAA6B;yBACvC;wBACD;4BACE,QAAQ,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE;4BAChE,QAAQ,EAAE,MAAM;4BAChB,OAAO,EAAE,qDAAqD;yBAC/D;wBACD;4BACE,QAAQ,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE;4BAChE,QAAQ,EAAE,MAAM;4BAChB,OAAO,EAAE,4BAA4B;yBACtC;qBACF;iBACF;gBACD,KAAK,EAAE,CAAC;aACT;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests-failure-actionability.d.ts","sourceRoot":"","sources":["../../src/probes/tests-failure-actionability.ts"],"names":[],"mappings":";AAqCA,wBAqHG"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { defineProbe } from "@esbenwiberg/repofit/sdk";
|
|
2
|
+
const PROBE_VERSION = "1.0.0";
|
|
3
|
+
const MAX_TEST_FILES = 6;
|
|
4
|
+
const MAX_CHARS_PER_TEST = 2_500;
|
|
5
|
+
const MAX_INPUT_CHARS = 18_000;
|
|
6
|
+
const TEST_FILE = /(?:\.test\.|\.spec\.|__tests__|^tests?\/|^e2e\/)/i;
|
|
7
|
+
const SOURCE_FILE = /\.(?:ts|tsx|js|jsx|mjs|cjs|py|cs|go|rs|java|kt)$/i;
|
|
8
|
+
const SKIP_DIRS = /(?:^|\/)(?:node_modules|dist|build|coverage|\.next|\.nuxt|out|target|bin|obj)\//;
|
|
9
|
+
const RUBRIC = {
|
|
10
|
+
task: "Judge whether test failures in this repository would be actionable for a coding agent trying to fix a regression.",
|
|
11
|
+
criteria: [
|
|
12
|
+
{
|
|
13
|
+
id: "scenario-names",
|
|
14
|
+
description: "Do test names describe the condition and expected behavior clearly enough to identify the broken contract? Generic names like 'works' or 'handles input' score low.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "diagnostic-assertions",
|
|
18
|
+
description: "Do assertions expose useful expected/actual values, error messages, snapshots with narrow scope, or custom messages? Bare booleans and opaque helper failures score low.",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "localized-failures",
|
|
22
|
+
description: "Would a failing test point to a small behavior or subsystem, rather than a giant end-to-end path with many possible causes?",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "reproducible-setup",
|
|
26
|
+
description: "Is each test's setup explicit enough that an agent can reproduce and reason about the failure without hidden global state or undocumented fixtures?",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
export default defineProbe({
|
|
31
|
+
id: "tests.failure-actionability",
|
|
32
|
+
version: PROBE_VERSION,
|
|
33
|
+
dimensions: [{ id: "feedback", weight: 1 }],
|
|
34
|
+
tier: "reasoned",
|
|
35
|
+
evidence: ["files", "size_stats", "judge"],
|
|
36
|
+
rationale: `
|
|
37
|
+
Tests are only useful feedback when failures explain the broken fact.
|
|
38
|
+
Agents struggle with generic test names, opaque helpers, bare boolean
|
|
39
|
+
assertions, and giant flows where many things could be wrong. This probe
|
|
40
|
+
samples tests and judges whether failures would be diagnostic.
|
|
41
|
+
`,
|
|
42
|
+
remediation: "Name tests after the scenario and expected behavior, assert concrete expected/actual values, keep failures localized, and make setup explicit. Prefer `throws /message/`, table cases with named cases, and narrow snapshots over giant opaque failures.",
|
|
43
|
+
async detect(ev) {
|
|
44
|
+
const testPaths = ev.size_stats.files
|
|
45
|
+
.map((f) => f.path)
|
|
46
|
+
.filter((p) => SOURCE_FILE.test(p) && TEST_FILE.test(p) && !SKIP_DIRS.test(`/${p}`))
|
|
47
|
+
.sort();
|
|
48
|
+
if (testPaths.length === 0) {
|
|
49
|
+
return { kind: "na", reason: "no test files detected" };
|
|
50
|
+
}
|
|
51
|
+
const sampled = [];
|
|
52
|
+
let totalChars = 0;
|
|
53
|
+
for (const p of testPaths) {
|
|
54
|
+
if (sampled.length >= MAX_TEST_FILES)
|
|
55
|
+
break;
|
|
56
|
+
const text = await ev.files.readText(p);
|
|
57
|
+
if (!text)
|
|
58
|
+
continue;
|
|
59
|
+
const slice = text.slice(0, MAX_CHARS_PER_TEST);
|
|
60
|
+
sampled.push({ path: p, text: slice });
|
|
61
|
+
totalChars += slice.length;
|
|
62
|
+
if (totalChars >= MAX_INPUT_CHARS)
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
if (sampled.length === 0) {
|
|
66
|
+
return { kind: "na", reason: "test files declared but unreadable" };
|
|
67
|
+
}
|
|
68
|
+
const input = sampled.map((s) => `# ${s.path}\n\n${s.text}`).join("\n\n---\n\n");
|
|
69
|
+
const result = await ev.judge.score({
|
|
70
|
+
probeId: "tests.failure-actionability",
|
|
71
|
+
probeVersion: PROBE_VERSION,
|
|
72
|
+
input,
|
|
73
|
+
rubric: RUBRIC,
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
kind: "judge",
|
|
77
|
+
score: result.score,
|
|
78
|
+
perCriterion: result.perCriterion,
|
|
79
|
+
rationale: result.rationale,
|
|
80
|
+
model: result.model,
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
score: { kind: "judge" },
|
|
84
|
+
fixtures: [
|
|
85
|
+
{
|
|
86
|
+
name: "no-tests",
|
|
87
|
+
evidence: {
|
|
88
|
+
size_stats: {
|
|
89
|
+
source: "git-ls-files",
|
|
90
|
+
totalBytes: 100,
|
|
91
|
+
totalFiles: 1,
|
|
92
|
+
files: [{ path: "src/index.ts", bytes: 100, lines: 8, depth: 1 }],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
expect: { reading: { kind: "na", reason: "no test files detected" }, score: null },
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "actionable-failures",
|
|
99
|
+
evidence: {
|
|
100
|
+
files: {
|
|
101
|
+
"src/cache.test.ts": 'test("expired cache entry returns a miss with stale reason", () => {\n const cache = cacheWith({ key: "a", expiresAt: 0 });\n expect(cache.get("a")).toEqual({ hit: false, reason: "expired" });\n});\n',
|
|
102
|
+
},
|
|
103
|
+
size_stats: {
|
|
104
|
+
source: "git-ls-files",
|
|
105
|
+
totalBytes: 220,
|
|
106
|
+
totalFiles: 1,
|
|
107
|
+
files: [{ path: "src/cache.test.ts", bytes: 220, lines: 5, depth: 1 }],
|
|
108
|
+
},
|
|
109
|
+
judge: {
|
|
110
|
+
score: 80,
|
|
111
|
+
perCriterion: {
|
|
112
|
+
"scenario-names": 80,
|
|
113
|
+
"diagnostic-assertions": 80,
|
|
114
|
+
"localized-failures": 80,
|
|
115
|
+
"reproducible-setup": 80,
|
|
116
|
+
},
|
|
117
|
+
rationale: "The test name, setup, and expected value identify the broken contract.",
|
|
118
|
+
model: "fixture",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
expect: {
|
|
122
|
+
reading: {
|
|
123
|
+
kind: "judge",
|
|
124
|
+
score: 80,
|
|
125
|
+
perCriterion: {
|
|
126
|
+
"scenario-names": 80,
|
|
127
|
+
"diagnostic-assertions": 80,
|
|
128
|
+
"localized-failures": 80,
|
|
129
|
+
"reproducible-setup": 80,
|
|
130
|
+
},
|
|
131
|
+
rationale: "The test name, setup, and expected value identify the broken contract.",
|
|
132
|
+
model: "fixture",
|
|
133
|
+
},
|
|
134
|
+
score: 80,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
});
|
|
139
|
+
//# sourceMappingURL=tests-failure-actionability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests-failure-actionability.js","sourceRoot":"","sources":["../../src/probes/tests-failure-actionability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,aAAa,GAAG,OAAO,CAAC;AAC9B,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,eAAe,GAAG,MAAM,CAAC;AAE/B,MAAM,SAAS,GAAG,mDAAmD,CAAC;AACtE,MAAM,WAAW,GAAG,mDAAmD,CAAC;AACxE,MAAM,SAAS,GAAG,iFAAiF,CAAC;AAEpG,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,mHAAmH;IACzH,QAAQ,EAAE;QACR;YACE,EAAE,EAAE,gBAAgB;YACpB,WAAW,EACT,qKAAqK;SACxK;QACD;YACE,EAAE,EAAE,uBAAuB;YAC3B,WAAW,EACT,0KAA0K;SAC7K;QACD;YACE,EAAE,EAAE,oBAAoB;YACxB,WAAW,EACT,6HAA6H;SAChI;QACD;YACE,EAAE,EAAE,oBAAoB;YACxB,WAAW,EACT,qJAAqJ;SACxJ;KACF;CACO,CAAC;AAEX,eAAe,WAAW,CAAC;IACzB,EAAE,EAAE,6BAA6B;IACjC,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAC3C,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC;IAE1C,SAAS,EAAE;;;;;GAKV;IAED,WAAW,EACT,0PAA0P;IAE5P,KAAK,CAAC,MAAM,CAAC,EAAE;QACb,MAAM,SAAS,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK;aAClC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aAClB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CA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AAgB,EAAE,EAAE;wBACpB,uBAAuB,EAAE,EAAE;wBAC3B,oBAAoB,EAAE,EAAE;wBACxB,oBAAoB,EAAE,EAAE;qBACzB;oBACD,SAAS,EAAE,wEAAwE;oBACnF,KAAK,EAAE,SAAS;iBACjB;aACF;YACD,MAAM,EAAE;gBACN,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE;oBACT,YAAY,EAAE;wBACZ,gBAAgB,EAAE,EAAE;wBACpB,uBAAuB,EAAE,EAAE;wBAC3B,oBAAoB,EAAE,EAAE;wBACxB,oBAAoB,EAAE,EAAE;qBACzB;oBACD,SAAS,EAAE,wEAAwE;oBACnF,KAAK,EAAE,SAAS;iBACjB;gBACD,KAAK,EAAE,EAAE;aACV;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests-oracle-quality.d.ts","sourceRoot":"","sources":["../../src/probes/tests-oracle-quality.ts"],"names":[],"mappings":";AAqCA,wBAsHG"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { defineProbe } from "@esbenwiberg/repofit/sdk";
|
|
2
|
+
const PROBE_VERSION = "1.0.0";
|
|
3
|
+
const MAX_TEST_FILES = 6;
|
|
4
|
+
const MAX_CHARS_PER_TEST = 2_500;
|
|
5
|
+
const MAX_INPUT_CHARS = 18_000;
|
|
6
|
+
const TEST_FILE = /(?:\.test\.|\.spec\.|__tests__|^tests?\/|^e2e\/)/i;
|
|
7
|
+
const SOURCE_FILE = /\.(?:ts|tsx|js|jsx|mjs|cjs|py|cs|go|rs|java|kt)$/i;
|
|
8
|
+
const SKIP_DIRS = /(?:^|\/)(?:node_modules|dist|build|coverage|\.next|\.nuxt|out|target|bin|obj)\//;
|
|
9
|
+
const RUBRIC = {
|
|
10
|
+
task: "Judge whether this repository's tests act as useful oracles for a coding agent, rather than merely pleasing reviewers with superficial coverage.",
|
|
11
|
+
criteria: [
|
|
12
|
+
{
|
|
13
|
+
id: "behavioral-assertions",
|
|
14
|
+
description: "Do tests assert externally meaningful behavior, outputs, state changes, errors, or contracts? Tests with no assertions, trivial truthiness, or assertions that only mirror implementation details score low.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "negative-and-edge-cases",
|
|
18
|
+
description: "Do tests include failure paths, edge cases, invalid inputs, permissions, empty states, or regression scenarios? Happy-path-only tests score lower.",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "mock-discipline",
|
|
22
|
+
description: "Are mocks/stubs used to isolate boundaries while preserving the behavior under test? Tests that mock the unit itself, assert only that mocks were called, or overfit to implementation score low.",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "review-resistance",
|
|
26
|
+
description: "Would these tests reject a plausible but wrong agent patch, or could an agent satisfy them with a shallow implementation? Tests that encode real facts and invariants score high.",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
export default defineProbe({
|
|
31
|
+
id: "tests.oracle-quality",
|
|
32
|
+
version: PROBE_VERSION,
|
|
33
|
+
dimensions: [{ id: "feedback", weight: 1 }],
|
|
34
|
+
tier: "reasoned",
|
|
35
|
+
evidence: ["files", "size_stats", "judge"],
|
|
36
|
+
rationale: `
|
|
37
|
+
A passing test suite is only useful when the tests can reject wrong
|
|
38
|
+
behavior. Agents often add "pleasing" tests: smoke checks, snapshots,
|
|
39
|
+
mock-call assertions, or tests that merely document the implementation
|
|
40
|
+
they just wrote. This probe samples test files and asks whether they are
|
|
41
|
+
real behavioral oracles.
|
|
42
|
+
`,
|
|
43
|
+
remediation: "Strengthen tests around behavior and contracts: assert outputs and state, cover edge/failure cases, keep mocks at boundaries, and add regression tests that would fail for the bug or requirement being addressed. Avoid assertion-free smoke tests, pure snapshot tests, and tests that only assert mock calls.",
|
|
44
|
+
async detect(ev) {
|
|
45
|
+
const testPaths = ev.size_stats.files
|
|
46
|
+
.map((f) => f.path)
|
|
47
|
+
.filter((p) => SOURCE_FILE.test(p) && TEST_FILE.test(p) && !SKIP_DIRS.test(`/${p}`))
|
|
48
|
+
.sort();
|
|
49
|
+
if (testPaths.length === 0) {
|
|
50
|
+
return { kind: "na", reason: "no test files detected" };
|
|
51
|
+
}
|
|
52
|
+
const sampled = [];
|
|
53
|
+
let totalChars = 0;
|
|
54
|
+
for (const p of testPaths) {
|
|
55
|
+
if (sampled.length >= MAX_TEST_FILES)
|
|
56
|
+
break;
|
|
57
|
+
const text = await ev.files.readText(p);
|
|
58
|
+
if (!text)
|
|
59
|
+
continue;
|
|
60
|
+
const slice = text.slice(0, MAX_CHARS_PER_TEST);
|
|
61
|
+
sampled.push({ path: p, text: slice });
|
|
62
|
+
totalChars += slice.length;
|
|
63
|
+
if (totalChars >= MAX_INPUT_CHARS)
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
if (sampled.length === 0) {
|
|
67
|
+
return { kind: "na", reason: "test files declared but unreadable" };
|
|
68
|
+
}
|
|
69
|
+
const input = sampled.map((s) => `# ${s.path}\n\n${s.text}`).join("\n\n---\n\n");
|
|
70
|
+
const result = await ev.judge.score({
|
|
71
|
+
probeId: "tests.oracle-quality",
|
|
72
|
+
probeVersion: PROBE_VERSION,
|
|
73
|
+
input,
|
|
74
|
+
rubric: RUBRIC,
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
kind: "judge",
|
|
78
|
+
score: result.score,
|
|
79
|
+
perCriterion: result.perCriterion,
|
|
80
|
+
rationale: result.rationale,
|
|
81
|
+
model: result.model,
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
score: { kind: "judge" },
|
|
85
|
+
fixtures: [
|
|
86
|
+
{
|
|
87
|
+
name: "no-tests",
|
|
88
|
+
evidence: {
|
|
89
|
+
size_stats: {
|
|
90
|
+
source: "git-ls-files",
|
|
91
|
+
totalBytes: 100,
|
|
92
|
+
totalFiles: 1,
|
|
93
|
+
files: [{ path: "src/index.ts", bytes: 100, lines: 8, depth: 1 }],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
expect: { reading: { kind: "na", reason: "no test files detected" }, score: null },
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "strong-oracles",
|
|
100
|
+
evidence: {
|
|
101
|
+
files: {
|
|
102
|
+
"src/parse.test.ts": 'import { parsePort } from "./parse";\n\ntest("rejects out of range ports", () => {\n expect(() => parsePort("70000")).toThrow(/port/i);\n});\n\ntest("accepts valid port", () => {\n expect(parsePort("5432")).toBe(5432);\n});\n',
|
|
103
|
+
},
|
|
104
|
+
size_stats: {
|
|
105
|
+
source: "git-ls-files",
|
|
106
|
+
totalBytes: 240,
|
|
107
|
+
totalFiles: 1,
|
|
108
|
+
files: [{ path: "src/parse.test.ts", bytes: 240, lines: 9, depth: 1 }],
|
|
109
|
+
},
|
|
110
|
+
judge: {
|
|
111
|
+
score: 80,
|
|
112
|
+
perCriterion: {
|
|
113
|
+
"behavioral-assertions": 80,
|
|
114
|
+
"negative-and-edge-cases": 80,
|
|
115
|
+
"mock-discipline": 80,
|
|
116
|
+
"review-resistance": 80,
|
|
117
|
+
},
|
|
118
|
+
rationale: "Tests assert behavior and failure cases without over-mocking.",
|
|
119
|
+
model: "fixture",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
expect: {
|
|
123
|
+
reading: {
|
|
124
|
+
kind: "judge",
|
|
125
|
+
score: 80,
|
|
126
|
+
perCriterion: {
|
|
127
|
+
"behavioral-assertions": 80,
|
|
128
|
+
"negative-and-edge-cases": 80,
|
|
129
|
+
"mock-discipline": 80,
|
|
130
|
+
"review-resistance": 80,
|
|
131
|
+
},
|
|
132
|
+
rationale: "Tests assert behavior and failure cases without over-mocking.",
|
|
133
|
+
model: "fixture",
|
|
134
|
+
},
|
|
135
|
+
score: 80,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
});
|
|
140
|
+
//# sourceMappingURL=tests-oracle-quality.js.map
|
|
@@ -0,0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EAAE;oBACT,YAAY,EAAE;wBACZ,uBAAuB,EAAE,EAAE;wBAC3B,yBAAyB,EAAE,EAAE;wBAC7B,iBAAiB,EAAE,EAAE;wBACrB,mBAAmB,EAAE,EAAE;qBACxB;oBACD,SAAS,EAAE,+DAA+D;oBAC1E,KAAK,EAAE,SAAS;iBACjB;aACF;YACD,MAAM,EAAE;gBACN,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE;oBACT,YAAY,EAAE;wBACZ,uBAAuB,EAAE,EAAE;wBAC3B,yBAAyB,EAAE,EAAE;wBAC7B,iBAAiB,EAAE,EAAE;wBACrB,mBAAmB,EAAE,EAAE;qBACxB;oBACD,SAAS,EAAE,+DAA+D;oBAC1E,KAAK,EAAE,SAAS;iBACjB;gBACD,KAAK,EAAE,EAAE;aACV;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-escape-hatches.d.ts","sourceRoot":"","sources":["../../src/probes/types-escape-hatches.ts"],"names":[],"mappings":";AA8DA,wBAiJG"}
|