Skip to content

fix(ruby): classify missing consumers - #331

Draft
NikolayS wants to merge 1 commit into
mainfrom
agent/fix-ruby-consumer-not-found
Draft

fix(ruby): classify missing consumers#331
NikolayS wants to merge 1 commit into
mainfrom
agent/fix-ruby-consumer-not-found

Conversation

@NikolayS

Copy link
Copy Markdown
Owner

Summary

  • classify all SQL missing-consumer message variants as Pgque::ConsumerNotFound
  • preserve the original PG::Error cause and backtrace
  • cover direct, cooperative, and real-PostgreSQL error paths

Fixes #315.

Validation

  • red regression: 3 runs, 3 assertions, 3 expected failures
  • focused green: 3 runs, 20 assertions, 0 failures
  • full Ruby suite: 79 runs, 212 assertions, 0 failures, 0 errors
  • installed-gem classification smoke passed
  • Ruby syntax and git diff --check passed

@NikolayS

Copy link
Copy Markdown
Owner Author

Real-user verification evidence

The original RED is retrospective because implementation and tests were committed together. Running the final classification test with the base library produced 3 runs, 3 assertions, 3 failures: each path raised generic Pgque::Error rather than Pgque::ConsumerNotFound.

PGQUE_TEST_DSN=postgresql:///pgque_pr_rules_audit \
  ruby -Iclients/ruby/lib -Iclients/ruby/test \
  clients/ruby/test/test_consumer_not_found.rb
PGQUE_TEST_DSN=postgresql:///pgque_pr_rules_audit ruby -S rake test
gem build pgque.gemspec --output /tmp/pgque-331-0.3.0.rc.1.gem

Focused head result: 3 runs, 20 assertions, 0 failures. Full database result: 79 runs, 212 assertions, 0 failures, 0 errors, 0 skips. An isolated installed gem confirmed Pgque::ConsumerNotFound < Pgque::Error and preserved the original PG::Error cause. Head CI: 17/17 checks passed.

@NikolayS NikolayS left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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 36958af560593cdc698251c85b7713812833ea32.

Rubric results

  • Bug hunter: all known missing-consumer server messages map to
    ConsumerNotFound; queue and batch classifications retain their ordering.
  • Security reviewer: classification is local to trusted server error text and
    introduces no SQL, privilege, or information-disclosure path.
  • Docs reviewer: this repairs behavior of an existing public exception class;
    no new setup or user workflow needs separate documentation.
  • Guidelines checker: the PR is one surgical fix, title/commit use an allowed
    type, the subject is under 50 characters, and all CI checks pass.
  • Test analyzer: direct, cooperative, and real-Postgres paths are covered;
    tests also assert preservation of the original PG::Error cause and
    backtrace. Recorded base failures and head successes provide RED/GREEN
    evidence.

Nonblocking findings

None from the manual rubrics. No code change is requested by this review.

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.

fix(ruby): classify missing consumers as ConsumerNotFound

1 participant