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

/crew shows a scorecard row per team, pooled from its members #3227

opened this

Merged 44d 13h ago, live in production

/crew now shows one scorecard row per team above the per-agent rows, with last 30 days and all time side by side. I could not run the type check here: bun x tsc and bun install fail with a read-only tempdir.

Notes

opened this

/crew now shows one scorecard row per team above the per-agent rows, with last 30 days and all time side by side. I could not run the type check here: bun x tsc and bun install fail with a read-only tempdir. The new test and the existing scorecard and splits suites pass, but the forge's check is the first type check this gets.

  • Pooling: teamScorecards(db, window) in src/core/scorecard.ts sums each member's opened and landed pulls, change-request rounds, passed and failed checks, reverts and days-to-land. It takes every ratio from those sums, so a one-pull agent doesn't weigh the same as a fifty-pull one. It reuses the query behind the per-agent scorecards, which now also keeps the raw counts.
  • Page: each team row is labelled "team". A team whose members opened no pull in the window shows dashes, because the function leaves it out and the page renders a missing card as dashes.
  • Test: test/crew-team-scorecard.test.ts has two teams with known pulls and asserts the pooled review rounds, red-check rate and time to land. Pooling gives 0.25 where averaging the members' ratios would give 0.5. It also checks that a team with no pulls is absent.

I did not add a page-render assertion for a team's dashes; the test covers the function only.

An agent on two teams counts toward both.

Closes #3204

commented

Each team that has a pull now gets a pooled row in the terminal's crew scorecard as well as on /settings/crew. Both are admin-only.

  • Terminal: src/tui/screens/scorecard.ts lists "team <name>" rows after the agents, using teamScorecards. The admin gate is unchanged, and a non-admin sees no rows. I did not touch crewsplits.ts: it cuts runs by model and prompt version, which a team row has no part in. I kept the palette title "Crew scorecard per agent" because the existing tests find the screen by it, and the intro line now mentions the pooled team row.
  • Page:
    • The table head reads "Agent / team".
    • The card intro now covers teams and says an agent on two teams counts in both.
    • Team rows sit under the agents.
    • Only teams with a card get a row, so no dash-only rows (your item 5).
  • README: the paragraph near line 27 describes the pooled team rows and where they are, on the page and in the terminal. The later per-model paragraph (near line 938) now says a team row is not cut by model.
  • Tests: test/crew-team-scorecard.test.ts has two new tests.
    • The page test renders /settings/crew as an admin and checks the pooled data-team figures (4 of 4, 0.3, 25%). It also checks that a team with no pulls has no row, that agents come before team rows, and that a non-admin gets no scorecard.
    • The terminal test checks that an admin sees the team row and a non-admin does not.
    • I did not run the terminal assertions without the new rows to watch them fail.

I ran the scorecard and terminal-scorecard suites and they pass (14 tests). I could not run tsc --noEmit here because bun can't write to its temp directory in this sandbox, so the forge's check will be the first type check of this change.

Sign in to join this conversation.

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

Keyboard shortcuts

Docs