Skip to content

#458: render both between bounds#489

Open
akmhatey-ai wants to merge 1 commit into
zerocracy:masterfrom
akmhatey-ai:codex/award-between-text-458
Open

#458: render both between bounds#489
akmhatey-ai wants to merge 1 commit into
zerocracy:masterfrom
akmhatey-ai:codex/award-between-text-458

Conversation

@akmhatey-ai

Copy link
Copy Markdown
Contributor

Fixes #458.

The bylaw printer for between treated the clamped value as the lower bound and omitted the upper bound. This changes the rendering to describe the value and both bounds: _b_ clamped between **3** and **120**.

Currentness and duplicate checks:

Validation:

  • New regression failed before the patch with markdown saying set _b_ to at least _b_ and at most **3**.
  • ruby -e "gem 'minitest', '6.0.6'; gem 'minitest-mock', '5.27.0'; load 'test/fbe/test_award.rb'" passed: 8 tests, 43 assertions.
  • rubocop lib/fbe/award.rb test/fbe/test_award.rb passed with no offenses.
  • ruby -c lib/fbe/award.rb; ruby -c test/fbe/test_award.rb passed.
  • git diff --check and git diff --cached --check passed.
  • git diff --cached | gitleaks stdin --no-banner --redact reported no leaks.

Limitations:

  • bundle exec rake test TEST=test/fbe/test_award.rb is locally blocked on this Windows checkout because Bundler cannot find locked gems rdoc-7.2.0, psych-5.3.1, and parallel-2.0.1, and the environment also lacks grep on PATH. The focused direct Ruby test above was run instead.

@GHX5T-SOL GHX5T-SOL left a comment

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.

Reviewed the two-file diff against #458. The between bylaw text now names the value and both bounds, matching the operand order used by BTerm#calc, and the regression covers the rendered bylaw string.

Validation I ran on bbfd7aaf3b525167f9853fa42ee104863954509b:

  • env BUNDLE_PATH=/private/tmp/bundle-fbe-488 mise x ruby@3.3.11 -- bundle exec ruby -Itest test/fbe/test_award.rb -- --no-cov -> 8 tests, 43 assertions, 0 failures, 0 errors.
  • env BUNDLE_PATH=/private/tmp/bundle-fbe-488 mise x ruby@3.3.11 -- bundle exec rake test -> 284 tests, 804 assertions, 0 failures, 0 errors, 9 skips.
  • env BUNDLE_PATH=/private/tmp/bundle-fbe-488 mise x ruby@3.3.11 -- bundle exec rubocop lib/fbe/award.rb test/fbe/test_award.rb --format simple -> 2 files inspected, no offenses detected.
  • env BUNDLE_PATH=/private/tmp/bundle-fbe-488 mise x ruby@3.3.11 -- ruby -c lib/fbe/award.rb and ... -- ruby -c test/fbe/test_award.rb -> Syntax OK.
  • git diff --check origin/master...HEAD -> passed.
  • git diff origin/master...HEAD | gitleaks stdin --no-banner --redact --exit-code 1 -> no leaks found.

No changes requested.

@0crat

0crat commented May 26, 2026

Copy link
Copy Markdown

@GHX5T-SOL Thanks for the review! You've earned +6 points for this contribution: +18 as a basis, -8 for absolutely no comments posted, and -4 for fewer than 24 hits-of-code (7 total). Your running score is +134; don't forget to check your Zerocracy account too.

@yegor256

Copy link
Copy Markdown
Member

@akmhatey-ai merge conflicts here

@yegor256

Copy link
Copy Markdown
Member

Please fix the merge conflicts so this pull request can be merged.

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.

Fbe::Award::PTerm#to_s for :between drops the upper bound and mislabels the value as a bound

4 participants