Skip to content

Commit b7553ca

Browse files
committed
test(jelly-micro): add per-fixture recall floors
Replace the trivially-passing recall >= 0 gate with a RECALL_FLOORS map keyed by fixture name. Fixtures that already reach 100% are locked at 1.0; partially-resolved fixtures (classes, defineProperty, super, super2) are locked at their current baseline so a single lost edge fails CI. Unresolvable fixtures (0% baseline) continue to default to 0. Closes #1387.
1 parent 784951d commit b7553ca

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

tests/benchmarks/resolution/jelly-micro.test.ts

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,34 @@ function discoverTests(): string[] {
5656

5757
const tests = discoverTests();
5858

59+
/**
60+
* Per-fixture minimum recall floors based on the baseline measured on origin/main
61+
* (commit 784951d, June 2026). Fixtures not listed here default to 0 — they
62+
* produce 0% recall and can only improve, never regress below zero.
63+
*
64+
* Format: fixture-name → minimum recall fraction in [0, 1].
65+
* Exact fractions shown in comments; stored as the corresponding percentage
66+
* value so a single lost TP triggers a failure.
67+
*
68+
* Baseline summary: precision=65.3% recall=40.9% TP=47 FP=25 FN=68
69+
*/
70+
const RECALL_FLOORS: Record<string, number> = {
71+
accessors3: 1.0, // 1/1
72+
arguments: 1.0, // 1/1
73+
classes: 0.2, // 6/30
74+
defineProperty: 0.5, // 3/6
75+
fun: 1.0, // 4/4
76+
generators: 1.0, // 9/9
77+
more1: 1.0, // 10/10
78+
'receiver-callee-mixup': 1.0, // 1/1
79+
rest: 1.0, // 1/1
80+
spread: 1.0, // 4/4
81+
super: 0.38, // 5/13
82+
super2: 0.4, // 2/5
83+
super3: 1.0, // 3/3
84+
this: 1.0, // 1/1
85+
};
86+
5987
// Per-test results collected for summary
6088
const allResults: Record<
6189
string,
@@ -194,8 +222,8 @@ describe.skipIf(tests.length === 0)('Jelly Micro-Test Benchmark', () => {
194222
for (const e of fn) console.log(` FN: ${e}`);
195223
}
196224

197-
// Soft gate: recall must be ≥ 0% (we don't gate yet — this benchmark is diagnostic)
198-
expect(recall).toBeGreaterThanOrEqual(0);
225+
const floor = RECALL_FLOORS[testName] ?? 0;
226+
expect(recall).toBeGreaterThanOrEqual(floor);
199227
});
200228
});
201229
}

0 commit comments

Comments
 (0)