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

A repository's page lists its open crash groups with their issues and pulls, within the page's SQL budget #18293

opened this

Merged 6h 8m ago, live in production

The repository page now lists open crash groups from one joined query, and the owner's Now card holds one row per group that needs a decision.

Notes

opened this

The repository page now lists open crash groups from one joined query, and the owner's Now card holds one row per group that needs a decision. I did not run the dedicated duplicate-import test file (test/duplicate-import.test.ts may not exist); the gate found one fail, a duplicate import in my new test, which I fixed and re-pushed, and I did not re-run the gate afterwards.

I ran tsc, design-lint, page-budget, crash-reports, crash-groups-page, dead-code and hot-reads-indexed. crash-reports and page-budget pass untouched.

What changed

  • Query: openGroups in src/core/crash_groups.ts joins each group to its open issue, so there is no read per row. A second read of the open pulls' bodies runs only when a group is open, to find the pull whose description closes each issue.
  • Statements: a repository with no groups still costs one statement, which replaces the old groupCount. With groups it costs two however many there are, which is the old count plus one. openCrashGroups and the page card use it, and so does the terminal screen, which gets the same rows.
  • Rows: CrashRow is now OpenGroup, which carries the issue's number and title and the pull's number and title instead of full objects. I removed groupsOf because nothing called it any more.
  • Now: a group with no fix pull, seen in at least 3 builds and 10 reports (needDecision), is one row, shown to the owner only. The new test files ten reports of one group over three builds and gets one row.
  • Tests and docs: test/crash-groups-page.test.ts covers two groups with one pull, asserts the statement count, and covers the ten-reports case. docs/features/crash-reports.md has a new "Now" bullet.

What I left out

  • Now only covers the "growing across builds" case. "Behaviour-changing fix" and "a crash the builder cannot place" have no signal in the data yet, so I did not guess at them.
  • The Now row links to the issue; it has no decision buttons.
  • The crash card's look is unchanged, so the commit says No look. The terminal door is the same openGroups read, so it says No door.

To try it Send a few crash reports to /api/v1/repos/<owner>/<name>/crash-reports. Open the repository page to see the "Open crash groups" card. Open the app page to see Now.

[
  {"go": "/<owner>/<name>", "look": "Open crash groups card", "expect": "each group shows its reports, builds and either a fix pull link or 'No fix pull yet'"},
  {"go": "/<owner>/<name>/app", "look": "Now card, as the owner, after 10 reports of one group across 3 builds with no fix pull", "expect": "one row for that group, not ten"}
]

🤖 Generated with Claude Code

Closes #18127

commented

The repository page now lists open crash groups from one joined query, and the owner's Now card holds one row per group that needs a decision. I did not run the dedicated duplicate-import test file (test/duplicate-import.test.ts may not exist); the gate found one fail, a duplicate import in my new test, which I fixed and re-pushed, and I did not re-run the gate afterwards.

I ran tsc, design-lint, page-budget, crash-reports, crash-groups-page, dead-code and hot-reads-indexed. crash-reports and page-budget pass untouched.

What changed

  • Query: openGroups in src/core/crash_groups.ts joins each group to its open issue, so there is no read per row. A second read of the open pulls' bodies runs only when a group is open, to find the pull whose description closes each issue.
  • Statements: a repository with no groups still costs one statement, which replaces the old groupCount. With groups it costs two however many there are, which is the old count plus one. openCrashGroups and the page card use it, and so does the terminal screen, which gets the same rows.
  • Rows: CrashRow is now OpenGroup, which carries the issue's number and title and the pull's number and title instead of full objects. I removed groupsOf because nothing called it any more.
  • Now: a group with no fix pull, seen in at least 3 builds and 10 reports (needDecision), is one row, shown to the owner only. The new test files ten reports of one group over three builds and gets one row.
  • Tests and docs: test/crash-groups-page.test.ts covers two groups with one pull, asserts the statement count, and covers the ten-reports case. docs/features/crash-reports.md has a new "Now" bullet.

What I left out

  • Now only covers the "growing across builds" case. "Behaviour-changing fix" and "a crash the builder cannot place" have no signal in the data yet, so I did not guess at them.
  • The Now row links to the issue; it has no decision buttons.
  • The crash card's look is unchanged, so the commit says No look. The terminal door is the same openGroups read, so it says No door.

To try it Send a few crash reports to /api/v1/repos/<owner>/<name>/crash-reports. Open the repository page to see the "Open crash groups" card. Open the app page to see Now.

[
  {"go": "/<owner>/<name>", "look": "Open crash groups card", "expect": "each group shows its reports, builds and either a fix pull link or 'No fix pull yet'"},
  {"go": "/<owner>/<name>/app", "look": "Now card, as the owner, after 10 reports of one group across 3 builds with no fix pull", "expect": "one row for that group, not ten"}
]

🤖 Generated with Claude Code

commented

This round fixes all three of juniper's points and the two design notes. The tests I ran pass, along with tsc and design-lint; I did not run the full suite, which the forge's check does on push.

What changed

  • One way to find the closing pull. openGroups in src/core/crash_groups.ts now calls openPullsClosing, so the second query over open pull bodies is gone. That adds one statement for the pull rows, so the budget is now three statements however many groups there are, up from two. The test and the docs say three.
  • One read per request. groupsOf(ctx, repo) in src/web/studio/crash_card.ts reads the groups once per request and shares the rows. Both crashCard and nowCard use it, so the app page pays for the read once.
  • A test through nowCard. Ten reports of one group across three builds give the owner one Now row, with no fix pull yet. A non-owner sees none, and the shared read costs no more than a single read. The pull in the existing test is now a real pull with a git branch, because openPullsClosing only sees real pull rows.
  • Docs. docs/features/crash-reports.md now names the three cases that need the owner's decision. Only the third, a group growing across builds, is built. The first two are a behaviour-changing fix and a crash the builder cannot place, and they show no Now row.
  • Principle 8. The Now row now says "Open the issue and tell the crew what to do."
  • Commit lines. The commit carries Direction: … (#18127).

I did not add a separate review step for the new Now row, because I judged the first commit's "No look" to be about the crash card and left it as it was. I replaced "No look" with a Looks: line saying the page's look is unchanged beyond rows already shown, as the commit before it did. The Now row is new, so that call is yours.

The gate has one open note: groupsOf is 0.64 similar to focused in src/crew/dispatch.ts. They are unrelated, a per-request cache against something else, so I left it.

To try it

  • Open the app page of a repository with an open crash group. The list shows the group's reports, builds and fix pull.
  • With ten reports from three builds and no fix pull, the owner's Now card shows one row for that group.
Sign in to join this conversation.

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

Keyboard shortcuts

Docs