Skip to content

Make master green: exact (total), unwrapped pull request fixture and if_absent complexity - #1288

Open
Thayorns wants to merge 2 commits into
zerocracy:masterfrom
Thayorns:007-fix-master-branch
Open

Thayorns wants to merge 2 commits into
zerocracy:masterfrom
Thayorns:007-fix-master-branch

Conversation

@Thayorns

@Thayorns Thayorns commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

The rake job on master has been red since the merges of Sep 27, so every open pull request fails with it. Three things break for sure and a fourth breaks one run in four, and this fixes all of them together.

TestBylaws#test_check_all_bills expects 4 points from resolved-bug-was-rewarded at 300 hours and gets 5. Since #1018 the bill rounds once, at the end, but (total) still read the rounded Bill#points: after +8 and -12.5 it saw -5 instead of -4.5, so the floor added 9 instead of 8.5 and the sum 4.5 rounded up to 5. Now (total) reads the exact Bill#sum, the floor lands on 4, and the printed lines still add up to the total.

TestOcto#test_fake_pull_request_base_repo_matches_requested_repo got nil for the base repository of pull requests 95 and 100. FakeOctokit#pull_request took its fixture from pull_requests, which now answers wrapped Answer objects, so merging the fixture lost its base. The fixture is turned back into a hash with to_attrs first.

RuboCop reports Metrics/PerceivedComplexity for Fbe.if_absent at 17 against 15, after #1001 added the block check. The cop is disabled on that method, the way Fbe.delete and Fbe.overwrite already do it.

TestConsider#test_processes_fact_when_slot_fits_the_timeout gives the loop slightly less than 4 seconds of budget and draws the slot from 1..4, so a slot of 4 never fits and the test fails at random, as #1207 describes. The slot is now drawn from 1..3.

This overlaps with #1206, #1151, #1155 and #1153, each of which fixes one or two of these and stays red because of the rest.

Closes #1207

@Thayorns

Copy link
Copy Markdown
Contributor Author

@yegor256 this makes master green again in one go, happy to clarify anything about the three fixes.

@Thayorns

Copy link
Copy Markdown
Contributor Author

@yegor256 Once this PR is merged, master's build should go green too.
Take a look please

@Thayorns

Thayorns commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@yegor256 take a look please, this one is essential: rake on master is red right now, so every open pull request fails CI no matter what it changes. Once this is merged master turns green and the other pull requests can pass CI again.

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.

test_processes_fact_when_slot_fits_the_timeout fails when the slot is 4 in test/fbe/test_consider.rb

1 participant