Repository navigation
perf(boot): defer schema and isogit construction until first use - #1537
TheGreatAxios merged 7 commits into
Conversation
|
Triage: Fail @TheGreatAxios, please address the following:
|
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Request changes
Schemas and the isogit store wait until first use. A bad settings file still fails at the read. vendor/ is untouched. exec and onboarding never close the boot spans, and a few comments restate the ticket.
Findings
-
src/index.ts:40—bootandfirst-paintstart here and only end inmountRunnerHost.execand onboarding never mount that host, thenflushPerfToOtelexports the open spans with no end time. Close them before that flush on every path that does not mount the TUI. -
src/session/isogit-node.ts:10—isogitNodeLoadStartedhas no callers. Delete it. -
src/schema/lazy.ts:1,src/perf/boot-spans.ts:3,src/session/isogit-node.ts:1— these comments restate the ticket. The note thatlazyCallablemust not be passed intotype()should stay. -
src/config/settings-lazy.test.ts:16— the test pins/Invalid settings schema/. Assert that a bad settings file fails at read, not the sentence.
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Comment
The prior findings are gone. exec closes the boot spans before the perf flush, the dead export and ticket comments are gone, and the settings test no longer pins the error sentence. The deferral still holds.
Findings
No code findings on 2420b766. CI is red: oxfmt wants src/config/settings.ts formatted, and src/session/isogit-boot.test.ts leaves a throw installed (session open reached isogit) that fails later tests in the same process. Restore the real module with withMockedModule.
ac2700f to
5415ac5
Compare
5415ac5 to
29d99f8
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Approve
Schemas and the isogit store wait until first use. exec closes the boot spans before the perf flush. The dead export, ticket comments, and pinned error sentence are gone. oxlint, oxfmt, dead exports, and the test shards passed on 37078219.
Findings
No findings.
Summary
vendor/is unchanged.bootandfirst-paintspans start at boot and end when the TUI host mounts, so that interval can be told apart from import-time work.Test plan
bun test src/config/settings-lazy.test.ts src/session/isogit-boot.test.ts src/perf/boot-spans.test.ts src/config/settings.test.ts src/agent/tasks.test.ts src/plugins/data-only-agent.test.ts(80 pass)tsc --noEmitvia the pre-commit hook