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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:j1dz21msba is past its budget: trevato/forge: "a scorecard row per team > the page shows a team row with its pooled figures, to an admin only" failed … #7691

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/7631-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 6 commits fork

  • Merged. scout/7631-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 9429cda.

Review

Sign in to review this change.
1 file changed +6 −4
test/crew-team-scorecard.test.ts +6 −4
@@ -27,11 +27,13 @@ describe("a scorecard row per team", () => {
2727 let repoId = "";
2828 let reviewer = "";
2929 const ids: Record<string, string> = {};
30 // Opened two days before the run, so "the last 30 days" holds whatever the date.
31 const twoDaysAgo = new Date(Date.now() - 2 * 86_400_000).toISOString();
3032
3133 function pull(author: string, title: string, merged: boolean, hours = 2, openedAt?: string) {
3234 const issue = createIssue(app.db, { repoId, authorId: ids[author]!, title, kind: "pull" });
3335 if (!issue.ok) throw new Error(issue.error);
34 const opened = openedAt ?? "2026-10-01T00:00:00.000Z";
36 const opened = openedAt ?? twoDaysAgo;
3537 app.db.query(`UPDATE issue SET created_at = ?2 WHERE id = ?1`).run(issue.value.id, opened);
3638 const mergedAt = merged ? new Date(Date.parse(opened) + hours * 3_600_000).toISOString() : null;
3739 app.db
@@ -114,7 +116,7 @@ describe("a scorecard row per team", () => {
114116 expect(cards.has(three!)).toBe(false);
115117 // The members' own cards are unchanged by pooling.
116118 expect(crewScorecards(app.db).get(ids.a1!)!.reviewRounds).toBe(1);
117 // Oct 1 is inside the last 30 days; the idle team is still absent.
119 // Two days ago is inside the last 30 days; the idle team is still absent.
118120 expect(teamScorecards(app.db, recentWindow()).has(three!)).toBe(false);
119121 });
120122
@@ -137,8 +139,8 @@ describe("a scorecard row per team", () => {
137139 const cells = [...row.matchAll(/<td class="num">([\s\S]*?)<\/td>/g)].map((m) =>
138140 m[1]!.replace(/<[^>]+>/g, "").replace(/\s+/g, " ").trim(),
139141 );
140 // Landed, review rounds, red checks, then reverts.
141 expect(cells.slice(0, 4)).toEqual(["4 of 4", "0.3", "25%", "0"]);
142 // 30 days beside all time: landed, review rounds, red checks; then reverts.
143 expect(cells.slice(0, 7)).toEqual(["4 of 4", "4 of 4", "0.3", "0.3", "25%", "25%", "0"]);
142144 // A team without a card has no row, and the team rows sit under the agents.
143145 expect(table).not.toContain(`data-team="${three}"`);
144146 expect(table.indexOf("a1")).toBeLessThan(table.indexOf(`data-team="${one}"`));

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs