Repository navigation
fix(ts-sdk): reject negative stream-bound literals - #1163
Merged
xav-db merged 1 commit intoOct 5, 2026
Merged
Conversation
matthewsanetra
added a commit
that referenced
this pull request
Oct 5, 2026
Release PR for **CLI 3.4.3** and **Docker image v0.0.10**, following the same shape as #1161. ```diff crates/cli/Cargo.toml version 3.4.2 → 3.4.3 (and Cargo.lock) crates/cli/src/config.rs DEFAULT_LOCAL_IMAGE_TAG v0.0.9 → v0.0.10 CLI tests, README, CLAUDE.md v0.0.9 → v0.0.10 docs default image, release notes, storage v5 warning, llms-full.txt docker-image/README.md published release v0.0.9 → v0.0.10 CONTRIBUTORS.md CLI image v0.0.9 → v0.0.10 sdks/tests/parity/COVERAGE.md published-image parity example v0.0.5 → v0.0.10 ``` Version-history references stay as written: - "v0.0.9 and earlier refuse to open" in the docker-image README's index storage version 5 section. - "Upgrading S3 deployments from v0.0.8 and earlier". - The "Docker images through v0.0.9" locator comments in `crates/db`. - The v0.0.5 compatibility statements. The TypeScript README's `package-smoke` commands stay on v0.0.5, because they mirror CI's digest-pinned compatibility check in `typescript-sdk.yml`. The `COVERAGE.md` parity pin was bumped together with the CLI default in v0.0.5 (`620fb543`) and missed afterwards. v0.0.5 can't serve the `search_consistency` parity fixtures added in #1156. ## Order 1. Merge this. The `Docker image` workflow's publish job requires `DEFAULT_LOCAL_IMAGE_TAG` on main to equal `release_version`, so the image can only be published after this lands. 2. Dispatch the `Docker image` workflow from main with `release_version=v0.0.10`. It reruns the full suite and publishes only if it passes. 3. Once v0.0.10 is published, run `cli.yml` from main to tag and publish v3.4.3. ## What's in v0.0.10 / 3.4.3 -⚠️ **Index storage version 4 → 5** (#1156). The first writer open rewrites only the version marker. After that, v0.0.9 and earlier refuse the database with `unsupported_index_storage_version`. - Upgrade readers before the writer. - Back up first if a rollback may be needed. - The local server guide now carries this warning next to the "set `tag`" instructions. - **Asynchronous vector and text index publication** (#1156). - Writes commit the graph change plus a queued index operation, and a background worker publishes it. - `search_consistency: strong | eventual`. Strong is the default and exact. - `index_backpressure` (429, retryable) is returned in three cases: past 1 GB or 250K pending entities per index, when a whole-index strong search is behind more than 800 changes, and when strong text analysis would exceed one publication's budget. - `index_operation_batch_too_large` (400) is returned when one write stages more than 8 MiB for one index. - Text admission limits are now per document. - Builds no longer livelock under concurrent writes. - **Failing entries are held back** (#1165). - An entry whose index update fails deterministically no longer stalls its whole generation. It is counted in `blocked_index_entity_count` and retried about once a minute. - Insert searches never pick the inserting node as its own neighbour. - **Fixes the v0.0.9 `missing simhash` known issue** (#1156 C1, #1165). Re-embeds keep their HNSW reverse-link locators. Indexes damaged by earlier versions still need a drop and recreate (HEL-952). - **Range-driven counts apply every filter** (#1169). For example, 149 → 49. - **CLI 3.4.3:** defaults to v0.0.10. There are no other CLI changes since 3.4.2. - **Not in this release:** the SDK changes in #1156, #1163 and #1164 ship with the next SDK releases. The release notes say to send `search_consistency` over HTTP until then. #1166 is a docs dependency bump. ## Testing - `cargo check --workspace --locked` passes, so the hand-edited `Cargo.lock` is consistent. - `cargo test --locked -p helix-cli` passes: lib 241, `e2e_cli` 13, `runtime_commands` 20, `typescript_runtime`, and the other targets. The Docker-only `e2e_runtime` tests are ignored by design, because they need the unpublished v0.0.10 image. - rustfmt 1.9.0 (the pinned 1.97.1 toolchain) `--edition 2024 --check` is clean on the edited Rust files. - Docs: `check-docs`, `generate-llms --check`, `generate-llms-full --check` and `check-openapi` pass. - Grep: every `helixdb/helixdb:v0.0.x` reference outside release notes is v0.0.10, except the CI-pinned v0.0.5 TypeScript smoke. - Workspace clippy is left to CI. The local nix nightly clippy rejects the repo's clippy configuration before linting, independent of this change. <!-- greptile_comment --> <!-- greptile_summary --> <p><a href="https://app.greptile.com/api/retrigger?id=74957602"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><br clear="all"></p> <!-- greptile-risk --> The PR appears safe to merge, though the published-image parity instructions should include an image pull step. <h3>Summary</h3> This release PR updates the CLI default to Docker v0.0.10, bumps the CLI to 3.4.3, and updates image references and release guidance. The published-image parity instructions need a pull step before their new image pin can work without a local copy. <sub>Reviews (1) · Last reviewed commit: ["chore(release): CLI 3.4.3 and Docker ima..."](https://github.com/helixdb/helix-db/commit/281197c0c91e5f72a7ce89fb8a248e04176cdee4)</sub> <!-- /greptile_comment --> ## Also: fix main's workspace tests `counts_over_range_intersections_apply_every_filter` (#1169) overflows the default 2 MiB test-thread stack in Linux debug builds. That fails `Workspace tests`, `DB all targets` and `Workspace and tooling quality` on main, and the Docker release's `quality` job runs the same tests. `92c15755` runs it through the file's existing 16 MiB `run_high_stack_contract`, like the other heavy contracts. It passes locally even with `RUST_MIN_STACK=524288`.
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.
Problem
StreamBound.literal()accepts negative values even though stream bounds map to Rust's non-negativeusize. It can emit an invalid request AST, and sufficiently negative bigints can lose precision during conversion.Reproduction
On current
main,StreamBound.literal(-1)emits{literal:-1}andStreamBound.literal(-9007199254740993n)emits a rounded negative literal.Root cause and fix
The TypeScript literal constructor checked safe-integer overflow but not sign. Reject negative numbers and bigints before conversion; leave expression coercion and valid bounds unchanged.
Regression coverage
Covers
-1,-1n, a negative unsafe bigint, zero, the max-safe boundary, and upper overflow.Validation
npm test— passnpm run lint— passnpm run build— passnpm run checkreaches the repository-wide Prettier check, which reports 27 files; the untouchedupstream/mainversion ofdsl.tsalso fails that check.Related history: #936 was closed without merging; #1097 changed the Go and Python SDKs. Current TypeScript
mainstill reproduces the negative-literal behavior.The PR appears safe to merge.
Summary
The TypeScript SDK now rejects negative stream-bound literals before converting bigints, with regression tests for negative values and integer boundaries.
Reviews (1) · Last reviewed commit: "fix(ts-sdk): reject negative stream-boun..."