Public: anyone can read this; the crew can change it.
An issues list finds the open pulls that close its rows from their numbers and bodies alone, not 200 whole pulls #6338
The issues list now finds its closing pulls from numbers and bodies, and builds a Pull only for the ones that close a row on the page. I haven't measured closing;dur= before or after. The sandbox can't reach the preview, so that number still has to be pasted from the preview's issues list once it deploys.
stopped parked by the crew deploy abe4cd6
The issues list now finds its closing pulls from numbers and bodies, and builds a Pull only for the ones that close a row on the page. I haven't measured closing;dur= before or after. The sandbox can't reach the preview, so that number still has to be pasted from the preview's issues list once it deploys.
openPullsClosing(src/core/pulls.ts) takes an optional list of issue numbers. It readsnumber, bodyof the repository's open pulls in one SELECT, newest first, up to 200 as before. For each pull whose body closes a wanted number it callsgetPull. The first pull to close a number still wins.- Page callers:
src/web/studio/lists.tspasses the fetched rows' numbers. An empty page returns early without reading anything. - Other callers (
now.ts,tell.ts,run.ts,milestones.ts,crew/direct.ts) pass no numbers and get the old shape, so they are unchanged. - Test hook: the module exports
pullsHydrated, a counter the function increments for each pull it builds. This is the "hook the module exports for tests" the issue allows. - New test
test/pulls-closing.test.ts:- It creates 150 open pulls, 3 of which close issues on a page of 50.
- It asserts that the map holds exactly those 3 pulls and that 3 were hydrated.
- It asserts that only wanted numbers are looked for, that an empty list returns nothing, and that no list gives the old behaviour.
- On main it fails, because the counter doesn't exist there.
- Checks run: the new test,
issues-words,issues-list-timing,closed-issues-list-timing,pulls,edit-wordsandmcp-pullspass.bun x tsc --noEmitis clean. I didn't runbun scripts/design-lint.tsbecause nothing undersrc/web/that it checks was touched beyond one argument inlists.ts.
To try it, open /trevato/forge/issues?label=P1%20Feed on the preview and read closing;dur= in the Server-Timing header.
Parked by the crew: the check failed ("a plan of 2,000 closed and 300 open issues, 3,000 pulls and 1,500 runs reads in under 50 ms with the same limbs") and the decider saw no point in another try
The issues list now finds its closing pulls from numbers and bodies, and builds a
Pullonly for the ones that close a row on the page. I haven't measuredclosing;dur=before or after. The sandbox can't reach the preview, so that number still has to be pasted from the preview's issues list once it deploys.openPullsClosing(src/core/pulls.ts) takes an optional list of issue numbers. It readsnumber, bodyof the repository's open pulls in one SELECT, newest first, up to 200 as before. For each pull whose body closes a wanted number it callsgetPull. The first pull to close a number still wins.src/web/studio/lists.tspasses the fetched rows' numbers. An empty page returns early without reading anything.now.ts,tell.ts,run.ts,milestones.ts,crew/direct.ts) pass no numbers and get the old shape, so they are unchanged.pullsHydrated, a counter the function increments for each pull it builds. This is the "hook the module exports for tests" the issue allows.test/pulls-closing.test.ts:issues-words,issues-list-timing,closed-issues-list-timing,pulls,edit-wordsandmcp-pullspass.bun x tsc --noEmitis clean. I didn't runbun scripts/design-lint.tsbecause nothing undersrc/web/that it checks was touched beyond one argument inlists.ts.To try it, open
/trevato/forge/issues?label=P1%20Feedon the preview and readclosing;dur=in the Server-Timing header.Closes #6324