Repository navigation
perf(core): let parser packages read credentials without loading the server entry - #456
Merged
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What changed and why
Main CI has failed twice on 707bb68 (#455), both times in the same two bounded-subprocess tests:
packages/cameras/src/__tests__/tfl.test.ts("unclosed view parentheses finish within a bounded child process") andpackages/charging/src/__tests__/site.test.ts("malformed power whitespace completes within a bounded subprocess"). Each took about 2050 ms against its 2 s bound.The cause is #455's deduplication of the credential reader.
packages/ingest-framework/src/catalog/credentials.tsnow importsreadCredentialandstrictCredentialfrom@openconditions/core/server. Every parser package's import graph therefore loads the whole server entry, with database, crypto and migrations, and each child process those tests start pays for it.packages/corenow buildssrc/credentials.ts, which only usesnode:fs, as its own entry@openconditions/core/credentials. The ingest framework imports from there.@openconditions/core/serverstill re-exports the same functions, so services are unchanged.Verification and limits
tsxprocess takes about 250 ms, down from about 530 ms.@openconditions/core/serveralone costs about 335 ms against 79 ms for@openconditions/core.vitest runon both failing files andpackages/ingest-framework: 715 passed.pnpm typecheck,pnpm lint(including import boundaries),pnpm check:packed-packagesandpnpm check:release-informationpass.Release and upgrade impact
None.
@openconditions/coreis private, and the new subpath only narrows an import inside the workspace.