Repository navigation
fix(bindx): type-check against @contember/* 2.2.0-alpha.17 - #160
Merged
Merged
Conversation
@contember/schema 2.2.0-alpha.17 adds the `ResourceExhausted` execution error and the `Numeric` column type. `ExecutionErrorTypes` is a complete record of the execution error types, and the generator switches over every column type, so neither compiled against it: an app on that version that type-checks bindx from source failed its build. - Bump the @contember/* dependencies from 2.1.0-rc.6 to 2.2.0-alpha.17 together, so one copy of @contember/schema is installed. - Add `ResourceExhausted` to `ExecutionErrorTypes`. - Type a `Numeric` column as `string` in generated schemas, as the Contember client generator does, so an exact decimal keeps every digit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The images have to match @contember/schema, which the previous commit bumped to 2.2.0-alpha.17: the lint job checks it, and the CLI refuses to migrate a project on another version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Review round 1
Findings
Verified correct
Checks run
|
`ResourceExhausted` means the request went over the engine's memory budget, and the same request goes over it again. It fell through to `unknown`, which is retryable and carries no code. It now has its own `resource_limit` category, which is not retryable, and the `RESOURCE_EXHAUSTED` code. Two more consequences of moving to @contember/* 2.2.0-alpha.17: - The form `ColumnType` union names `Numeric`, so a `TypeHandlerMap` can give it a handler. Without one it keeps the string fallback, which keeps every digit. - `ContemberAdapterOptions.client` asks only for `execute`, as `ContentClient` already does. The `GraphQlClient` class gained a private member, so a client from another @contember/graphql-client version no longer matched the class type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Response to review round 1
Also in this round: Checks on
|
Member
Author
Review round 2
Round 1 findings
No new findings. The full diff Checks run
|
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.
Why
@contember/schema2.2.0-alpha.17 adds theResourceExhaustedexecution error and theNumericcolumn type. bindx does not compile against it:ExecutionErrorTypesis aRecord<ExecutionErrorType, …>that has to list every execution error type, so it no longer type-checks.columnToTsTypein the generator switches over every column type, soNumericreaches itsneverbranch.An app on 2.2.0-alpha.17 that type-checks bindx from source (
mainandexportspoint atsrc) fails its build on the first one.Changes
@contember/*dependencies from2.1.0-rc.6to2.2.0-alpha.17together, so a single copy of@contember/schemais installed. Bumping@contember/schemaalone left the rc.6 siblings with their own nested copies, and the generator failed to type-check.ResourceExhaustedtoExecutionErrorTypes, which also makesisExecutionErrorTypeaccept it.ResourceExhaustedin a newresource_limitcategory, which is not retryable, with the codeRESOURCE_EXHAUSTED. The request went over the engine's memory budget, and sending the same request again goes over it again.ErrorCategorygains a member, so an exhaustive switch over it has to handleresource_limit.Numericcolumn asstringin generated schemas, the same as the Contember client generator, so an exact decimal keeps every digit. The formColumnTypeunion namesNumerictoo, and without a handler it keeps the string fallback.ContemberAdapterOptions.clientasks only forexecute, asContentClientalready does. TheGraphQlClientclass gained a private member in 2.2.0-alpha.17.@contember/schema.Verification
bun run typecheck: clean.bun run lint: 0 errors. The 13 warnings are in untouched files.bun run test: 2530 pass, 0 fail.ResourceExhaustedinExecutionErrorTypesand in its classification, and the code, category and retryabilityresolveAllErrors()reports for it.columnToTsTypefor aNumericcolumn and a list of them.Numericform input keeps every digit, and aTypeHandlerMaptakes aNumerichandler.Status
changes, 1 medium and 2 low findings, all fixed ina46c69a.approveona46c69a.a46c69a.v0.1.60release.🤖 Generated with Claude Code