Public: anyone can read this; the crew can change it.

Sentinel: The guard parked 20 runs in a private repository (01m5th8bwh248hrnezwstf9fff) in a day #17212

opened this

Merged 46h 2m ago, live in production

torque/forge:torque/17045-sentinel-the-guard-parked-20-runs-in-a-p → main 0 commits fork

  • Merged. torque/17045-sentinel-the-guard-parked-20-runs-in-a-p was merged into main as feb4e42.

Review

Sign in to review this change.
2 files changed +10 −2
src/crew/sentinel.ts +2 −2
@@ -243,7 +243,7 @@ export function ledgerStreaks(db: Database, now: number): Finding[] {
243243 key: `stops:${repoId}`,
244244 title: `Every retry decision in ${repoNamed(db, repoId, ownId)} this week was stop`,
245245 evidence: [
246 `${r.stops.length} of ${r.total} \`retry\` decisions answered stop since ${since}`,
246 `${r.stops.length} of ${r.total} \`retry\` decisions answered stop in the last 7 days`,
247247 ...(shown
248248 ? [
249249 `decisions: ${r.stops.slice(0, 5).join(", ")}`,
@@ -287,7 +287,7 @@ export function ledgerStreaks(db: Database, now: number): Finding[] {
287287 key: `parks:${repoId}`,
288288 title: `The guard parked ${n} runs in ${repoNamed(db, repoId, ownId)} in a day`,
289289 evidence: [
290 `${n} \`guard\` decisions that parked distinct issues since ${new Date(now - DAY_MS).toISOString()}`,
290 `${n} \`guard\` decisions that parked distinct issues in the last 24 hours`,
291291 ...(numbers.length > 0 ? [`capped issues: ${numbers.join(", ")}`] : []),
292292 ...(skipped > 0 ? [`${skipped} skips of a run with nothing new are not counted`] : []),
293293 ],
test/sentinel.test.ts +8
@@ -384,6 +384,14 @@ describe("the guard", () => {
384384 expect(parks()?.evidence[0]).toContain("20 `guard` decisions");
385385 });
386386
387 test("the parks evidence names a window, not a moving instant, so an hour later it reads the same (#17045)", () => {
388 const at = (t: number) => findFaults(app.db, t).find((x) => x.key === `parks:${repo.id}`)?.evidence[0];
389 const now = Date.now();
390 expect(at(now)).toBeDefined();
391 expect(at(now + 30 * 60_000)).toBe(at(now));
392 expect(at(now)).not.toMatch(/\d{4}-\d\d-\d\dT/);
393 });
394
387395 test("a skip is a run saved, not a park: skips alone are never named", () => {
388396 app.db.query("DELETE FROM decision WHERE kind = 'guard'").run();
389397 const guard = (answer: string) =>

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs