Skip to content

fix(test): align local Typesense image with v30+ supported range#4

Closed
erimicel wants to merge 1 commit intomasterfrom
fix-collections-truncate-len
Closed

fix(test): align local Typesense image with v30+ supported range#4
erimicel wants to merge 1 commit intomasterfrom
fix-collections-truncate-len

Conversation

@erimicel
Copy link
Copy Markdown
Member

Summary

The integration spec at spec/typesense/collections_spec.rb:156 was failing locally with:

Failure/Error: expect(result['fields']).to eq(expected_fields)
Diff:
@@ -8,7 +8,6 @@
   "stem" => false,
   "stem_dictionary" => "",
   "store" => true,
-  "truncate_len" => 100,
   "type" => "string"},

The test expects truncate_len in each field's schema response — Typesense added that field in v30.x. But docker-compose.yml was still pinned at typesense/typesense:29.0, so the field was missing from what the server actually returned.

The README compatibility table states typesense-ruby v5.0.0 supports Typesense >= v30.0:

Typesense Server typesense-ruby
>= v30.0 >= v5.0.0

So local dev had drifted away from the gem's stated supported range. This bumps to the latest stable patch (30.2).

What changed

  • docker-compose.yml: typesense/typesense:29.0typesense/typesense:30.2.
  • spec/typesense/curation_set_spec.rb and spec/typesense/curation_sets_spec.rb: 30.2 added two new fields (stem, synonyms) to the curation rule schema response. The fixtures are updated to match what the server now returns.

Verification

  • bundle exec rspec151 examples, 0 failures, 16 pending (down from 27 pending: 11 specs that were skipped on Typesense 29 are now exercised against 30.2).
  • The fix is purely test-infrastructure: no library code is changed.

🤖 Generated with Claude Code

The integration spec at `spec/typesense/collections_spec.rb:156` expects
each field in the create-collection response to include `truncate_len`,
which was added to Typesense's field schema response in v30.x. The local
`docker-compose.yml` was still pinned to `typesense/typesense:29.0`, so
the spec failed locally with the field missing from the actual response:

    Failure/Error: expect(result['fields']).to eq(expected_fields)
    Diff: -  "truncate_len" => 100,

The README compatibility table already states typesense-ruby v5.0.0
supports Typesense >= v30.0, so this just realigns local development
with the gem's stated server compatibility.

Bumping to the latest stable patch (30.2) also surfaced two new fields
on curation rule responses (`stem`, `synonyms`); the curation set test
fixtures are updated to mirror them.

After the change:
- `bundle exec rspec` reports 151 examples, 0 failures, 16 pending
  (down from 27 pending: 11 specs that were skipped against Typesense
  29 are now exercised against 30.2).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erimicel
Copy link
Copy Markdown
Member Author

Replaced by upstream typesense#56.

@erimicel erimicel closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant