Conversation
|
Real-user verification evidence The original RED was reproduced retrospectively because the implementation and regression tests were committed together. With the final PR test file and the pre-fix library at PGQUE_TEST_DSN=postgresql:///pgque_pr_rules_audit \
ruby -I/tmp/pgque-030-audit/clients/ruby/lib -Iclients/ruby/test \
clients/ruby/test/test_consumer_resilience.rbResult: 5 runs, 8 assertions, 5 failures. The failures covered backlog draining, initial connection recovery, receive retry, backend termination, and stop-aware reconnect waiting. Head verification: PGQUE_TEST_DSN=postgresql:///pgque_pr_rules_audit ruby -S rake test
gem build pgque.gemspec --output /tmp/pgque-318-0.3.0.rc.1.gem
gem install /tmp/pgque-318-0.3.0.rc.1.gem --install-dir "$(mktemp -d)" --no-documentResult after the follow-up poll-result coverage: 83 runs, 218 assertions, 0 failures, 0 errors, 0 skips. The two explicit |
NikolayS
left a comment
There was a problem hiding this comment.
REV rubric review
Automated ultrareview quota was unavailable, so I executed the five official
REV rubric prompts manually. SOC2 findings were omitted as instructed. This is
a comment-only review, not an approval.
Blocking findings
None. I found no unresolved functional, security, documentation, or test
blocker on head 38d9af41503cd9cd9cf77dd1baf13889448d451c.
Rubric results
- Bug hunter: backlog draining, reconnect/re-LISTEN, failed-session cleanup,
stop-aware retry, and unfinished-batch backoff are internally consistent. - Security reviewer: no credential exposure, injection path, privilege change,
or unsafe error recovery was introduced. - Docs reviewer: the README accurately explains notification loss, immediate
backlog polling, retry visibility, and permanent-error behavior. - Guidelines checker: the diff is surgical and current CI is green. One
immutable historical constraint remains:test(ruby): cover poll result contractuses a commit type not allowed by currentCLAUDE.md. Per policy,
do not amend or force-push it. - Test analyzer: the database-backed resilience suite covers initial connect,
transient receive, backend termination, prompt stop, backlog draining, and
the poll return contract. The recorded base failures and head successes are
adequate RED/GREEN evidence.
Nonblocking findings
Only the immutable commit-type history noted above. No current code change is
requested by this review.
samorev Code Review Report
REVIEW FINDINGS (14)HIGH
CRITICAL
HIGH [bugs] Permanent/configuration errors now retry forever, and with the documented default logger (
HIGH [bugs]
MEDIUM [bugs] Reconnect uses a flat
MEDIUM [bugs]
MEDIUM [tests] The invariant that makes the immediate re-poll safe — "an unfinished batch (for example after a failed nack) returns false and retains the normal backoff" — is asserted only in a code comment, never in a test. The two new
MEDIUM [bugs] While the queue stays non-empty,
LOW [tests] The timing assertion in the backlog test is vacuous — it can never fail independently.
LOW [tests] The tests monkey-patch process-global state (
LOW [tests] The
LOW [tests]
LOW [tests] The reconnect test reads
LOW [guidelines] The new test file redefines
Summary
Note:
Review metadatasamorev-assisted review (AI analysis by Tanya301/samorev) |
What changed
poll_intervaldelay per batch;PG::Error/Pgque::Errorfailures;Why
The new Ruby client could not catch up efficiently after downtime because notifications for existing batches had already fired before it connected. It also exited permanently on routine connection, receive, or ack failures, contrary to the blocking Consumer contract and the behavior of the other first-party clients.
Fixes #313.
Regression coverage
The new five-test suite was run against the old implementation first and failed 5/5:
After the fix:
0.3.0.rc.1 Pgque::Consumer;ruby -candgit diff --check: clean.Tested with Ruby 3.4.8 and PostgreSQL 18.3. This PR is intentionally a draft and has not been merged.