Skip to content

fix: built-in ArgumentError in tokenizer - #107

Merged
isaacvando merged 1 commit into
mainfrom
fix/tokenizer-error-and-ddl-note
Jun 15, 2026
Merged

fix: built-in ArgumentError in tokenizer#107
isaacvando merged 1 commit into
mainfrom
fix/tokenizer-error-and-ddl-note

Conversation

@philippemnoel

@philippemnoel philippemnoel commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

Bug — NameError instead of the intended argument error (lib/parade_db/tokenizer.rb:92)

Tokenizer#render_positional_arg raised InvalidArgumentError for unsupported arg types:

raise InvalidArgumentError, "Unsupported tokenizer arg type: #{value.class}"

InvalidArgumentError is not defined anywhere in the gem (verified via grep -rn "InvalidArgumentError" — the only hit was this line). At runtime Ruby would raise NameError: uninitialized constant ... instead of a meaningful argument error, masking the real problem.

Fix: use Ruby's built-in ArgumentError. This matches how the rest of migration_helpers.rb already raises ArgumentError for bad tokenizer args.

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.34%. Comparing base (d14ecc4) to head (74de739).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/parade_db/tokenizer.rb 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #107   +/-   ##
=======================================
  Coverage   90.34%   90.34%           
=======================================
  Files          20       20           
  Lines        2404     2404           
  Branches      710      710           
=======================================
  Hits         2172     2172           
  Misses        232      232           
Flag Coverage Δ
rails-paradedb 90.34% <0.00%> (ø)
rb3.2 90.63% <0.00%> (ø)
rb3.3 90.63% <0.00%> (ø)
rb3.4 90.34% <0.00%> (ø)
rb4.0 90.34% <0.00%> (ø)
rl7.2 90.34% <0.00%> (ø)
rl8.1 90.34% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
lib/parade_db/tokenizer.rb 98.03% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- tokenizer.rb: render_positional_arg raised the undefined constant
  InvalidArgumentError (no such constant is defined anywhere in the gem),
  which would itself raise NameError at runtime instead of the intended
  argument error. Use Ruby's built-in ArgumentError.
@isaacvando
isaacvando force-pushed the fix/tokenizer-error-and-ddl-note branch from 4059c42 to 74de739 Compare June 15, 2026 14:34
@isaacvando isaacvando changed the title fix: built-in ArgumentError in tokenizer + document trusted partial-index WHERE predicate fix: built-in ArgumentError in tokenizer Jun 15, 2026
@isaacvando
isaacvando merged commit 7c02cbc into main Jun 15, 2026
14 checks passed
@isaacvando
isaacvando deleted the fix/tokenizer-error-and-ddl-note branch June 15, 2026 14:35
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.

2 participants