Skip to content

Bring Ruby into the main repo - #1463

Open
brandur wants to merge 1 commit into
masterfrom
brandur-ruby
Open

brandur wants to merge 1 commit into
masterfrom
brandur-ruby

Conversation

@brandur

@brandur brandur commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

This brings the code from our secondary Ruby Git repo into the main one:
https://github.com/riverqueue/riverqueue-ruby

I've had Codex do a pass to bring it into line with CI, testing, and
tooling conventions established by Ruby and TypeScript, then also check
that we're in maximum compliance with the conformance test suite.

The idea with this one is that after pulling Ruby in here we'll archive the
original.

@brandur
brandur force-pushed the brandur-ruby branch 2 times, most recently from 0cd7820 to a37d4df Compare October 6, 2026 21:47
This brings the code from our secondary Ruby Git repo into the main one:
https://github.com/riverqueue/riverqueue-ruby

I've had Codex do a pass to bring it into line with CI, testing, and
tooling conventions established by Ruby and TypeScript, then also check
that we're in maximum compliance with the conformance test suite.

The idea with this one is that after pulling Ruby in here we'll archive the
original.
@bgentry

bgentry commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T13:56:46.347110Z 35ca222 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread ruby/CHANGELOG.md
Comment on lines +12 to +20
- Expanded checks against Go-generated conformance fixtures to cover cron schedules, snooze counters, all shared metadata keys, and queue-control and leadership notification emission through both SQL drivers.
- Added `CRON_TZ=` / `TZ=` prefixes, `?` wildcards, and Go-style `@every` durations to `PeriodicCron`.

### Fixed

- Snoozing tolerates nonnumeric metadata counters and follows Go's JSON integer conversion instead of failing on booleans or collections.
- Periodic jobs now carry `periodic: true` and, when named, `river:periodic_job_id`, while preserving constructor options and application metadata.
- Queue pause, resume, metadata changes, and leader resignation now broadcast notifications for clients in other languages. Notifications commit and roll back with the corresponding database change.
- Cron schedules include both occurrences of repeated daylight-saving times when given a local reference time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing that these new entries are all missing PR numbers.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35ca222faa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ruby/lib/client.rb
max_attempts: insert_opts.max_attempts || args_insert_opts.max_attempts || MAX_ATTEMPTS_DEFAULT,
metadata: (args_insert_opts.metadata || {}).merge(insert_opts.metadata || {}),
priority: insert_opts.priority || args_insert_opts.priority || PRIORITY_DEFAULT,
queue: (insert_opts.queue || args_insert_opts.queue || QUEUE_DEFAULT).to_s,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate queue names before inserting jobs

When an insertion supplies a queue such as "billing queue", this line persists it because the database schema only enforces queue length. The same name is rejected by Config and queue_add via QUEUE_NAME_REGEX, so no Ruby worker can configure that queue and the successfully inserted job is stranded. Apply the configured-queue name validation to insertion queues before calling the driver.

Useful? React with 👍 / 👎.

Comment thread ruby/lib/client.rb
Comment on lines +425 to +428
if unique_opts.by_period && unique_opts.by_period != 0
lower_period_bound = truncate_time(insert_params.scheduled_at || @time_now_utc.call, unique_opts.by_period).utc

unique_key += "&period=#{lower_period_bound.strftime("%FT%TZ")}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject unique periods shorter than one second

Any nonzero by_period reaches this calculation without validation, so values such as 0.5 are accepted even though the resulting boundary is formatted only to whole seconds and distinct sub-second periods therefore generate the same uniqueness key. Negative periods are accepted as well, while the Go client explicitly rejects every nonzero period below one second in insert_opts.go. Reject these values before generating the key to preserve the advertised cross-language uniqueness semantics.

Useful? React with 👍 / 👎.

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