fix(checkincache): remove stray debug fmt.Println in GetFeatureFlag#1786
Open
munzzyy wants to merge 1 commit into
Open
fix(checkincache): remove stray debug fmt.Println in GetFeatureFlag#1786munzzyy wants to merge 1 commit into
munzzyy wants to merge 1 commit into
Conversation
This debug print was left in by ooni#1707 and runs on every feature-flag read, printing the raw checkInFlagsWrapper struct to stdout. It shows up in miniooni/ooniprobe output as an unlabeled line like: {2026-06-25 14:20:32 +0000 UTC map[vanilla_tor_enabled:true ...]} which is confusing on its own and was reported in ooni#1785 as making it look like the wrong experiment had run.
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.
Checklist
Description
Removes a leftover debug
fmt.Println(wrapper)inGetFeatureFlag(internal/checkincache/checkincache.go). It was added in #1707 and prints the raw check-in flags struct to stdout on every call, which in practice means every time an experiment checks whether it's enabled.This is what's behind the confusing unlabeled lines in the log attached to #1785:
Nothing in the codebase reads this output, it's not part of any structured logging path, and it made the reporter think vanilla_tor had run instead of web_connectivity, when really it's just the check-in cache being printed twice because
GetFeatureFlaggets called twice for that run.I want to be upfront that this doesn't fix the panic in that same log (
no URLs returned). That comes fromruntimex.PanicOnErrorininternal/cmd/miniooni/runx.go, which panics when the check-in API returns zero URLs for the experiment. That looks like a backend/check-in condition, not something this file controls, so I'm leaving it out of scope here rather than guessing at a fix I can't verify.Testing
The change is a one-line deletion of an unused-anywhere debug statement, so there's no new behavior to cover.
fmtis still imported and used (fmt.SprintfinExperimentEnabledKey), and I checkedcheckincache_test.goto confirm none of the existing tests assert on stdout, so this shouldn't affect them.I don't have a Go toolchain set up in the environment I used to prepare this, so I wasn't able to run
go test/go vetmyself here — I did read through the diff and the surrounding file carefully instead. Happy to fix anything CI turns up.