Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:10xbuym6wf is past its budget: trevato/forge: "build yield reads event through its index, never a scan of event or a run per run" failed on 3 pulls in… #12130
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/12096-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork
1 file
changed +4
−1
test/stall-scans.test.ts +4 −1
| @@ -102,7 +102,10 @@ test("build yield reads event through its index, never a scan of event or a run | ||
| 102 | 102 | const plan = planOf(big, BUILD_YIELD_SQL, [ago(1440), ago(0), 0]); |
| 103 | 103 | expect(plan.filter((d) => /SCAN /.test(d))).toEqual([]); |
| 104 | 104 | expect(plan.some((d) => d.includes("event_repo_kind_number_at"))).toBe(true); |
| 105 | expect(plan.some((d) => /SEARCH x USING INDEX run_kind_finished/.test(d))).toBe(true); | |
| 105 | // The run side is a range search on (kind, finished_at). Which index answers it | |
| 106 | // (run_kind_finished, or a covering one that leads with the same columns) is the | |
| 107 | // planner's choice and changes as indexes are added; the shape is what matters. | |
| 108 | expect(plan.some((d) => /^SEARCH x USING (COVERING )?INDEX \w+ \(kind=\? AND finished_at>\? AND finished_at<\?\)/.test(d))).toBe(true); | |
| 106 | 109 | }); |
| 107 | 110 | |
| 108 | 111 | test("build yield on thousands of runs answers within the bound and counts them all", () => { |
new above
offline