Assert what github_graph actually returns - #676
Open
Thayorns wants to merge 3 commits into
Open
Conversation
Author
|
@yegor256 please take a look, happy to clarify anything. |
Author
|
@yegor256 fixed here, take a look please |
Member
|
This PR now has merge conflicts and needs a rebase before it can go in. Assigning to @yegor256 for a look. Generated by Claude Code |
yegor256
self-requested a review
September 3, 2026 06:21
Author
|
@yegor256 take a look please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_simple_useandtest_use_with_global_variablescalledFbe.github_graphand stopped, never looking at what came back. Both stayed green whether the factory returnedFbe::Graph::Fake, a real client, or nil, so the one place where testing mode could accidentally reach the live API had no assertion guarding it.test_simple_usenow checks the fake is returned when testing is on, and a companion test covers the other branch of the same decision, where testing is not set and a realFbe::Graphis built instead. A third checks that testing wins over agithub_tokenwhen both are given, which is the combination a judge run actually hands over.Three more cover the memoization the factory does through
global[:github_graph]: the same object comes back on a second call inside oneglobal, a secondglobalgets its own object, and the same holds on the path that reads the global variables. That last one sets and clears$global,$optionsand$loogitself rather than leaning ontest_use_with_global_variables, which now owns that cleanup.Closes #665
@yegor256 please take a look