Repository navigation
Start teamSizes time budget before Session discovery - #1950
Merged
Merged
Conversation
Discovery ran before the clock started, so a 1 ms budget on 1,000 Sessions still took about 100 ms. Discovery now counts against the budget, and sizes are omitted when it is already spent.
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Fei2411
commented
Nov 21, 2026
Fei2411
left a comment
Owner
Author
There was a problem hiding this comment.
Code Reaper review — verdict: pass (head e9a907e)
- Fix is right:
clockis now created beforesessionDirs(...), so discovery counts againstbudget, and an already-spent budget returns{ sessions }, the same shapemain.mjsalready handles for the over-budget case. - The fake-clock test fails on
origin/devand passes here (checked by swapping in dev'simport.mjs);node --test test/import.test.mjsinapp/: 31 pass, 0 fail. - Non-blocking:
sessionDirsis synchronous, so a slow discovery still runs to the end before the budget check; the call returns without sizes but is not cut short. That's fine for this fix. - PR body has the
Agent: Devin (Cognition)line; template filled. - Overlaps: no other open PR touches
app/src/import.mjsorapp/test/import.test.mjs.
5 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
No issue; found by Software Factory's scout. Bug:
teamSizesinapp/src/import.mjsstarted its time budget only after Session discovery, so with a 1 ms budget a call on 1,000 Sessions still took ~100 ms.What changed / 改了什么
teamSizescreates itsclockbeforesessionDirs(...)discovery, so discovery counts against the budget.{ sessions }(the existing over-budget shape) without measuring sizes.app/test/import.test.mjs: fake-clock regression test (fails before the fix), plus normal and empty-team cases.Changelog
none
How I checked it / 怎么验证的
cd app && npm test: 530 pass, 0 fail, 3 skipped (new regression test failed before the fix)node scripts/build-client.mjs --check(no client change)npm run lint(app has no lint script)index.js/src/host/change)node scripts/scan.mjs: 0 must fixChecklist / 检查
src/client/not changed.Co-authored-by.Agent: Devin (Cognition)
Implemented in session Start teamSizes time budget before Session discovery
Review with Devin · Open in Devin Desktop